Page 1 of 1

Help with Texture Projection

PostPosted: Sun Mar 17, 2019 2:23 am
by ShaderCube
Hey Amplify and shaders experts,

I'm struggling to find a solution to make simple pattern overlay effect like it is shown on this page:
http://wiki.amplify.pt/index.php?title= ... een_Params

My problem is that I don't know how to keep it not moving when translate(move) the camera while keeping the pattern not distorted. (See attached .gif)
https://gfycat.com/BoldTallAfricanpiedkingfisher
https://i.imgur.com/sUW4bP1.png

I managed to achieve this result by zeroing out .w component of the position input to the MVP matrix (using MVP matrix instead of UnityObjectToClipPos ).
https://gfycat.com/FamousClearcutBorer

But I don't know how to make the texture projection without perspective distortion. Any help would be much appreciated. Thank you in advance.

Re: Help with Texture Projection

PostPosted: Sun Mar 17, 2019 2:29 am
by naitoookami
Sounds extremely similar to what's going on in a previous post. Try the solution offered in this post

viewtopic.php?f=23&t=914

Re: Help with Texture Projection

PostPosted: Sun Mar 17, 2019 9:00 pm
by ShaderCube
Perfect! That is exactly what I need. Thank you a lot, you helped me to avoid tons of struggles ahead.