Fix T100163: Eevee: Regression: Displacement maps affected by rotation

This was an oversight as the matrix multiplication present in original
code was reversed.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D15858
This commit is contained in:
Clément Foucault
2022-09-02 18:20:24 +02:00
committed by Clément Foucault
parent 07cf3ce92f
commit e02e844f51

View File

@@ -1,6 +1,6 @@
void node_displacement_object(float height, float midlevel, float scale, vec3 N, out vec3 result)
{
N = transform_direction(ModelMatrix, N);
N = transform_direction(ModelMatrixInverse, N);
result = (height - midlevel) * scale * normalize(N);
/* Apply object scale and orientation. */
result = transform_direction(ModelMatrix, result);