]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve skybox sRGB calculator further.
authorRudolf Polzer <divverent@xonotic.org>
Tue, 24 Sep 2013 10:43:25 +0000 (12:43 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 24 Sep 2013 10:43:25 +0000 (12:43 +0200)
defaultXonotic.cfg

index d22d02ef1da4463492f23897f93f15d3bcd611c6..f811b1c0b747eb1e38efed9a7f6111712a5e484d 100644 (file)
@@ -123,18 +123,20 @@ set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul d
 // q3map_skylight 110 3
 //                ^^^ skylight
 //
-// With that, do:
-// ]skybox_nosRGB_to_sRGB 340 47 110
+// 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: 556.365417
+// rpn: still on stack: 380.464142
 // rpn: still on stack: new_skylight:
-// rpn: still on stack: 24.4562988
+// rpn: still on stack: 9.32523632
 //
 // The equivalent -sRGB shader then will have:
 //
-// q3map_sunExt 1 0.6875 0.375 556.365417 25 47 0 16
-// q3map_skylight 24.4562988 3
-alias skybox_nosRGB_to_sRGB "rpn $3 402.123 div $rpn_sRGB_to_linear 402.123 mul /new_skylight: $3 402.123 div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
+// 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:"
 
 // 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