123456789101112131415161718192021222324252627 |
- #version 430
- layout (location = 0) out vec3 worldPosition;
- layout (location = 1) out vec3 worldNormal;
- layout (location = 2) out vec4 worldColor;
- layout (location = 3) out float worldShadow;
- layout (binding = 0) uniform sampler2D samp;
- layout (binding = 1) uniform sampler2D shadowSamp;
- uniform mat4 proj;
- uniform mat4 view;
- uniform mat4 model;
- in vec3 varPosition;
- in vec2 varTex;
- in vec3 varNormal;
- in vec4 varShadow;
- void main(void)
- {
- worldPosition = varPosition;
- worldNormal = normalize(varNormal);
- worldShadow = float(varShadow.z < texture(shadowSamp, varShadow.xy).x);
- worldColor = texture(samp, varTex);
- }
|