Cubyz/assets/cubyz/shaders/deferred_render_pass.vert
IntegratedQuantum c04819c5af
Compile shaders in the CI, to validate that their syntax is correct (#1427)
* Move to glslang's convention for shader file suffix

* Update ci.yml

* Oops, a mistake in the shader, how could that happen?

* Does the command error on its own?

* Update ci.yml

* Revert "Oops, a mistake in the shader, how could that happen?"

This reverts commit 869c3323f3d3b5fa607b40e7847c389a12b01f33.

* Update ci.yml
2025-05-10 12:32:51 +02:00

20 lines
660 B
GLSL

#version 460
layout(location = 0) in vec2 inTexCoords;
layout(location = 0) out vec2 texCoords;
layout(location = 1) flat out vec3[4] directions;
layout(location = 0) uniform mat4 invViewMatrix;
layout(location = 1) uniform vec2 tanXY;
void main() {
directions[0] = (invViewMatrix * vec4(1*tanXY.x, 1, 1*tanXY.y, 0)).xyz;
directions[1] = (invViewMatrix * vec4(1*tanXY.x, 1, -1*tanXY.y, 0)).xyz;
directions[2] = (invViewMatrix * vec4(-1*tanXY.x, 1, 1*tanXY.y, 0)).xyz;
directions[3] = (invViewMatrix * vec4(-1*tanXY.x, 1, -1*tanXY.y, 0)).xyz;
texCoords = inTexCoords;
vec2 position = inTexCoords*2 - vec2(1, 1);
gl_Position = vec4(position, 0, 1);
}