]> git.sesse.net Git - nageru/commitdiff
Microoptimization in splat.vert.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Aug 2018 17:31:23 +0000 (19:31 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 2 Aug 2018 17:31:23 +0000 (19:31 +0200)
splat.vert

index a1274c68ca97cb857c720ef6d1462ef90281f5a7..fd856662a4802b6102495631982b9533c472ed31 100644 (file)
@@ -27,7 +27,7 @@ void main()
        }
        full_flow *= inv_flow_size;
        
-       vec2 patch_center = (ivec2(x, y) + 0.5) / textureSize(flow_tex, 0) + full_flow * splat_alpha;
+       vec2 patch_center = (ivec2(x, y) + 0.5) * inv_flow_size + full_flow * splat_alpha;
        image_pos = patch_center + splat_size * (position - 0.5);
 
        flow = full_flow;