Files
raylib/examples/shaders/resources/shaders/glsl120/depth_write.fs
2026-03-29 01:10:29 +01:00

17 lines
328 B
GLSL

#version 120
#extension GL_EXT_frag_depth : enable
varying vec2 fragTexCoord;
varying vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 colDiffuse;
void main()
{
vec4 texelColor = texture2D(texture0, fragTexCoord);
gl_FragColor = texelColor*colDiffuse*fragColor;
gl_FragDepthEXT = 1.0 - gl_FragCoord.z;
}