Fixed coordinate transformation for skybox and reflection objects
Matched HLSL and GLSL shaders Fixes #757
This commit is contained in:
parent
1d815e6ced
commit
4e600f5943
11 changed files with 5 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ void main()
|
|||
vec3 cR = reflect (cI, normalize(inNormal));
|
||||
|
||||
cR = vec3(ubo.invModel * vec4(cR, 0.0));
|
||||
cR.y *= -1.0;
|
||||
cR.yz *= -1.0;
|
||||
|
||||
vec4 color = textureLod(samplerCubeMapArray, vec4(cR, ubo.cubeMapIndex), ubo.lodBias);
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -16,5 +16,6 @@ layout (location = 0) out vec3 outUVW;
|
|||
void main()
|
||||
{
|
||||
outUVW = inPos;
|
||||
outUVW.yz *= -1.0f;
|
||||
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue