Jump to content

  • Log In with Google      Sign In   
  • Create Account


HLSL project a texture to the frontside of an object


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 StanIAm   Members   -  Reputation: 188

Like
0Likes
Like

Posted 10 December 2013 - 11:16 AM

Hey folks I have a question about projectionstuff in HLSL.

When I want to project a texture with a custom view and projectionmatrix, I get the problem that the texture also writes to the backfaces of my object viewn from the the custom view.

For example in that Example here: http://www.rastertek.com/dx11tut43.html

I project the texture by looking for frustum intersection and calculating the texcoords for that but lets say I want to project a image like a beamer does but then I get the image also drawn at the backfaces of my object although there would be an unlit area...

Is there a way to solve that ?



Sponsor:

#2 Krypt0n   Crossbones+   -  Reputation: 2272

Like
0Likes
Like

Posted 10 December 2013 - 11:40 AM

make a dot product between the faces you project to and the view direction of the projector.

<0 don't project pixel

>=0 use projected pixel.



#3 StanIAm   Members   -  Reputation: 188

Like
0Likes
Like

Posted 10 December 2013 - 02:03 PM

Okay thanks but what is about other objects that are behind that one ?? It should produce a kind of shadow but is that possible to check ??






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS