Revert "Fix bug with PBR roughness (was working in metal but not plastic materials"

This reverts commit ddd80c1715.
This commit is contained in:
Benau 2019-04-04 01:15:05 +08:00
parent 9c127096dc
commit 53f4863e43

View File

@ -21,7 +21,6 @@ void main()
// Metallic map is stored in normal color framebuffer .w
// Emit map is stored in diffuse color framebuffer.w
float metallicMapValue = texture(normal_color, tc).w;
float specMapValue = texture(normal_color, tc).z;
float emitMapValue = diffuseMatColor.w;
float ao = texture(ssao_tex, tc).x;
@ -29,7 +28,7 @@ void main()
vec3 SpecularComponent = texture(specular_map, tc).xyz;
vec3 diffuse_color_for_mix = diffuseMatColor.xyz * 4.0;
vec3 metallicMatColor = mix(vec3(specMapValue), diffuse_color_for_mix, metallicMapValue);
vec3 metallicMatColor = mix(vec3(0.04), diffuse_color_for_mix, metallicMapValue);
vec3 tmp = DiffuseComponent * mix(diffuseMatColor.xyz, vec3(0.0), metallicMapValue) + (metallicMatColor * SpecularComponent);
vec3 emitCol = diffuseMatColor.xyz + (diffuseMatColor.xyz * diffuseMatColor.xyz * emitMapValue * emitMapValue * 10.0);