Voici mon code, tu peux m'expliquer exactement ce qu'il fait stp ??? :

/* Copyright (c) 2025 Nyzoka. All rights reserved.

This shader is free to use for personal projects. Unauthorized copying, modification, redistribution, or commercial use is strictly prohibited without permission from the author. Credit to the author must be included in any permitted use. */

#include "ReShade.fxh"

#define R1_WIDTH 50 #define R1_HEIGHT 30 #define R1_ANCHOR float2(0.96, 0.975) #define R1_COLOR float3(197,194,158)

#define R2_WIDTH 15 #define R2_HEIGHT 100 #define R2_ANCHOR float2(0.042, 0.53) #define R2_COLOR float3(197,194,158)

#define R3_WIDTH 80 #define R3_HEIGHT 20 #define R3_ANCHOR float2(0.56, 0.50) #define R3_COLOR float3(0,0,0)

#define R4_WIDTH 20 #define R4_HEIGHT 4 #define R4_ANCHOR float2(0.01, 0.005) #define R4_COLOR float3(0,0,0)

#define SKIP_FRAMES 30

uniform bool Debug = false; uniform uint FrameIndex < source = "framecount"; >;

texture texColorOrigMAP { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; }; sampler ColorOrigMAP { Texture = texColorOrigMAP; };

texture texUIDetectMAP { Width = 1; Height = 1; Format = R8; }; sampler UIDetectMAP { Texture = texUIDetectMAP; };

float3 S(int2 p){ return round(tex2Dlod(ReShade::BackBuffer, float4((float2(p)+0.5)BUFFER_PIXEL_SIZE,0,0)).rgb255); }

bool D1(int2 s,int2 e){ [loop]for(int y=s.y;y<e.y;++y) [loop]for(int x=s.x;x<=e.x-3;++x){ bool ok=true; [unroll]for(int k=0;k<4&&ok;++k) ok&=!any(abs(S(int2(x+k,y))-R1_COLOR)); if(ok) return true; } return false; } bool D2(int2 s,int2 e){ [loop]for(int y=s.y;y<e.y;++y) [loop]for(int x=s.x;x<=e.x-3;++x){ bool ok=true; [unroll]for(int k=0;k<4&&ok;++k) ok&=!any(abs(S(int2(x+k,y))-R2_COLOR)); if(ok) return true; } return false; } bool D3(int2 s,int2 e){ [loop]for(int y=s.y;y<=e.y-9;++y) [loop]for(int x=s.x;x<=e.x-1;++x){ bool ok=true; [unroll]for(int c=0;c<2&&ok;++c) [unroll]for(int r=0;r<10&&ok;++r) ok&=!any(abs(S(int2(x+c,y+r))-R3_COLOR)); if(ok) return true; } return false; } bool D4(int2 s,int2 e){ [loop]for(int y=s.y;y<=e.y-1;++y) [loop]for(int x=s.x;x<=e.x-14;++x){ bool ok=true; [unroll]for(int r=0;r<2&&ok;++r) [unroll]for(int c=0;c<15&&ok;++c) ok&=!any(abs(S(int2(x+c,y+r))-R4_COLOR)); if(ok) return true; } return false; }

void GetRegion(float2 anchor, int2 size, out int2 s, out int2 e, uint w, uint h){ int2 a = int2(anchor * float2(w, h)); s = max(a - size / 2, 0); e = min(s + size, int2(w, h)); }

float PS_UIDetectMAP(float4 pos:SV_Position, float2 tc:TEXCOORD):SV_Target{ if((FrameIndex % SKIP_FRAMES) != 0) discard;

uint w = BUFFER_WIDTH, h = BUFFER_HEIGHT;
int2 s,e;

GetRegion(R1_ANCHOR, int2(R1_WIDTH, R1_HEIGHT), s, e, w, h);
if(D1(s,e)) return 1;
GetRegion(R2_ANCHOR, int2(R2_WIDTH, R2_HEIGHT), s, e, w, h);
if(D2(s,e)) return 1;
GetRegion(R3_ANCHOR, int2(R3_WIDTH, R3_HEIGHT), s, e, w, h);
if(D3(s,e)) return 1;
GetRegion(R4_ANCHOR, int2(R4_WIDTH, R4_HEIGHT), s, e, w, h);
if(D4(s,e)) return 1;

return 0;
}

#include "NeatPerfection.ini"

float4 PS_StoreColorMAP(float4 pos:SV_Position, float2 tc:TEXCOORD):SV_Target{ return tex2D(ReShade::BackBuffer, tc); }

float4 PS_RestoreColorMAP(float4 pos:SV_Position, float2 tc:TEXCOORD):SV_Target{ float ui = tex2D(UIDetectMAP,float2(0,0)).x; float4 o = tex2D(ColorOrigMAP,tc), c = tex2D(ReShade::BackBuffer,tc); c = ui==0 ? c : o;

if(Debug){
    uint w=BUFFER_WIDTH,h=BUFFER_HEIGHT;
    float2 p=tc*float2(w,h);

    int2 s1,e1,s2,e2,s3,e3,s4,e4;
    GetRegion(R1_ANCHOR, int2(R1_WIDTH, R1_HEIGHT), s1, e1, w, h);
    GetRegion(R2_ANCHOR, int2(R2_WIDTH, R2_HEIGHT), s2, e2, w, h);
    GetRegion(R3_ANCHOR, int2(R3_WIDTH, R3_HEIGHT), s3, e3, w, h);
    GetRegion(R4_ANCHOR, int2(R4_WIDTH, R4_HEIGHT), s4, e4, w, h);

    bool b1=((abs(p.x-s1.x)<1||abs(p.x-e1.x)<1)&&(p.y>=s1.y&&p.y<=e1.y))||((abs(p.y-s1.y)<1||abs(p.y-e1.y)<1)&&(p.x>=s1.x&&p.x<=e1.x));
    bool b2=((abs(p.x-s2.x)<1||abs(p.x-e2.x)<1)&&(p.y>=s2.y&&p.y<=e2.y))||((abs(p.y-s2.y)<1||abs(p.y-e2.y)<1)&&(p.x>=s2.x&&p.x<=e2.x));
    bool b3=((abs(p.x-s3.x)<1||abs(p.x-e3.x)<1)&&(p.y>=s3.y&&p.y<=e3.y))||((abs(p.y-s3.y)<1||abs(p.y-e3.y)<1)&&(p.x>=s3.x&&p.x<=e3.x));
    bool b4=((abs(p.x-s4.x)<1||abs(p.x-e4.x)<1)&&(p.y>=s4.y&&p.y<=e4.y))||((abs(p.y-s4.y)<1||abs(p.y-e4.y)<1)&&(p.x>=s4.x&&p.x<=e4.x));

    if(b1||b2||b3||b4) c=float4(1,0,0,1);
}
return c;
}

technique UIDetect { pass { VertexShader=PostProcessVS; PixelShader=PS_UIDetectMAP; RenderTarget=texUIDetectMAP; ClearRenderTargets=false; } } technique UIDetect_Before { pass { VertexShader=PostProcessVS; PixelShader=PS_StoreColorMAP; RenderTarget=texColorOrigMAP; ClearRenderTargets=true; } } technique UIDetect_After { pass { VertexShader=PostProcessVS; PixelShader=PS_RestoreColorMAP; ClearRenderTargets=true; } }

Prend le temps, fais des recherches, enquete, passe en revu tes reflexion puis repond moi uniquement quand te sera sur de toi.