Screen Aligned Texture distorting when camera moves
Hey forum goers, hopefully you can help me with a little problem i am having.
Right now, I am trying to make an effect where a texture is overlaid on top of an object. Or another way of describing it is the visible space of the object is 'cutout' to show the texture behind it. This is sort of the effect I am going for:
So far, I kinda have it working, but I am running into some issues.
First and biggest issue, is that when the camera moves, either turning to a different direction or moving around in world space, the texture sort of distorts and looks quite ugly. I have a video showing the effect below. I first thought that it was only motion blur causing the issue, so I made a post process to be able to turn off motion blur, and while that did help a bit, there is still weird distortion happening when i move the camera.
Second issue is that the texture scales differently based on the shape of the screen (aka the texture is 1024x1024, but the texture is not showing that it is square unless the viewport is square). I was able to make it square at least by switching from ScreenAlignedUVs to ScreenAlignedPixelToPixelUVs, but I would rather have specific control over the scale and tiling, but I am unsure how to do so when working in screenspace.
Third issue is that, while it is my intention to have the texture move with the camera, I would like to have the ability to make the texture face the camera instead, so that the texture would 'stay put' at the location of the object.
All three of these issues I really don't know how to proceed towards fixing. Any help I could get on this matter would be greatly appreciated.
Video showing the problem here:
asked Mar 23 '17 at 01:57 AM in Rendering
Follow this question
Once you sign in you will be able to subscribe for any updates here