]> git.sesse.net Git - nageru/blobdiff - equations.frag
Remove a TODO; setting up equations is not where our time goes.
[nageru] / equations.frag
index d7a39bad2db5b15a46f43da1bdd88edd6a5c50dc..d4328decfb997cbdd2e12600c909ed44bdcb2df8 100644 (file)
@@ -14,9 +14,6 @@ uniform float delta;
 // Relative weighting of gradient term.
 uniform float gamma;
 
-// TODO: Consider a specialized version for the case where we know that du = dv = 0,
-// since we run so few iterations.
-
 // Similar to packHalf2x16, but the two values share exponent, and are stored
 // as 12-bit fixed point numbers multiplied by that exponent (the leading one
 // can't be implicit in this kind of format). This allows us to store a much
@@ -69,10 +66,10 @@ void main()
        float I_y = I_x_y.y;
        float I_t = texture(I_t_tex, tc).x;
 
-       // E_I term. Note that we don't square β_0, in line with DeepFlow,
-       // even though it's probably an error.
+       // E_I term. Note that we don't square β_0, in line with DeepFlow;
+       // it's probably an error (see variational_refinement.txt),
+       // but squaring it seems to give worse results.
        //
-       // TODO: Evaluate squaring β_0.
        // FIXME: Should the penalizer be adjusted for 0..1 intensity range instead of 0..255?
        float beta_0 = texture(beta_0_tex, tc).x;
        float k1 = delta * beta_0 * inversesqrt(beta_0 * (I_x * du + I_y * dv + I_t) * (I_x * du + I_y * dv + I_t) + 1e-6);