summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-04-03 11:02:48 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-04-15 15:27:00 +0200
commitb9d101e9f96c2e9fc698cb0f84508e346a976060 (patch)
tree953cd8a49b9d01082775267086fb4457de89e75d /vcl/opengl
parent25f31522594fff89434721d247e501af4fd673de (diff)
restore code comments
These got removed in d115a235bf3ff5366 for some reason. Change-Id: I27eadc7f9f874f420ab0273e0ef2b62af57f6c4a
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/shaders/areaScaleFragmentShader.glsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/opengl/shaders/areaScaleFragmentShader.glsl b/vcl/opengl/shaders/areaScaleFragmentShader.glsl
index e16133682ba2..07945e3ebe44 100644
--- a/vcl/opengl/shaders/areaScaleFragmentShader.glsl
+++ b/vcl/opengl/shaders/areaScaleFragmentShader.glsl
@@ -127,9 +127,16 @@ void main(void)
int dx = int( tex_coord.s * xdestconvert );
int dy = int( tex_coord.t * ydestconvert );
+ // How much each column/row will contribute to the resulting pixel.
+ // Note: These values are always the same for the same X (or Y),
+ // so they could be precalculated in C++ and passed to the shader,
+ // but GLSL has limits on the size of uniforms passed to it,
+ // so it'd need something like texture buffer objects from newer
+ // GLSL versions, and it seems the hassle is not really worth it.
float xratio[ 16 + 2 ];
float yratio[ 16 + 2 ];
+ // For finding the first and last source pixel.
int xpixel[ 16 + 2 ];
int ypixel[ 16 + 2 ];