Texture Detection for Effect Initiation?

  • Sh1nRa358
  • Topic Author
More
8 years 5 months ago - 8 years 5 months ago #1 by Sh1nRa358 Texture Detection for Effect Initiation? was created by Sh1nRa358
I'd like to propose adding texture detection to a few shaders. When the specified texture is seen on-screen, you can choose to enable an effect on the whole screen as usual, or choose it to only happen on specified texture.

#define TextureINIT_0 432Ds#87423 <----texture in-game detection
#define TextureINIT_1 <----can specify multiple textures noted by number
#define TextureINIT_2
#define TextureINIT_START 0 //[0/1] <---- 0 shader is fullscreen / 1 shader is on above texture(s) only


These can go under any shader desired. Whatever category they are under, is the shader that will be initiated by it. Most wanted on the following shaders:
-Motion Blur
-Advanced Motion Blur
-Motion Focus
-Color Filter
-Film Grain
-Vignette


This way, we can choose for a shader to activate only when a specific texture is on the screen. This can fix missing shaders in games taken away by devs in future ports and create some cool effects on certain in-game events. Most importantly, it will give the niche shaders more usefullness.
Last edit: 8 years 5 months ago by Sh1nRa358.

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

  • crosire
More
8 years 5 months ago #2 by crosire Replied by crosire on topic Texture Detection for Effect Initiation?
Impossible. There is no way to find out where the game rendered a specific texture at end of the frame (where post processing effects are rendered). Nor could you identify textures via an ID that easily, there is no guarantee in which order a game loads them or if it loads a specific texture at all and there is no way for ReShade to find out where it loaded them from (the only information available is the texture dimensions, format and data).

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

  • Sh1nRa358
  • Topic Author
More
8 years 5 months ago - 8 years 5 months ago #3 by Sh1nRa358 Replied by Sh1nRa358 on topic Texture Detection for Effect Initiation?
Sorry about putting this in the wrong section, I keep forgetting :P
Oh okay, I thought that with the texture dumping programs and hex editors and cheat engine tools floating about that there would be an easy way to do this. What had me convinced is how the forum members of the Nvidia forums pick and choose which textures in-game get disabled using nvapi to fix 3DVision problems.
Last edit: 8 years 5 months ago by Sh1nRa358.

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

  • crosire
More
8 years 5 months ago - 8 years 5 months ago #4 by crosire Replied by crosire on topic Texture Detection for Effect Initiation?
It is somewhat easier for Direct3D9 (which is the only API most of those tools support), since especially older games made use the D3DX API, which makes identification a lot easier. But it is harder for the more recent OpenGL versions and Direct3D11. But as said, while the identification is not "easy", it's not impossible, so replacing textures etc. which is all those tools do can be done. But. Rendering shaders on them is a completly different story. Rendering doesn't work in way that each texture is rendered separatly, instead triangles are rendered, with each rendered pixel possibly accessing a wide range of different textures or texture atlases. Applying a shader on a specific shader only is thus simply impossible to do in a generic, non-game-specific way.
Last edit: 8 years 5 months ago by crosire.
The following user(s) said Thank You: Sh1nRa358

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

  • Ganossa
More
8 years 5 months ago #5 by Ganossa Replied by Ganossa on topic Texture Detection for Effect Initiation?
If I would be able to write a generic algorithm for that which runs in real time on our current gaming GPUs, I would sell it to the CIA for pattern matching and never work again in my life :cheer:
The following user(s) said Thank You: crosire, Marty McFly, Sh1nRa358

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

  • Sh1nRa358
  • Topic Author
More
8 years 5 months ago - 8 years 5 months ago #6 by Sh1nRa358 Replied by Sh1nRa358 on topic Texture Detection for Effect Initiation?
Would color detection be out of the question too instead of texture?
Last edit: 8 years 5 months ago by Sh1nRa358.

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

  • Marty McFly
More
8 years 5 months ago #7 by Marty McFly Replied by Marty McFly on topic Texture Detection for Effect Initiation?
On a completely other area, would it be possible to do stuff like the compatibility flags on Nvidia Inspector so for games where correct depth buffer recognition fails, you can manually cycle through memory offsets. And maybe even retrieve stuff like normal buffer or player masks and so on.

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

  • crosire
More
8 years 5 months ago #8 by crosire Replied by crosire on topic Texture Detection for Effect Initiation?

Sh1nRa358 wrote: Would color detection be out of the question too instead of texture?

Finding a specific color on the screen is a simple task and is possible already, but it's not really useful.

Marty McFly wrote: On a completely other area, would it be possible to do stuff like the compatibility flags on Nvidia Inspector so for games where correct depth buffer recognition fails, you can manually cycle through memory offsets. And maybe even retrieve stuff like normal buffer or player masks and so on.

Yeah, that can be done.

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

  • Sh1nRa358
  • Topic Author
More
8 years 5 months ago #9 by Sh1nRa358 Replied by Sh1nRa358 on topic Texture Detection for Effect Initiation?
It can work like I proposed the texture thing above by putting in multiple colors that are on the screen instead of the texture. The more colors used to identify, the better you can make the said effects come out to the appropriate scene you want. If just one of the colors go away that you've mentioned, the said effect will stop until all colors you've chosen are on screen.

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

  • crosire
More
8 years 5 months ago #10 by crosire Replied by crosire on topic Texture Detection for Effect Initiation?
That requires the game to be modified to display such identification pixels on screen though.

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

  • Sh1nRa358
  • Topic Author
More
8 years 5 months ago #11 by Sh1nRa358 Replied by Sh1nRa358 on topic Texture Detection for Effect Initiation?
oh okay

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

  • Martigen
More
8 years 5 months ago #12 by Martigen Replied by Martigen on topic Texture Detection for Effect Initiation?

crosire wrote: That requires the game to be modified to display such identification pixels on screen though.

That depends. I'm still hoping we can find a way to toggle the UI mask feature only when the UI is up -- and this might be one way? I.e if you could select a part of the screen (a really small part, like the corner of a dialog) when the UI is up and note the colors of the pixels (or perhaps the average of a range of pixels in a square of that area for basic 'pattern matching') and use this is as the check for the mask toggle. The hardest may be how to select/specify that part of the screen, unless you could make a 2nd mask used just for detection.

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

  • v00d00m4n
More
8 years 4 months ago #13 by v00d00m4n Replied by v00d00m4n on topic Texture Detection for Effect Initiation?
but helix and 3dmigoto does that! i use them to remove or alter native shaders and saw some guys using sort of texture detection to apply effect to. Byt default these injectors was designed to fix 3d stereo probles, but i nvented usage for removal of anti-immersive hud elements and often use them to fix colors natively.

Shame that reshade still does not support proxy chaining, to combine both.

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.