mirror of https://github.com/qt/qt3d.git
Fix normal calculation in MorphPhongMaterial
Change-Id: Iad160f2d454633b558bee91b1e01c287d4202451 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
This commit is contained in:
parent
c82d0c81aa
commit
d8789d8fd1
|
|
@ -25,7 +25,7 @@ void main()
|
|||
morphNormal = normalize(vertexNormal + vertexNormalTarget * abs(interpolator));
|
||||
}
|
||||
|
||||
worldNormal = normalize( modelNormalMatrix * morphPos );
|
||||
worldNormal = normalize( modelNormalMatrix * morphNormal );
|
||||
worldPosition = vec3( modelMatrix * vec4( morphPos, 1.0 ) );
|
||||
|
||||
gl_Position = modelViewProjection * vec4( morphPos, 1.0 );
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void main()
|
|||
morphNormal = normalize(vertexNormal + vertexNormalTarget * abs(interpolator));
|
||||
}
|
||||
|
||||
worldNormal = normalize( modelNormalMatrix * morphPos );
|
||||
worldNormal = normalize( modelNormalMatrix * morphNormal );
|
||||
worldPosition = vec3( modelMatrix * vec4( morphPos, 1.0 ) );
|
||||
|
||||
gl_Position = modelViewProjection * vec4( morphPos, 1.0 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue