Forum

Look through a Rectangle in Portrait with correct aspect ratio

I’m looking through a portrait rectangle, but my particles are stretched
My fix was a manual aspecting in the Draw shader, but I thought it would be good to have auto, TARGETSIZE has been replaced by Texture0TexelSize; but when I use that keyword I get a shader error. Look in the draw shader and uncomment the line to see my issue.

.Aspect.zip (26.2 KB)

your line float2 R = 1/Texture0TexelSize; is on the root level of the shader… you cannot do any calculations there. only define variables and constants.

why not just make an input Aspect and pass a value in from the patch.

currently, we don’t have a way to provide the render target size to a shader automatically.

1 Like