Technical question about OpenGL backbuffer vs final output resolution

  • M4Ri0Cz
  • Topic Author
More
3 weeks 2 days ago #1 by M4Ri0Cz Technical question about OpenGL backbuffer vs final output resolution was created by M4Ri0Cz
Hi Crosire,I'm trying to better understand how ReShade works with OpenGL, and I have a technical question.Let's say an old OpenGL game renders internally at 640×480, while the final image is displayed at 3840×2160 on the monitor.From my understanding, ReShade appears to process the game's original backbuffer. As a result, CRT shaders seem to generate the phosphor mask, scanlines and other effects at the game's internal rendering resolution, which are then enlarged together with the image.My goal is to apply CRT shaders to old OpenGL games while generating the CRT mask at the monitor's native resolution rather than the game's internal rendering resolution.I'm wondering about two things:
  1. Is it technically possible for ReShade to apply its effects to the final output image instead of the original OpenGL backbuffer?
  2. If not, is there any way for ReShade to work with an upscaled presentation buffer rather than the original game framebuffer?
At this point, I'm only trying to understand whether either of these approaches is technically possible. I'm not requesting a new feature—I'd simply like to know whether this is fundamentally possible or whether there is a limitation in the OpenGL rendering pipeline that makes it impossible.Thank you for your time.

Please Log in or Create an account to join the conversation.

  • crosire
More
1 week 5 days ago #2 by crosire Replied by crosire on topic Technical question about OpenGL backbuffer vs final output resolution
As it stands right now ReShade operates on the framebuffer created by the game and is therefore limited to its resolution. It is possible for ReShade to force the resolution of that framebuffer to something else (more easily so in DX than OpenGL though), but the likelihood of the game not being able to cope with that is high. To be safe would need to decouple the game from the output entirely, which while technically possible, is out of scope for ReShade and would better be implemented as an add-on.
An alternative is to forego touching the game rendering/presentation and instead apply effects on top of the window, by using something like github.com/mausimus/ShaderGlass and installing ReShade to that. This is assuming the game is not actually changing the monitor display mode to 640x480.

Please Log in or Create an account to join the conversation.

  • M4Ri0Cz
  • Topic Author
More
6 days 3 hours ago - 6 days 3 hours ago #3 by M4Ri0Cz Replied by M4Ri0Cz on topic Technical question about OpenGL backbuffer vs final output resolution
Thanks, this is very helpful and answers exactly what I wanted to know.In my case the game can render at a lower resolution while the monitor still receives its native resolution through GPU scaling, so your ShaderGlass suggestion sounds particularly interesting.I actually already have ShaderGlass, but I hadn't considered installing ReShade directly into ShaderGlass itself and essentially using it as the final post-processing layer. I'll definitely experiment with that approach. For a game like KOTOR, I think there is a good chance this could work well.My original hope was to find a somewhat more universal solution that could also be used with other older games, without depending on whether they can be conveniently captured or run in a suitable windowed mode. So I'm particularly interested in your point about completely decoupling the game's rendering from the output.It's good to know that such an approach is technically possible, even if it is outside the scope of ReShade itself and would be more appropriate as an add-on. That gives me a much better idea of what direction to investigate if the ShaderGlass approach turns out to be too limiting for broader use.For now, I'll start with ShaderGlass as a proof of concept and see how far I can get with my existing CRT ReShade setup.Thanks again for taking the time to explain this!
Last edit: 6 days 3 hours ago by M4Ri0Cz. Reason: Added additional context

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.