@@ -385,8 +385,8 @@ void main(
385385 float _194 = _180 / _193;
386386 // When IMPROVED is on, override the game's per region and ToD controls
387387 // min/max luminance clamps with fixed values, I hope this solves double darkening
388- float _ae_min_lum = (IMPROVED_AUTO_EXPOSURE == 100 ) ? AE_MIN_LUM : _param1.z;
389- float _ae_max_lum = (IMPROVED_AUTO_EXPOSURE == 100 ) ? AE_MAX_LUM : _param1.w;
388+ float _ae_min_lum = (IMPROVED_AUTO_EXPOSURE == 2 ) ? AE_MIN_LUM : _param1.z;
389+ float _ae_max_lum = (IMPROVED_AUTO_EXPOSURE == 2 ) ? AE_MAX_LUM : _param1.w;
390390 float _195 = max (_194, _ae_min_lum);
391391 float _196 = min (_195, _ae_max_lum);
392392 float _197 = sqrt (_192);
@@ -564,7 +564,7 @@ void main(
564564 float _321 = saturate (_320);
565565 float _322 = _321 * _param3.z;
566566 // Sky visibility exposure bias
567- float _323 = (IMPROVED_AUTO_EXPOSURE == 100 ) ? 0.0f : (_322 + _param2.z);
567+ float _323 = (IMPROVED_AUTO_EXPOSURE == 2 ) ? 0.0f : (_322 + _param2.z);
568568 float _324 = max (_smoothed_target_yf, 9. 999999747378752e-05f );
569569 float _325 = min (_324, 7.0f );
570570 float _326 = _325 + -0.009999999776482582f ;
@@ -587,7 +587,7 @@ void main(
587587 float _343 = _339 - _340;
588588 // Vanilla path (IMPROVED_AUTO_EXPOSURE == 0): keep this sky/occlusion-dependent
589589 // bias term active. Mode 2 zeros it and replaces it with explicit HDR shaping.
590- float _344 = (IMPROVED_AUTO_EXPOSURE == 100 ) ? 0.0f : (_343 * _342);
590+ float _344 = (IMPROVED_AUTO_EXPOSURE == 2 ) ? 0.0f : (_343 * _342);
591591 float _345 = _smoothed_target_yf * 8.0f ;
592592 float _346 = log2 (_345);
593593 float _347 = _346 - _340;
@@ -598,7 +598,7 @@ void main(
598598
599599 float _350;
600600 [branch]
601- if (IMPROVED_AUTO_EXPOSURE == 100 ) {
601+ if (IMPROVED_AUTO_EXPOSURE == 2 ) {
602602 // --- HDR asymmetric exposure adaptation ---
603603 // We reduce vanilla's adaptation strength via a power curve
604604 // in log space, modulated by sky visibility and scene brightness.
@@ -629,7 +629,7 @@ void main(
629629 if (_353) {
630630 float _357 = __3__39__0__1__g_exposureUAV[1 ];
631631 [branch]
632- if (IMPROVED_AUTO_EXPOSURE == 100 ) {
632+ if (IMPROVED_AUTO_EXPOSURE == 2 ) {
633633 // Unified log space temporal adaptation becasue Vanilla uses two separate interpolation spaces (1/exp vs linear)
634634 // Causes visible jitter when the target oscillates around the previous value due to histogram noise.
635635 // Log space lerp is symmetric and smooth in both directions.
@@ -705,7 +705,7 @@ void main(
705705 } else {
706706 // Temporal reset (loading screens, menus)
707707 [branch]
708- if (IMPROVED_AUTO_EXPOSURE == 100 ) {
708+ if (IMPROVED_AUTO_EXPOSURE == 2 ) {
709709 // Preserve previous exposure to prevent spikes from garbage
710710 // histogram data during transitions. Temporal adaptation will
711711 // smoothly converge once gameplay resumes.
@@ -800,7 +800,7 @@ void main(
800800 float _425 = _424 * _381;
801801 _427 = _425;
802802 // Apply EV bias for IMPROVED mode (compensates for zeroed _323 push constant correction)
803- if (IMPROVED_AUTO_EXPOSURE == 100 ) {
803+ if (IMPROVED_AUTO_EXPOSURE == 2 ) {
804804 _427 *= exp2 (AE_EV_BIAS);
805805 }
806806 }
@@ -859,22 +859,22 @@ void main(
859859 // === RenoDX: Bloom/lens glare stabilisation ===
860860 // Write a low passed exposure into slot 18 (_exposure4.z).
861861 // Histogram-AWB and LensFlareComposite read this instead of the fast
862- // _exposure0.y when alt auto exposure is toggled.
863- // This stops vanilla exposure + glare feedback loop that causes bloom shimmer.
864- //
865- // Look into maybe doing a further filtering for distance objects?
862+ // exposure state when smoothed AE or PsychoV17 is active.
863+ // This stops the exposure + glare feedback loop that causes shimmer
864+ // and makes foggy interiors flare unpredictably.
866865 [branch]
867- if (IMPROVED_AUTO_EXPOSURE == 1 ) {
866+ if (( IMPROVED_AUTO_EXPOSURE == 1 ) || IMPROVED_AUTO_EXPOSURE == 2 ) {
868867 float prevSlowExp = __3__39__0__1__g_exposureUAV[18 ];
869868 float slowSeed = (prevSlowExp > 0.0001f && !isnan (prevSlowExp)) ? prevSlowExp : _427;
870869 float slowTau = 0.05f ;
871870 float slowExp = lerp (slowSeed, _427, slowTau);
872871 __3__39__0__1__g_exposureUAV[18 ] = slowExp;
873872 // Slot 19: filtered target luminance for potential future use
873+ float targetSource = IMPROVED_AUTO_EXPOSURE == 2 ? _psychov17_field_yf : _smoothed_target_yf;
874874 float prevSlowTarget = __3__39__0__1__g_exposureUAV[19 ];
875875 float targetSeed =
876- (prevSlowTarget > 0.0001f && !isnan (prevSlowTarget)) ? prevSlowTarget : _smoothed_target_yf ;
877- float slowTarget = lerp (targetSeed, _smoothed_target_yf , 0.08f );
876+ (prevSlowTarget > 0.0001f && !isnan (prevSlowTarget)) ? prevSlowTarget : targetSource ;
877+ float slowTarget = lerp (targetSeed, targetSource , 0.08f );
878878 __3__39__0__1__g_exposureUAV[19 ] = slowTarget;
879879 }
880880
0 commit comments