Render to texture solution

When you chose the resolution of your applications, you get to chose from the ones your system is capable of. Suppose you are rendering to a texture, creating a preview and so on - can you render and any resolution you want? 512x512? 210x687? Then attach a Picture using that texture to the GuiNode and the picture on the screen will be displayed correctly?

(I have tried, but I am having some “lining up issues” and am wondering if it actually changes to the closest res it supports or something…)


In particular, if the resolution is320x280

offCamera = new Camera(320, 280);
offCamera.setFrustumPerspective(42.99566f, 320f/280f, 0.1f, 1000f);

This won’t cause any problems?



Thanks for clarifying.


What does “lining up issues” mean?

My pre-rendered backgrounds had stopped lining up with the invisible model that provides depth. I had incorrectly calculated the new FOV when I changed resolution.

Why are you wanting to render higher resolutions that the device ? I’ve only needed to do it once, just curious about use cases… (no, I’m not setting you up to then cut you to pieces, despite my posts of late :wink: )

I’m actually rendering much smaller, looking to mimic playstation games with pre-rendered backgrounds. I want to be able to render at any resolution (some backgrounds were 320x280) and then scale the result up as much as possible, and then center it so I have black borders.

Yes I do want to scale up the 3d real time parts too, to get that horrible blocky/jumpy playstation look :wink:

(Just noticed I even had a typo in the title, I’m blaming no sleep)

So does that mean there is no issue now?

Yep, thank you, it is working fine now

Just out of interest, could you not render at say 200% of your screen resolution, then scale the resulting image down for some sort of quality antialiasing?

that’s exactly what I was doing, then unsharp masking and colour correcting for a crisper result. The next step would have been reducing the colours down to a pre defined pallet, but that turned into a 3d spatial partitioning problem that made my head hurt, and I didn’t come up with a hack around (I was trying to work in greyscale, then go back to colour, but i just ran out of “give-a-fucks”)