Monday, September 26, 2022
HomeGame Developmentshaders - Learn how to calculate display house UV coordinates from a...

shaders – Learn how to calculate display house UV coordinates from a selected digital camera


In Unreal Engine 4.27 I’m at present making an attempt to create a cloth (shader) that maps a texture onto a quad utilizing the display house coordinates from a selected digital camera. If I’m utilizing the present energetic digital camera ScreenAlignedUvs node works good. The issue nonetheless is that in my scene I’ve 2 cameras, one whose display house uvs shall be used when rendering the feel, and the opposite which is able to wants to make use of the UVs of the primary digital camera. For illustration functions you possibly can image the mesh that is utilized to as a TV display which appears like a standard TV to everybody apart from one particular person which the TV seems to observe. To this particular particular person the TV principally seems to be a portal. The image under is a tough drawing of the instance (Purple is the particular particular person and their view, Blue is a standard particular person, Black is the TV, Inexperienced are the u a part of the uv coordinates).

enter image description here

I might additionally prefer to level out that I’m conscious there might be points when the principle digital camera will not be viewing components of the mesh that’s seen to secondary cameras. On this case I feel it’s truthful for the UVs to be undefined/random.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments