summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2023-06-21 08:59:43 -0700
committer3gg <3gg@shellblade.net>2023-06-21 08:59:43 -0700
commit9522580380393ae9d9b121f335579c5cfa5134f3 (patch)
tree7eb39f459d0e14c3ca410c6ab04709ca09ad5351
parent97ffb9cd1b9bdf8f7691c1ed9751bf2b93a3d966 (diff)
Update comment.
-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);