mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-27 21:48:31 +00:00
Update depth_render.fs
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#version 100
|
#version 100
|
||||||
|
|
||||||
|
precision mediump float;
|
||||||
|
|
||||||
// Input vertex attributes (from vertex shader)
|
// Input vertex attributes (from vertex shader)
|
||||||
varying vec2 fragTexCoord;
|
varying vec2 fragTexCoord;
|
||||||
|
|
||||||
@@ -14,8 +16,7 @@ void main()
|
|||||||
{
|
{
|
||||||
// Handle potential Y-flipping
|
// Handle potential Y-flipping
|
||||||
vec2 texCoord = fragTexCoord;
|
vec2 texCoord = fragTexCoord;
|
||||||
if (flipY)
|
if (flipY) texCoord.y = 1.0 - texCoord.y;
|
||||||
texCoord.y = 1.0 - texCoord.y;
|
|
||||||
|
|
||||||
// Sample depth texture
|
// Sample depth texture
|
||||||
float depth = texture2D(depthTexture, texCoord).r;
|
float depth = texture2D(depthTexture, texCoord).r;
|
||||||
|
Reference in New Issue
Block a user