@@ -1025,7 +1025,7 @@ void main(
10251025 // RenoDX: Weather adaptive grass occluder thickness
10261026 if (_2472 == 17 ) {
10271027 float _grassWeather = saturate (abs (_sunDirection.y) * FOLIAGE_SHADOW_SENSITIVITY);
1028- _2546 = renodx::math::Select (CONTACT_SHADOW_QUALITY == 1.f , lerp (0.018f , 0.05f , _grassWeather), 0.09f );
1028+ _2546 = renodx::math::Select (RR_ENABLED == 1.f && CONTACT_SHADOW_QUALITY == 1.f , lerp (0.018f , 0.05f , _grassWeather), 0.09f );
10291029 }
10301030 float _2548 = saturate (_2478 * 0.015625f );
10311031 float _2551 = (1.0f - _2548) + (_2548 * _2546);
@@ -1037,7 +1037,7 @@ void main(
10371037 _2569 = _2472;
10381038 _2570 = saturate (((saturate (1.0f - ((_2551 * _2551) * _2546)) * (1.0f - _2457)) * _2562) + _2457);
10391039 // RenoDX: Weather adaptive grass shadow contribution
1040- if (CONTACT_SHADOW_QUALITY == 1.f && _2472 == 17 ) {
1040+ if (RR_ENABLED == 1.f && CONTACT_SHADOW_QUALITY == 1.f && _2472 == 17 ) {
10411041 float _grassContrib = lerp (0.3f , 0.65f , saturate (abs (_sunDirection.y) * FOLIAGE_SHADOW_SENSITIVITY));
10421042 _2570 = lerp (_2457, _2570, _grassContrib);
10431043 }
@@ -1176,7 +1176,7 @@ void main(
11761176 // RenoDX: Weather adaptive grass occluder thickness
11771177 if (_2750 == 17 ) {
11781178 float _grassWeather2 = saturate (abs (_sunDirection.y) * FOLIAGE_SHADOW_SENSITIVITY);
1179- _2824 = renodx::math::Select (CONTACT_SHADOW_QUALITY == 1.f , lerp (0.018f , 0.05f , _grassWeather2), 0.09f );
1179+ _2824 = renodx::math::Select (RR_ENABLED == 1.f && CONTACT_SHADOW_QUALITY == 1.f , lerp (0.018f , 0.05f , _grassWeather2), 0.09f );
11801180 }
11811181 float _2826 = saturate (_2757 * 0.015625f );
11821182 float _2829 = (1.0f - _2826) + (_2826 * _2824);
@@ -1188,7 +1188,7 @@ void main(
11881188 _2847 = _2750;
11891189 _2848 = saturate (((saturate (1.0f - ((_2829 * _2829) * _2824)) * (1.0f - _2735)) * _2840) + _2735);
11901190 // RenoDX: Weather adaptive grass shadow contribution
1191- if (CONTACT_SHADOW_QUALITY == 1.f && _2750 == 17 ) {
1191+ if (RR_ENABLED == 1.f && CONTACT_SHADOW_QUALITY == 1.f && _2750 == 17 ) {
11921192 float _grassContrib2 = lerp (0.3f , 0.65f , saturate (abs (_sunDirection.y) * FOLIAGE_SHADOW_SENSITIVITY));
11931193 _2848 = lerp (_2735, _2848, _grassContrib2);
11941194 }
0 commit comments