Pixelated game screens for your retro-esque games are cool! The future is now to make your games look worse! It would be even cooler if the player could choose the resolution while they play, or it changes during gameplay!
The usual disclaimer: I am not a programmer, I am what I optimistically call a ‘functionality coder’.
Step 1: Have the camera output set to your render texture
Step 2: Use this line in whatever script you're using to adjust the pixel resolution. For me, it was just attached to a slider value in the pause menu. x and y is the resolution scale (1, 1, being the size you have set the render texture to in the inspector).
Step 3: In the render texture, make sure Dynamic Scaling is set to true. Any render texture flagged with this setting will be affected by ScalableBufferManager.ResizeBuffers.

--- This was the point where things weren't working as expected. There were no changes to the resolution of the render texture at runtime. Below is what allowed it to work for me ---
Step 4: Go to Edit -> Project Settings -> Player. Uncheck 'Auto Graphics API for Windows' (or whatever platforms are being used). Add 'Direct3D12' from the dropdown. Drag it so it is the first item in the list.

That's all.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.