mirror of https://github.com/bjornbytes/lovr.git
Skybox view matrix includes local transform
This commit is contained in:
parent
f515346e20
commit
11f2d052ef
|
@ -16,7 +16,7 @@ vec4 lovrmain() {
|
||||||
|
|
||||||
vec2 uv = uvs[VertexIndex % 6];
|
vec2 uv = uvs[VertexIndex % 6];
|
||||||
vec3 ray = vec3(uv, -1.);
|
vec3 ray = vec3(uv, -1.);
|
||||||
mat3 inverseViewOrientation = transpose(mat3(View));
|
mat3 inverseViewOrientation = transpose(mat3(ViewFromLocal));
|
||||||
Normal = normalize(inverseViewOrientation * (InverseProjection * vec4(ray, 1.)).xyz);
|
Normal = normalize(inverseViewOrientation * (InverseProjection * vec4(ray, 1.)).xyz);
|
||||||
return vec4(uv, 0, 1);
|
return vec4(uv, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue