Forums > Jitter

Avoid texture interpolation for small matrices

July 14, 2013 | 2:59 am

Hello everybody,

this is much more a theoretical issue, than a practical one. Anyway…
please have a look at the patch below:
<code>

– Pasted Max Patch, click to expand. –

</code>

I am generating a very simple texture, made of 7 coloured bars, actually a 7×1 matrix.
When I send it to texture, I get interpolation, thus the bars fade smoothly into each other (this is what you see choosing tex1 in the example patch).
To get solid bars, I need to resize the matrix to 320×240 (which is the corresponding value of "dest_dim" in the gl.render. I tried changing dest_dim value, but nothing happened), you can see the desired effect in tex2.

As for now, resizing the matrix is not a great issue, but I’d like to know if there is some way to turn off texture interpolation, so one can use very small matrices and (i guess) save some CPU in very stressing patches.


July 14, 2013 | 8:51 am

set @filter none on your jit.gl.texture


July 14, 2013 | 12:02 pm

Thank you Rob, that’s perfect.

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 3 posts - 1 through 3 (of 3 total)