I need to get uv offset for a single pixel to sample screen texture in the postprocessing material. E.g.:
X X o X X
where o is the current pixel and X are neighbor pixels. I know UV for o, to get to X pixels I need to know screen resolution, so that I can do 1/width (or 1/height) and add that offset to the original UV coords. Is there any way to query those number inside postprocessing material or a blueprint?
You may want to be careful when getting the resolution this way…
I can’t say if it works the same, but in UDK, if you got the Viewport size and say the game was windowed… it returned the size the resolution was last set to(via unrealscript or the set rez command), regardless of how large the window actually is.
this (unexpected) behaviour lead to a mess of problems in my UDK projects. so you might want to be aware… Just a heads up.