X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resample_effect.frag;fp=resample_effect.frag;h=015bc981727524ca193850df8c857ddaaf780510;hp=f54a8be28b35a23a21e3128175ad5098992b1501;hb=9c12e38b7cd88a77ef297d080b7c41e6bd6326fb;hpb=1ec439c7fb975c09029adaa9090e7f35ce6484b8 diff --git a/resample_effect.frag b/resample_effect.frag index f54a8be..015bc98 100644 --- a/resample_effect.frag +++ b/resample_effect.frag @@ -1,12 +1,13 @@ // DIRECTION_VERTICAL will be #defined to 1 if we are scaling vertically, // and 0 otherwise. -uniform sampler2D PREFIX(sample_tex); -uniform int PREFIX(num_samples); -uniform float PREFIX(num_loops); -uniform float PREFIX(sample_x_scale); -uniform float PREFIX(sample_x_offset); -uniform float PREFIX(slice_height); +// Implicit uniforms: +// uniform sampler2D PREFIX(sample_tex); +// uniform int PREFIX(num_samples); +// uniform float PREFIX(num_loops); +// uniform float PREFIX(sample_x_scale); +// uniform float PREFIX(sample_x_offset); +// uniform float PREFIX(slice_height); // We put the fractional part of the offset (-0.5 to 0.5 pixels) in the weights // because we have to (otherwise they'd do nothing). However, the support texture @@ -24,7 +25,9 @@ uniform float PREFIX(slice_height); // measured in _input_ pixels and tc is in _output_ pixels, although we could // compensate for that.) However, the shader should be mostly bandwidth bound // and not ALU bound, so an extra add per sample shouldn't be too hopeless. -uniform float PREFIX(whole_pixel_offset); +// +// Implicitly declared: +// uniform float PREFIX(whole_pixel_offset); // Sample a single weight. First fetch information about where to sample // and the weight from sample_tex, and then read the pixel itself.