Sign in to follow this  
acid2

Projective texturing with HLSL?

Recommended Posts

Hi, I'm quite new to HLSL. But how does this work? I want to be able to project a texture onto a mesh, generally. I see that HLSL has tex2Dproj etc - but don't totally udnerstnad. Someone please enlighten me!

Share this post


Link to post
Share on other sites
Quote:
Original post by acid2
Hi,

I'm quite new to HLSL. But how does this work? I want to be able to project a texture onto a mesh, generally. I see that HLSL has tex2Dproj etc - but don't totally udnerstnad.

Someone please enlighten me!


tex2Dproj takes a 4 vector and divides the coordinates by the w component. The third component is ignored for 2D textures.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this