Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shaders and projected depth maps



I am calling glUniform1iARB. If I comment out the texture2DRect call the depth texture call works fine and vice versa. It's very odd but appears that if I try to do texture access to both of the textures the shader fails.
greg


On 17-May-07, at 1:18 PM, Wesley Smith wrote:

Are you calling glUniform1iARB() and passing it the texture unit your
textures are bound to?

wes

On 5/17/07, Greg Keech <email@hidden> wrote:
I'm currently attempting to create a shader that takes an image and a
depth map. The depth map is being projected from the light's point of
view using projective texture mapping. If I access only one of the
textures it works fine, but as soon as I attempt to use
multitexturing within the shader I get inconsistent and incorrect
results. Here's an example of a simple shader  that isn't working for
me:

//BEGIN SHADER
uniform sampler2DRect image;
uniform sampler2DRectShadow depthMap;
void main (void)
{
vec4 img = texture2DRect(image, gl_FragCoord.st);
gl_FragColor = img * shadow2DRectProj(depthMap, gl_TexCoord [1]);
}
//END SHADER


If I access the texture independently it works as expected for that
shader. Has anyone else gotten multi texturing and projective depth
maps working? I have tried this on both intel and Power PC to no
avail. It seems to be something with the projective textures but I
haven't been able to track it down. Any help or hints would be
greatly appreciated.
Thanks
Greg Keech

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/wesley.hoke% 40gmail.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/keech% 40conversionworks.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >shaders and projected depth maps (From: Greg Keech <email@hidden>)
 >Re: shaders and projected depth maps (From: "Wesley Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.