diff --git a/data/shaders/mesh/mesh.frag.spv b/data/shaders/mesh/mesh.frag.spv index 65425149..0c03e6c7 100644 Binary files a/data/shaders/mesh/mesh.frag.spv and b/data/shaders/mesh/mesh.frag.spv differ diff --git a/data/shaders/mesh/mesh.vert b/data/shaders/mesh/mesh.vert index a055f9d8..293173bf 100644 --- a/data/shaders/mesh/mesh.vert +++ b/data/shaders/mesh/mesh.vert @@ -21,6 +21,11 @@ layout (location = 2) out vec2 outUV; layout (location = 3) out vec3 outViewVec; layout (location = 4) out vec3 outLightVec; +out gl_PerVertex +{ + vec4 gl_Position; +}; + void main() { outNormal = inNormal; @@ -28,9 +33,9 @@ void main() outUV = inUV; gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0); - vec4 pos = ubo.model * vec4(inPos, 1.0); - outNormal = mat3(ubo.model) * inNormal; + vec4 pos = ubo.model * vec4(inPos, 1.0); + outNormal = mat3(ubo.model) * inNormal; vec3 lPos = mat3(ubo.model) * ubo.lightPos.xyz; - outLightVec = lPos - pos.xyz; - outViewVec = -pos.xyz; + outLightVec = lPos - pos.xyz; + outViewVec = -pos.xyz; } \ No newline at end of file diff --git a/data/shaders/mesh/mesh.vert.spv b/data/shaders/mesh/mesh.vert.spv index 0bca5ba8..d6215eb5 100644 Binary files a/data/shaders/mesh/mesh.vert.spv and b/data/shaders/mesh/mesh.vert.spv differ diff --git a/data/shaders/pushconstants/lights.frag.spv b/data/shaders/pushconstants/lights.frag.spv index 1b4485de..1b6c5022 100644 Binary files a/data/shaders/pushconstants/lights.frag.spv and b/data/shaders/pushconstants/lights.frag.spv differ diff --git a/data/shaders/pushconstants/lights.vert b/data/shaders/pushconstants/lights.vert index cd06323e..b343be38 100644 --- a/data/shaders/pushconstants/lights.vert +++ b/data/shaders/pushconstants/lights.vert @@ -25,6 +25,11 @@ layout (location = 2) out vec3 outColor; layout (location = 3) out vec4 outLightVec[lightCount]; +out gl_PerVertex +{ + vec4 gl_Position; +}; + void main() { outNormal = inNormal; diff --git a/data/shaders/pushconstants/lights.vert.spv b/data/shaders/pushconstants/lights.vert.spv index c1886cd0..f27a6c24 100644 Binary files a/data/shaders/pushconstants/lights.vert.spv and b/data/shaders/pushconstants/lights.vert.spv differ diff --git a/data/shaders/scenerendering/scene.vert b/data/shaders/scenerendering/scene.vert index 9156d56b..34f6405f 100644 --- a/data/shaders/scenerendering/scene.vert +++ b/data/shaders/scenerendering/scene.vert @@ -22,6 +22,11 @@ layout (location = 2) out vec2 outUV; layout (location = 3) out vec3 outViewVec; layout (location = 4) out vec3 outLightVec; +out gl_PerVertex +{ + vec4 gl_Position; +}; + void main() { outNormal = inNormal; diff --git a/data/shaders/scenerendering/scene.vert.spv b/data/shaders/scenerendering/scene.vert.spv index 5597bb04..06a30992 100644 Binary files a/data/shaders/scenerendering/scene.vert.spv and b/data/shaders/scenerendering/scene.vert.spv differ