Page 1 of 1

How to make CC effects in GTA 5 work with UseOriginalPostProcessing enabled in enbeffect.fx?

Posted: 27 Sep 2023, 23:49
by Labont
I use ENB v0.492 and i've been trying to make them work but i don't understand much from the Vanilla post processing code, so if any of you guys know how, please let me know, i just started learning HLSL and i'm trying to figure this out.

Re: How to make CC effects in GTA 5 work with UseOriginalPostProcessing enabled in enbeffect.fx?

Posted: 28 Sep 2023, 14:18
by ENBSeries
If you mean color correction, in the enbeffect.fx copy from #ifdef E_CC_PROCEDURAL till end of #endif //E_CC_PROCEDURAL all the code to the place before this line "r0.xyz = log2(r0.xyz);" and then just need to write new variables to match them. Like float3 color = r0.xyz; and later r0.xyz = color;
Something like this:

r0.xyz = saturate(r0.w * r0.xyz + r2.xyz);
loat3 color = r0.xyz;
#ifdef E_CC_PROCEDURAL
//activated by UseProceduralCorrection=true
float tempgray;
.........
.........
.........
color.b=dot(tempcolor, ECCChannelMixerB);
#endif //E_CC_PROCEDURAL
r0.xyz = color;
r0.xyz = log2(r0.xyz);
r0.xyz = Gamma * r0.xyz;
r0.xyz = exp2(r0.xyz);

Re: How to make CC effects in GTA 5 work with UseOriginalPostProcessing enabled in enbeffect.fx?

Posted: 28 Sep 2023, 21:07
by Labont
ENBSeries wrote: 28 Sep 2023, 14:18 If you mean color correction, in the enbeffect.fx copy from #ifdef E_CC_PROCEDURAL till end of #endif //E_CC_PROCEDURAL all the code to the place before this line "r0.xyz = log2(r0.xyz);" and then just need to write new variables to match them. Like float3 color = r0.xyz; and later r0.xyz = color;
Something like this:

r0.xyz = saturate(r0.w * r0.xyz + r2.xyz);
loat3 color = r0.xyz;
#ifdef E_CC_PROCEDURAL
//activated by UseProceduralCorrection=true
float tempgray;
.........
.........
.........
color.b=dot(tempcolor, ECCChannelMixerB);
#endif //E_CC_PROCEDURAL
r0.xyz = color;
r0.xyz = log2(r0.xyz);
r0.xyz = Gamma * r0.xyz;
r0.xyz = exp2(r0.xyz);
It works! Thanks for your help.