Getting screen size X and Y values from Render Target Size Patch

Hi, I have some shader patches that need screen size input values to manipulate UVs and I want to simplify it so I don’t have to grab the device patch and plug in the screen size to them.

Can someone show me how?

Because it might be easy for a straight forward effect, but it’s getting tedious for a more complex project that should be assisted with a sender and receiver because the device patch and the input slot is way across the patch editor just to grab that screen size. Thanks!

Using render target size can simplify the patch graph, but sometimes you will actually need to use the screen size from the device patch because it outputs reactive signals, as opposed to shader signals. e.g. you can’t set a scene object’s position, rotation, or scale with a shader signal - it needs to be reactive.

Usually I make a sender for the device screen size just to help keep my graphs more organized and easier to read.

Generally I don’t actually care what the values of the render target size is, since it can only be used in shaders, which generally take values from 0-1. The aspect ratio is the value I use to make things fit from square textures into the final rendered output (the actual screen size).

Here’s an example that uses aspect ratio from render target size to draw a square texture to the screen, without stretching it.

In case you need to know more about the function/composition stuff, I made a short video about it. Redirecting...