ViewSize and ViewProperty.RenderTargetSize arent matching

I have version 4.9 (Radeon 6970 if that matters, some old Samsung monitor 1920x1200) and friend tested this on 4.10.

To my knowledge the viewSize and Rendertarget size should match when there is no RT resampling.
Drag around the viewport window and drop it so the render updates. In my editor the color is changing → the view size and RT size arent the same.

I came across this when trying to create screen space regular pattern as blendable.

Hi Mtrx -

The RenderTargetSize is dynamically resized to match the requested render size and takes into account (at least in editor all open viewports, in game mode it will take into account only the game window itself. Also the View Size will dynamically change based on the currently assigned viewport (Material Editor or Level Viewport).

You can set how the RenderTargetSize resizes with teh COnsole Variable r.RenderTargetResizeMethod:

Control the scene render target resize method:
(This value is only used in game mode and on windowing platforms.)
0: Resize to match requested render size (Default) (Least memory use, can cause stalls when size changes e.g. ScreenPercentage)
1: Fixed to screen resolution.
2: Expands to encompass the largest requested render dimension. (Most memory use, least prone to allocation stalls.)

Thank You

Eric Ketchum

I understand what the RTsize should be, but i dont understand the ViewSize value. Why is the ViewSize different in the preview window? They are also different in Play in Window.
I created checker pattern (alternating black and white) based on pixel position. When i used ScreenPosition/RTSize i got correct coordinates, but when i used ScreenPosition/ViewSize the pattern wasnt correct.

Hi Mtrx -

The View Size node outputs the size of the currently selected window. So if your Material Editor Preview Window is 720x320 pixels and your Level Viewport is 1330x976, then the view size node in the Material will output the value of the Material Editor Preview Window when that is in focus and the Level Viewport when that is in focus. And again when you are in Standalone or PIE in a New Window the Material will call that Viewports size, usually the default 1280x720, when rendering out the material in that scene.

View Size is used primarily to make adjustments to materials based on the user’s individual screen size.

Thank You

Eric Ketchum

for me i have same value for render size and view size in viewport