[GEM-dev] 2textures + gemframebuffer

cyrille henry cyrille.henry at la-kitchen.fr
Mon Mar 31 12:36:46 CEST 2008



IOhannes m zmoelnig a écrit :
> cyrille henry wrote:
>>
>>> this is because [pix_info] will output information on the "pix" (that 
>>> is: image-data in main memory) in the gemchain.
>>> since you don't have a "pix" in the chain, you get invalid data.
> 
>> and it's the same information that are used by the shader coordinate. 
>> so shader does have invalid data...
> 
> no, why should this information be used by the shader-coordinate?
> (i haven't had a look at all the patches in this thread yet; probably 
> one of the patches _does_ use the output of [pix_info] to scale some 
> parameter; but the shader-objects themselves do not know anything about 
> the "pix" data (e.g. the width/height as read by [pix_info]) - instead 
> they have this data available in a more abstract way (on the openGL side))
ok. the only problem is that in this exemple, the "more abstract way" does not work.

> 
>>>
>>> (or the like, i don't remember the arguments of the texture-message 
>>> by heart, just print them to see what you are doing)
> 
> i just noticed that [gemframebuffer] does not output the full 
> information for the pix_texture; this should be fixed, though it 
> shouldn't be a problem here.
> 
>>
>> the frambuffer output is correct, but it look like pix_texture does 
>> not use this infos.
> 
> hmm, it seems like your patch is working fine here. (the tex-info of the 
> framebuffer is ok, [pix_texture] seems to respect it)
yes, the texture is correct, but pix_info does not get the texture size.
if you add a shader in this chain, then it will not work.

> 
> probably i should have a look at a patch where the problem is really 
> exposed.
ok. you can have a look at this file. on the right : i use a pix_image to set the texture coordinate, in order to use it in the shader.
without loading this (unused) image, it does not work.

you can also have a look at the exemple 06 in 10.glsl gem exemple.

> 
> (and i should add better aliases for the messages to [gemframebuffer]; 
> like "dimen" instead of "dim", 
ok
>and "rectangle" instead of "mode" to make 
> it in-line with other objects...)
pix_texture use "mode 0" and "mode 1".
what object does use rectangle?

i just add a feature request to add a texunit message to the gemframebuffer, this would be very usefull.


cyrille

> 
> 
> gmart
> IOhannes
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2tex+gfb2.zip
Type: application/zip
Size: 3103 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20080331/f500de4d/attachment.zip>


More information about the GEM-dev mailing list