Small features to ease development, debugging

  • Ruuttu
  • Topic Author
More
5 years 10 months ago - 5 years 10 months ago #1 by Ruuttu Small features to ease development, debugging was created by Ruuttu
Just found ReShade a couple of days ago.
It's been fun, but I've hit a couple of limitations I have to bring up right away (:

The log is a little clumsy. The scrollbar usually returns to the top when the log tab is opened. It would be more useful to see the latest messages at the bottom. There is also no way to clear the log. I would personally clear it before every reload so there's no uncertainty about whether an error message is from the current or previous compilation. In case of epic failure where whole screens of errors get printed, the log somehow glitches and can't be scrolled all the way to the bottom.

When switching back to a fullscreen game, ReShade seems to recompile all shaders in the current preset, not just the enabled ones. This can make it a bit slow to use task switching. The same applies to the Reload button of course. The workaround is to move other shaders elsewhere when iterating one of them.

I would like a bit more profiling information. I guess I could use some external tool to get more data, tho I'm not familiar with any such tools. But even getting to see individual timings for each rendering pass in the shader would be very helpful. Currently GPU time is also not available at all of course.
Last edit: 5 years 10 months ago by Ruuttu. Reason: more clear

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

  • crosire
More
5 years 10 months ago #2 by crosire Replied by crosire on topic Small features to ease development, debugging

Ruuttu wrote: The log is a little clumsy. The scrollbar usually returns to the top when the log tab is opened. It would be more useful to see the latest messages at the bottom. There is also no way to clear the log. I would personally clear it before every reload so there's no uncertainty about whether an error message is from the current or previous compilation. In case of epic failure where whole screens of errors get printed, the log somehow glitches and can't be scrolled all the way to the bottom.

These are some good ideas. I'll will see what I can do.

Ruuttu wrote: When switching back to a fullscreen game, ReShade seems to recompile all shaders in the current preset, not just the enabled ones.

This is necessary because the width and height are hardcoded into the shaders, so every mode switch forces a recompile. In DX9 it is actually necessary for ReShade to do a full reinitialization because of restrictions the API imposes (all resources have to be deleted and recreated before a mode switch). But in DX10+/OpenGL ReShade does this too for code simplicity and the aforementioned reason.

Ruuttu wrote: The same applies to the Reload button of course.

ReShade shares textures and constant buffer data between shaders, so it's not easily possible to reload just a subset of the currently loaded effects (since constants could change which would change pointers and mess up everything). Therefore ReShade has to clean up and reload them all unfortunately. There is a fast-loading option available as long as the UI is not visible, which loads only those effects active in the current preset. But as soon as the UI is activated, ReShade has to go back and load all shaders, since the user might enable/disable techniques.

Ruuttu wrote: Currently GPU time is also not available at all of course.

Oh, but it is. You just need a DX10+ or OpenGL game for it to work. GPU timings are not working correctly in DX9 and thus hidden there.

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

  • crosire
More
5 years 10 months ago #3 by crosire Replied by crosire on topic Small features to ease development, debugging
Updated the log page with a "Clear Log" button and made the top (with the filter box and button) sticky, so you can scroll through the log without losing those. github.com/crosire/reshade/commit/86dddf...bdd96fe8d37082db1a4b
The following user(s) said Thank You: Wicked Sick, Fu-Bama

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

  • Fu-Bama
More
5 years 10 months ago #4 by Fu-Bama Replied by Fu-Bama on topic Small features to ease development, debugging

Ruuttu wrote: I would like a bit more profiling information. I guess I could use some external tool to get more data, tho I'm not familiar with any such tools.

Check out GPU Shader Analyzer by AMD (works on Nvidia). It can show you compiled code, instruction count and others, so you know if change in a code actually has some performance benefit.
To set it up you have to add #ifndef ShaderAnalyzer between menu uniforms and add some macros with those variables. Shader analyzer should automatically open ReShade.fxh for all functions.

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

  • Marty McFly
More
5 years 10 months ago - 5 years 10 months ago #5 by Marty McFly Replied by Marty McFly on topic Small features to ease development, debugging
Isn't perfect for debugging though because quite often, the performance of a shader is depending on what is onscreen such as SSAO.
Last edit: 5 years 10 months ago by Marty McFly.

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.