Update shaders

Fixes #1177
This commit is contained in:
Sascha Willems 2025-01-17 13:49:42 +01:00
parent 02dfaf29e8
commit 27c8c36ebe
4 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ layout (location = 0) out vec3 outUVW;
void main() void main()
{ {
outUVW = inPos; outUVW = inPos;
outUVW.yz *= -1.0f; outUVW.xy *= -1.0f;
// Remove translation from view matrix // Remove translation from view matrix
mat4 viewMat = mat4(mat3(ubo.model)); mat4 viewMat = mat4(mat3(ubo.model));
gl_Position = ubo.projection * viewMat * vec4(inPos.xyz, 1.0); gl_Position = ubo.projection * viewMat * vec4(inPos.xyz, 1.0);

View file

@ -21,7 +21,7 @@ VSOutput main([[vk::location(0)]] float3 Pos : POSITION0)
{ {
VSOutput output = (VSOutput)0; VSOutput output = (VSOutput)0;
output.UVW = Pos; output.UVW = Pos;
output.UVW.yz *= -1.0; output.UVW.xy *= -1.0;
// Remove translation from view matrix // Remove translation from view matrix
float4x4 viewMat = ubo.model; float4x4 viewMat = ubo.model;
viewMat[0][3] = 0.0; viewMat[0][3] = 0.0;