Use gamma corrected decal

This commit is contained in:
samuncle 2017-01-14 09:41:29 -05:00
parent 6e2a11abd1
commit b9dd867c86
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ void main(void)
#endif
#endif
vec4 detail = texture(Detail, uv_bis);
detail.xyz = pow(detail.xyz, vec3(2.2));
detail.rgb = detail.a * detail.rgb;
color.rgb = detail.rgb + color.rgb * (1. - detail.a);
float specmap = texture(SpecMap, uv).g;

View File

@ -29,6 +29,7 @@ void main(void)
vec4 detail = texture(Detail, uv_bis);
float specmap = texture(SpecMap, uv).g;
#endif
detail.xyz = pow(detail.xyz, vec3(2.2));
detail.rgb = detail.a * detail.rgb;
color.rgb = detail.rgb + color.rgb * (1. - detail.a);
FragColor = vec4(getLightFactor(color.xyz, vec3(1.), specmap, 0.), 1.);