I’m trying to make a screen space shader that renders a texture which keeps always its natural size, regardless of the screen resolution or aspect ratio. That would mean the bigger the resolution the more times the texture would repeat. I would also like it to work for whatever texture, maybe even one provided by the user, so hard coding the actual picture dimensions wouldn’t work, although that’s what I’m doing right now.
Is there any way to access them? The code so far is like this:
float2 screenUV = IN.screenPos.xy / IN.screenPos.w;
screenUV *= float2(_ScreenParams.x/[[Texture.Width]],_ScreenParams.y/[[Texture.Height]]);