[PD] How to dynamically choose which image to use as texture in a shader (or, understanding tex units and texture id's)

Matteo Sisti Sette matteosistisette at gmail.com
Fri Jun 10 22:16:58 CEST 2011


On 06/10/2011 09:44 PM, cyrille henry wrote:

> is pix_buffer_read, or pix_multitexture an option for you?

Thanks for the suggestion. It probably is, but I'll have to make some 
drastical changes to the overall architecture of the patch which at the 
moment is using multiple [pix_texture] objects.

If you were obliged to keep using multiple [pix_teture]s, is there a way 
to "map" the textures "generated" by [pix_texture] objects to the ones 
used in the shader program? I mean based on the texture id's coming out 
from the right outlet of [pix_texture]?

How do I tell the shader "your sampler2D variable MyTex is texture 160" 
where 160 is the id coming out of a [pix_texture] object?




More information about the Pd-list mailing list