summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gfx/shaders/view_texture.frag6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/shaders/view_texture.frag b/gfx/shaders/view_texture.frag
index f01127d..12fa367 100644
--- a/gfx/shaders/view_texture.frag
+++ b/gfx/shaders/view_texture.frag
@@ -6,9 +6,9 @@ layout (location = 0) out vec4 Colour;
6 6
7void main() 7void main()
8{ 8{
9 // My OpenGL driver seems to be ignoring GL_NEAREST for 9 // There is a question here whether we want to view the texture through the
10 // GL_TEXTURE_MAG_FILTER and still applies bilinear sampling. Use texelFetch 10 // sampler or unfiltered. Prefer the latter for now.
11 // instead of texture() instead. 11 //vec3 colour = texture(Texture, Texcoord).rgb;
12 ivec2 st = ivec2(Texcoord * vec2(textureSize(Texture, 0))); 12 ivec2 st = ivec2(Texcoord * vec2(textureSize(Texture, 0)));
13 vec3 colour = texelFetch(Texture, st, 0).rgb; 13 vec3 colour = texelFetch(Texture, st, 0).rgb;
14 Colour = vec4(pow(colour, vec3(1.0 / 2.2)), 1.0); 14 Colour = vec4(pow(colour, vec3(1.0 / 2.2)), 1.0);