File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -631,6 +631,7 @@ static std::string GenFragmentHeader() {
631631
632632 if ( glConfig2.adaptiveExposureAvailable ) {
633633 AddDefine ( str, " BIND_LUMINANCE" , Util::ordinal ( BufferBind::LUMINANCE ) );
634+ AddDefine ( str, " ADAPTIVE_EXPOSURE_AVAILABLE" );
634635 }
635636
636637 return str;
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ vec3 TonemapLottes( vec3 color ) {
5353 / ( pow ( color, vec3 ( u_TonemapParms[0 ] * u_TonemapParms[1 ] ) ) * u_TonemapParms[2 ] + u_TonemapParms[3 ] );
5454}
5555
56- #if defined(HAVE_ARB_explicit_uniform_location) && defined(HAVE_ARB_shader_atomic_counters )
56+ #if defined(ADAPTIVE_EXPOSURE_AVAILABLE )
5757 layout (std140, binding = BIND_LUMINANCE) uniform ub_LuminanceUBO {
5858 uint luminanceU;
5959 };
@@ -75,7 +75,7 @@ void main() {
7575
7676#if defined(r_highPrecisionRendering) && defined(HAVE_ARB_texture_float)
7777 if ( u_Tonemap ) {
78- #if defined(HAVE_ARB_explicit_uniform_location) && defined(HAVE_ARB_shader_atomic_counters )
78+ #if defined(ADAPTIVE_EXPOSURE_AVAILABLE )
7979 if ( u_TonemapAdaptiveExposure ) {
8080 const float l = GetAverageLuminance( luminanceU ) - 8 ;
8181 color.rgb *= clamp ( 0 .18f / exp2 ( l * 0 .8f + 0 .1f ), 0 .0f, 2 .0f );
You can’t perform that action at this time.
0 commit comments