aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/shaders/ps_image_clip.vs.glsl11
1 files changed, 3 insertions, 8 deletions
diff --git a/resources/shaders/ps_image_clip.vs.glsl b/resources/shaders/ps_image_clip.vs.glsl
index b272b271401..5426d997e4d 100644
--- a/resources/shaders/ps_image_clip.vs.glsl
+++ b/resources/shaders/ps_image_clip.vs.glsl
@@ -27,14 +27,9 @@ void main(void) {
write_clip(clip);
// vUv will contain how many times this image has wrapped around the image size.
- vec2 st0 = image.st_rect.xy;
- vec2 st1 = image.st_rect.zw;
-
- if (image.has_pixel_coords) {
- vec2 texture_size = vec2(textureSize(sDiffuse, 0));
- st0 /= texture_size;
- st1 /= texture_size;
- }
+ vec2 texture_size = vec2(textureSize(sDiffuse, 0));
+ vec2 st0 = image.st_rect.xy / texture_size;
+ vec2 st1 = image.st_rect.zw / texture_size;
vTextureSize = st1 - st0;
vTextureOffset = st0;