]> git.sesse.net Git - nageru/blobdiff - prewarp.frag
Use textureSize() instead of sending in uniforms manually. Same result, less code...
[nageru] / prewarp.frag
index 1bf99f72a308e32d35dc85eb12dd424afc85ae5b..4b2db4408ee8d9d35af8c4f72de10cafe5b05e3a 100644 (file)
@@ -4,6 +4,7 @@
 
 in vec2 tc;
 out float I, I_t;
+out vec2 normalized_flow;
 
 uniform sampler2D image0_tex, image1_tex, flow_tex;
 
@@ -17,4 +18,5 @@ void main()
 
        I = 0.5f * (I_0 + I_w);
        I_t = I_w - I_0;
+       normalized_flow = flow.xy * textureSize(image0_tex, 0);
 }