REVIEWED: shaders_write_depth
example
This commit is contained in:
parent
3cfb9a6e83
commit
5ba41e4f7f
3 changed files with 107 additions and 84 deletions
|
@ -7,9 +7,11 @@ 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;
|
||||
gl_FragDepthEXT = 1.0 - gl_FragCoord.z;
|
||||
}
|
|
@ -5,9 +5,11 @@ in vec4 fragColor;
|
|||
|
||||
uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texelColor = texture2D(texture0, fragTexCoord);
|
||||
|
||||
gl_FragColor = texelColor*colDiffuse*fragColor;
|
||||
gl_FragDepth = 1.0 - gl_FragCoord.z;
|
||||
}
|
||||
gl_FragDepth = 1.0 - gl_FragCoord.z;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue