diff options
Diffstat (limited to 'shaders')
| -rw-r--r-- | shaders/tile-shader.frag | 4 | ||||
| -rw-r--r-- | shaders/tile-shader.vert | 2 |
2 files changed, 1 insertions, 5 deletions
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; } |
