mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:28:46 +02:00
Ensure the fragment normal is noramlized
This commit is contained in:
parent
7565e08657
commit
07aee1ef68
1 changed files with 2 additions and 3 deletions
|
@ -67,7 +67,8 @@ void main(void) {
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
vec3 fragNormal;
|
vec3 fragNormal;
|
||||||
<$transformEyeToWorldDir(cam, _normal, fragNormal)$>
|
<$transformEyeToWorldDir(cam, _normal, fragNormal)$>
|
||||||
|
fragNormal = normalize(fragNormal);
|
||||||
|
|
||||||
vec4 color = vec4(evalSkyboxGlobalColor(
|
vec4 color = vec4(evalSkyboxGlobalColor(
|
||||||
cam._viewInverse,
|
cam._viewInverse,
|
||||||
1.0,
|
1.0,
|
||||||
|
@ -80,7 +81,5 @@ void main(void) {
|
||||||
roughness),
|
roughness),
|
||||||
opacity);
|
opacity);
|
||||||
color.rgb += emissive * isEmissiveEnabled();
|
color.rgb += emissive * isEmissiveEnabled();
|
||||||
|
|
||||||
// _fragColor = vec4(albedo, opacity);
|
|
||||||
_fragColor = color;
|
_fragColor = color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue