Download

Removing the opacity from specular of tranluscent materials

Currently when rendering translucent materials the opacity affects both the diffuse and the specular. For materials like water (and most dielectrics I’d think) the opacity should not affect glancing reflections.

I would rather keep the specular independent of opacity and use the specular value to control specularity if I want to diminish it.

In the ‘Shaders’ folder of the source I tried a file called ‘DeferredShadingCommon’ and I took out “DBufferData.ColorOpacity” from the line “Specular = Specular * DBufferData.ColorOpacity + 0.5f;” but that didn’t seem to work. (I only hit ‘build’ do I need to rebuild or am I off entirely?) If anyone could help to point me where the opacity is being multiplied on the specular for translucent materials I would really appreciate it.