Ensure the fragment normal is noramlized

This commit is contained in:
Brad Davis 2018-01-28 14:55:28 -08:00
parent 7565e08657
commit 07aee1ef68

View file

@ -67,7 +67,8 @@ void main(void) {
TransformCamera cam = getTransformCamera();
vec3 fragNormal;
<$transformEyeToWorldDir(cam, _normal, fragNormal)$>
fragNormal = normalize(fragNormal);
vec4 color = vec4(evalSkyboxGlobalColor(
cam._viewInverse,
1.0,
@ -80,7 +81,5 @@ void main(void) {
roughness),
opacity);
color.rgb += emissive * isEmissiveEnabled();
// _fragColor = vec4(albedo, opacity);
_fragColor = color;
}