JacquesDiringer / GLEngine

Graphic Engine, OpenGL render system
2 stars 0 forks source link

Enhance mix of diffuse and specular for Cook-Torrance PBR materials. #3

Closed JacquesDiringer closed 7 years ago

JacquesDiringer commented 7 years ago

This can easily be done by also taking the diffuse value into account (with the RGB converted to luminance) rather than only the specular one.

theblackunknown commented 7 years ago

Are you targetting a specific shader for this issue or any which blend diffuse and specular contribution ?

JacquesDiringer commented 7 years ago

I was actually targeting my EnvmapLight shader that uses the precomputed 3D envmaps (blurred several times according to a roughness defined by the Cook-Torrance model). The shader mixes diffuse and specular by only looking at the specular, which seems wrong.