[GEM-dev] glsl and texture

cyrille henry cyrille.henry at la-kitchen.fr
Sat Aug 26 19:40:36 CEST 2006


hello,
it's working!

moreover, i'm happy to see you're felling well.

it was a pix_image / pix_texture position problem.

i think i'll have some examples to share in a few day...

just a question : is it possible to use 2 textures?
(using 2 pix_image / pix_texture in the same gemchain?)

thanks a lot

Cyrille

james tittle a écrit :
> hi,
> 
> On Aug 25, 2006, at 12:00 PM, cyrille henry wrote:
>> i still don't understand how to load a jpg file to MyTex.
>>
>> attachement is my test patch.
>> it does not render any texture.
> 
> ...I've attached a modified version of your patch that works here, just 
> reduces the brightness by half...
> 
>> chris clepper a écrit :
>>> Use a texture sampler in your shader.  GLSL has a sampler for 2D and 
>>> RECT texutres, so make sure you have the right one for the texture 
>>> type (OSX defaults to RECT while Win/Linux are probably 2D).
> 
> ...in other words, when using sampler2D, your texture needs to be 
> dimensionally square (ie. 256x256)...also, [pix_texture] usually 
> defaults to loading in "mode 1", which means rectangle textures:  make 
> sure you send [mode 0< to it before loading the texture...
> 
> ...you'll also notice that I rearranged the ordering of operations 
> within the gemchain:  this is because we want the program to affect the 
> entire operation of drawing...
> 
> ...I'll definitely try to work up some other examples while I'm still in 
> hospital, but feeling well...
> 
> jamie
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at iem.at
> http://lists.puredata.info/listinfo/gem-dev




More information about the GEM-dev mailing list