From 027af044ce8eb233e47cd7134da42f0b53cf2784 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 15 Sep 2022 12:47:58 +0000 Subject: a --- shaders/tile-shader.frag | 4 +--- shaders/tile-shader.vert | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'shaders') diff --git a/shaders/tile-shader.frag b/shaders/tile-shader.frag index 5d40df69..1cd1cf3d 100644 --- a/shaders/tile-shader.frag +++ b/shaders/tile-shader.frag @@ -4,12 +4,10 @@ layout(location = 2) uniform sampler2D textureData; layout(location = 1) uniform float y_scale; in vec2 interpolatedTextureCoordinates; -in float interpolated_frag_depth; out vec4 fragmentColor; void main() { fragmentColor.rgb = texture(textureData, interpolatedTextureCoordinates).rgb; - fragmentColor.a = 1.0; - gl_FragDepth = interpolated_frag_depth * y_scale; + fragmentColor.a = 1; } diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert index 6241977b..239f4b07 100644 --- a/shaders/tile-shader.vert +++ b/shaders/tile-shader.vert @@ -6,7 +6,6 @@ layout(location = 0) uniform vec2 scale; layout(location = 3) uniform vec2 offset; out vec2 interpolatedTextureCoordinates; -out float interpolated_frag_depth; void main() { interpolatedTextureCoordinates = textureCoordinates; @@ -14,5 +13,4 @@ void main() { float cx = 2/scale.x, cy = 2/scale.y; float x = position.y, y = position.x, z = position.z; gl_Position = vec4((x-y+offset.x)*cx, (x+y+z*2)*cx*0.75-offset.y*cx, 0, 1); - interpolated_frag_depth = -position.z; } -- cgit v1.2.3