Welcome, Guest.
Username: Password: Remember me

TOPIC: Texture Detection for Effect Initiation?

Texture Detection for Effect Initiation? 1 year 4 weeks ago #1

  • Sh1nRa358
  • Sh1nRa358's Avatar
  • Offline
  • Posts: 113
  • Thank you received: 9
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: 1 year 4 weeks ago by Sh1nRa358.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
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).
Cheers, crosire =)
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #3

  • Sh1nRa358
  • Sh1nRa358's Avatar
  • Offline
  • Posts: 113
  • Thank you received: 9
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: 1 year 3 weeks ago by Sh1nRa358.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
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.
Cheers, crosire =)
Last Edit: 1 year 3 weeks ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: Sh1nRa358

Texture Detection for Effect Initiation? 1 year 3 weeks ago #5

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
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 administrator has disabled public write access.
The following user(s) said Thank You: crosire, Marty McFly, Sh1nRa358

Texture Detection for Effect Initiation? 1 year 3 weeks ago #6

  • Sh1nRa358
  • Sh1nRa358's Avatar
  • Offline
  • Posts: 113
  • Thank you received: 9
Would color detection be out of the question too instead of texture?
Last Edit: 1 year 3 weeks ago by Sh1nRa358.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #7

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 610
  • Thank you received: 720
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.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #8

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
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.
Cheers, crosire =)
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #9

  • Sh1nRa358
  • Sh1nRa358's Avatar
  • Offline
  • Posts: 113
  • Thank you received: 9
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.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
That requires the game to be modified to display such identification pixels on screen though.
Cheers, crosire =)
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #11

  • Sh1nRa358
  • Sh1nRa358's Avatar
  • Offline
  • Posts: 113
  • Thank you received: 9
oh okay
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 weeks ago #12

  • Martigen
  • Martigen's Avatar
  • Offline
  • Posts: 147
  • Thank you received: 35
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.
The administrator has disabled public write access.

Texture Detection for Effect Initiation? 1 year 3 days ago #13

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
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.
The administrator has disabled public write access.