Another problem with jit.gen & jit.pix

ArturMihel's icon

I wanted to make crossfade, using jit.gen and found that interpolation inside sample in jit.gen & pix is working incorrectly. Although through jit.gl.pix okay.

ArturMihel's icon

patch

4481.samp.maxpat
Max Patch
ArturMihel's icon

Answer please, taken into account whether the problem? Because in 6.0.8 is unpatched (. Sincerely Arthur.

ArturMihel's icon

I'm interested in because that has problems with the feedback, using a sample from jit.gen because incorrectly interpolation.

4642.sample.maxpat
Max Patch
ArturMihel's icon

in max 7 is still the problem is not solved ... it's weird (

Wesley Smith's icon

Yes, this is an unfortunate side effect of some subtle differences between OpenGL pixel shaders and direct pixel processing on the CPU. In OpenGL, the sampling coordinates are generated by rasterizing a quad and interpolating across the rasterized pixels. This produces slightly different 2d coordinates, which accounts for the difference you're seeing. You can use the [nearest] operator to have better results on the CPU. In the end, the solution for using [sample] will be some kind of different sampling mode that's equivalent to what happens in OpenGL.