A few suggestions that would improve usability.

  • PetkaGtA
  • Topic Author
More
9 years 3 weeks ago #1 by PetkaGtA A few suggestions that would improve usability. was created by PetkaGtA
So far ReShade impressed me a lot(really beautiful tool to create post-process stuff) but here is a list of improvements that would come handy:
1) Technique execution order, so user can specify when technique will be executed.
2) Projection and View matrix access(via IDirect3DDevice9::GetTransform and analogues in opengl)
3) Not sure that it's supported atm, but getting default in-game mrt buffers would be really nice(something like "texture texInGameNormalBuffer : COLOR1;")

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

  • crosire
More
9 years 3 weeks ago - 9 years 3 weeks ago #2 by crosire Replied by crosire on topic A few suggestions that would improve usability.
Thanks a lot! Here are my thoughts on these, I'm open for discussion =):

  1. Sounds like a good idea. Would probably be another technique annotation (something like "index"). But I'm not sure if it is worth the hassl, since you can implement technique reordering with the preprocessor yourself fairly easy.
  2. That unfortunately would only work for old games which are using the fixed function pipeline. And it would only work if the last drawing call used the scene transformation matrices. The modern shader based pipeline has no way of retrieving that information, since everybody can determine himself, how he wants to pass it to the shaders. One of the main goals of ReShade is to be as generic as possible, so that doesn't fit very well.
  3. The data you get in the texture marked with the "COLOR" semantic is not the data in the game rendertarget bound to index zero. It gets the contents of the backbuffer (the buffer containing the data which is about to be presented to the screen), of which there only exists one (with the exception for 3D rendering and triple buffering). ReShade currently runs at the very end of a frame, it's not even guaranteed the game has bound the backbuffer to one of the rendertarget slots at that point, actually more likely it has unbound all the rendertargets, since rendering finished.
Last edit: 9 years 3 weeks ago by crosire.

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

  • PetkaGtA
  • Topic Author
More
9 years 3 weeks ago #3 by PetkaGtA Replied by PetkaGtA on topic A few suggestions that would improve usability.

That unfortunately would only work for old games which are using the fixed function pipeline.

That's interesting, well so it's possible to do that as an option?
And btw is Depth buffer linearized by default? or I should use that code?(worked so far)
fDepth=2.0 / (-99.0 * fDepth + 101.0);

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

  • crosire
More
9 years 3 weeks ago - 9 years 3 weeks ago #4 by crosire Replied by crosire on topic A few suggestions that would improve usability.

PetkaGtA wrote: That's interesting, well so it's possible to do that as an option?

I don't think it'll get you the right values in the usual case. Games usually render their 2D HUD last, which obviously uses a different transformation matrix than rendering the 3D scene would require and it would be this matrix you get (always assuming the game uses the fixed function pipeline, no modern game does that, Direct3D10+ and OpenGL3+ don't even have it anymore). I'll add it to the TODO list and test it with a few games to see if anything useful comes out of it. If so, then yes, I'd add that as an option for those old games where it works. If no, then well, wouldn't make much sense in adding it then.

If anybody has some ideas on how one could get generic access to the transformation matrices, then please share =).

PetkaGtA wrote: And btw is Depth buffer linearized by default?

Nope, it's the raw depthbuffer data. Linearization has to be done in the shader.
Last edit: 9 years 3 weeks ago by crosire.

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

  • PetkaGtA
  • Topic Author
More
9 years 3 weeks ago #5 by PetkaGtA Replied by PetkaGtA on topic A few suggestions that would improve usability.
Okay after working with ReShade a bit more I come up with some more ideas:
1) Add debug messages for technique/pass like average time in ms.
2) More debug info like memory usage and memory usage per texture(so we could gain more performance from our shaders).
3) Sometimes I get messages of errors in shaders like this
D:\Games\Dark Souls II\Game\Shader@0x191A7B50(97,52): warning X4008: floating point division by zero
and it's hard to determine where error is cause this shader doesn't exist(only in memory perhaps), maybe adding ability to quote strings from code would help?

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

  • crosire
More
9 years 3 weeks ago - 9 years 3 weeks ago #6 by crosire Replied by crosire on topic A few suggestions that would improve usability.
1 and 2 are certainly something that should be added, yes.

About 3: Those are warnings the internal HLSL or GLSL compiler output, after ReShade compiled its shader language into HLSL/GLSL. ReShade adds them to the error output, because as you experienced there are a few that ReShade's compiler does not yet handle itself. So correct, the line numbers there point to internal shaders that exist in memory. But: If you enable tracelogging (rename the created .log to .tracelog) ReShade will write these internal shaders into the log, so you can examine them there and figure out the matching line in your code.
The generated code can be found right under the "Compiling shader '<Function>':" lines. These warnings point into one of those. So just copy the code into another editor window, jump to the line in the error (note that for each pass combination separate shaders are created, so you might need to try multiple of these until you find the one the error originates from), and you should be able to figure out where to find that line in your original source code.
Last edit: 9 years 3 weeks ago by crosire.

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

  • crosire
More
9 years 3 weeks ago - 9 years 3 weeks ago #7 by crosire Replied by crosire on topic A few suggestions that would improve usability.
0.17.0 now has technique performance timers in the "#pragma reshade showstatistics" overlay, as well as some information about the used textures.
Last edit: 9 years 3 weeks ago by crosire.
The following user(s) said Thank You: jas01, PetkaGtA

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.