summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile-shader.frag5
-rw-r--r--shaders/tile-shader.vert2
2 files changed, 3 insertions, 4 deletions
diff --git a/shaders/tile-shader.frag b/shaders/tile-shader.frag
index 2d3de0b2..790399e8 100644
--- a/shaders/tile-shader.frag
+++ b/shaders/tile-shader.frag
@@ -1,4 +1,3 @@
-uniform vec3 color = vec3(1.0, 1.0, 1.0);
layout(location = 2) uniform sampler2D textureData;
layout(location = 1) uniform float y_scale;
@@ -8,7 +7,7 @@ in float interpolated_frag_depth;
out vec4 fragmentColor;
void main() {
- fragmentColor.rgb = color*texture(textureData, interpolatedTextureCoordinates).rgb;
+ fragmentColor.rgb = texture(textureData, interpolatedTextureCoordinates).rgb;
fragmentColor.a = 1.0;
- gl_FragDepth = -interpolated_frag_depth * y_scale;
+ gl_FragDepth = interpolated_frag_depth * y_scale;
}
diff --git a/shaders/tile-shader.vert b/shaders/tile-shader.vert
index cc90bae5..10b17f38 100644
--- a/shaders/tile-shader.vert
+++ b/shaders/tile-shader.vert
@@ -12,5 +12,5 @@ void main() {
interpolatedTextureCoordinates = textureCoordinates;
gl_Position = projection * vec4(position.xy, 0, position.w) + vec4(0, position.z * y_scale, 0, 0);
- interpolated_frag_depth = position.z;
+ interpolated_frag_depth = -position.z;
}