Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 430
- layout(binding = 1) uniform sampler2D tex;
- uniform vec2 uvScaling;
- in vec2 uvOffset_;
- flat in vec2 uvBase_;
- layout(binding = 0) uniform sampler2DMS nearDepthTestTex;
- flat in vec3 norm_;
- layout(location = 0)out vec4 color;
- layout(location = 1)out vec4 normal;
- void main() {
- const float depth = texelFetch(nearDepthTestTex, ivec2(gl_FragCoord.xy), 0).r;
- if (gl_FragCoord.z <= depth)
- discard;
- color = texture(tex, uvBase_ + clamp(uvOffset_, 0, uvScaling.x));
- if (color.a < 0.8)
- discard;
- normal = vec4(norm_, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement