I have a post process volume material and I'm trying to understand how the UVs given to a SceneTexture:PostProcessInput0 node interact with texture UVs. Here is my material:
The texture shown in the image is an image I made in which the red value increases from 0 to 1, left to right, and the green value does likewise up and down. From my understanding, UVs go from 0 to 1, so I would expect the following material to do more or less nothing. A pixel on the top left of the screen (0, 0) will sample the texture at (0, 0) and get R and G values of (0, 0), and then give the SceneTexture node UVs of (0, 0). A pixel on the bottom right of the screen should give (1, 1) to the texture, which gives (1, 1) to the scene texture, etc. There should be basically no change to the rendered frame, right?
However, what's actually happening is that the rendered scene becomes very distorted at the top and left. It curves and stretches the scene and adds a "fuzziness":
What's going on here? Clearly I do not quite understand how these nodes are interacting. I suspect it may have something to do with my texture having a different resolution than the game window, but if UVs are all normalized from 0 to 1 as I thought they were then that shouldn't matter.
While thinking about getting identical results, you should keep in mind, that you need to sample your texture linearly, not in sRGB, as it most likely defaulted to. On top of that, be aware of the texture compression artifacts and limits of precision in 8bpc texture formats. You might need to use uncompressed texture with higher precision for this purpose.
answered Nov 12 '17 at 02:40 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here