exec sRGB-disable.cfg
vid_sRGB_fallback 2
r_hdr_glowintensity 1
+ // #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
+ set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
+ // #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
+ set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
+
+ // -nosRGB to -sRGB sky shader conversion:
+ //
+ // q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
+ // ^^ elevation
+ // ^^^ sunlight
+ // q3map_skylight 110 3
+ // ^^^ skylight
+ //
+ // With that, do (the last parameter is the ratio of skylight you assume hits
+ // the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
+ // terrain):
+ // ]skybox_nosRGB_to_sRGB 340 47 110 0.25
+ // rpn: still on stack: new_sunlight:
+ // rpn: still on stack: 380.464142
+ // rpn: still on stack: new_skylight:
+ // rpn: still on stack: 9.32523632
+ //
+ // The equivalent -sRGB shader then will have:
+ //
+ // q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
+ // q3map_skylight 9.32523632 3
+ alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
+set cl_orthoview 0 "WARNING: WILL BREAK CONFIG!!! enable top-down view of the map- meant to be used for radar map images"
+set cl_orthoview_nofog 1 "disable fog while in orthoview"
+set cl_orthoview_distanceoverride 0 "set to a value other than 0 to force a different distance offset when in orthoview"
+
// these settings determine how much the view is affected by movement/damage
cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
cl_deathfade 0 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)