Hi Josef,

On Mon, 2005-12-12 at 22:22 +0000, Josef Grunig wrote:
> 
> In the fragment shader the texture units are defined as:
> 
> uniform samplerRECT texUnit0;
> uniform samplerRECT texUnit1;
> 
> and I access the textures values using:
> 
> texture2DRect( texUnit0, vec2(x,y));
> texture2DRect( texUnit1, vec2(x,y));
> 
> Am I forgetting something?
> Shouldn't this work?

That's one of the few annoying things in GLSL: texture samplers are
uniform parameters, i.e. you have to set on the SHLChunk the fact that
texUnit0 is 0 and texUnit1 is 1. You cannot hard-code that into the
shader, it has to be a uniform parameter.

Hope it helps

        Dirk






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to