PostProcess Dynamically Scale Texture to fit screen
I am trying to create a PostProcess Blendable Texture that has a Texture object that blends with the scene. Pretty simple. Below is my Material that usese SceneTexture and blends using a blendfactor before adding the two images.
The issue is I want the texture to tile, exactly once. And right now its cropping the texture. So I expect to see 6x6 checkers but instead only see 2x3
How do I scale my texture so that it will fit the screen. I could guess and check some scale factor but I want to calculate this at runtime so as to support different resolutions and image scales.
asked Mar 07 '17 at 08:36 PM in Rendering
Hi, Was searching for this myself but I figured it out on my own.
Basically you just search for the ScreenPosition inside the material editor and hook it up to the texture UVS node.
Then set the "Mapping" setting to ViewportUV. The material will now adjust itself to whatever screen resolution you set it to.
Follow this question
Once you sign in you will be able to subscribe for any updates here