Eevee : Probe Cubemap : Fix Broken Display data.

This commit is contained in:
Clément Foucault 2017-10-02 18:40:03 +02:00
parent 21ec254ae2
commit 73ab572c0a
1 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,8 @@ void main()
mat4 offsetmat = mat4(1.0); /* Identity */
offsetmat[3].xyz = probe_location;
worldPosition = pos * sphere_size;
gl_Position = ViewProjectionMatrix * offsetmat * vec4(worldPosition, 1.0);
vec4 wpos = offsetmat * vec4(pos * sphere_size, 1.0);
worldPosition = wpos.xyz;
gl_Position = ViewProjectionMatrix * wpos;
worldNormal = normalize(pos);
}