diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-01-19 14:52:08 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-01-19 14:53:58 +0000 |
commit | 35b77d0c13f15fc172104881e053e8527eebac2c (patch) | |
tree | 3e56882e9c15b48c6ec9abb0dbc326311c0af7b7 | |
parent | d36143ad9ff9bfd777788c14c06c0d406ab0b09d (diff) |
vcl: fix glsl int casts of floats.
Change-Id: Ifa22e2914a1e34f6e2fd635973eca4101914bb88
-rw-r--r-- | vcl/opengl/areaScaleFragmentShader.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/opengl/areaScaleFragmentShader.glsl b/vcl/opengl/areaScaleFragmentShader.glsl index cae5eb6030b0..03fbe691c65b 100644 --- a/vcl/opengl/areaScaleFragmentShader.glsl +++ b/vcl/opengl/areaScaleFragmentShader.glsl @@ -48,8 +48,8 @@ void main(void) float fsx1 = dx * xscale; float fsx2 = fsx1 + xscale; // To whole pixel coordinates. - int sx1 = ceil( fsx1 ); - int sx2 = floor( fsx2 ); + int sx1 = int( ceil( fsx1 ) ); + int sx2 = int( floor( fsx2 ) ); // Range checking. sx2 = min( sx2, swidth - 1 ); sx1 = min( sx1, sx2 ); @@ -79,8 +79,8 @@ void main(void) // The same for Y. float fsy1 = dy * yscale; float fsy2 = fsy1 + yscale; - int sy1 = ceil( fsy1 ); - int sy2 = floor( fsy2 ); + int sy1 = int( ceil( fsy1 ) ); + int sy2 = int( floor( fsy2 ) ); sy2 = min( sy2, sheight - 1 ); sy1 = min( sy1, sy2 ); |