Commit ab6e993c authored by Harmonikater's avatar Harmonikater
Browse files

Update scripts/bf2/general/conFileParse.ms

parent fd9a0c8b
Pipeline #7370 passed with stage
in 32 seconds
......@@ -192,6 +192,11 @@ fn bf2parseConData_Sky fname worldSize:5120 s:10.0 areaShadows:False =
(
local scaleUp = 1.0
local sinAlpha = abs(lightDir[3])
local sunIntensity = 1.0 + 0.5 * sinAlpha
if (areaShadows) then
(
sunIntensity = 1.0
)
local cosAlpha = sqrt ( lightDir[1]^2 + lightDir[2]^2 )
local hMax = 0
if g_bf2_lightMappingTerrain != undefined do
......@@ -205,7 +210,7 @@ fn bf2parseConData_Sky fname worldSize:5120 s:10.0 areaShadows:False =
local targLight = TargetDirectionallight pos:( -lightDir * worldSize * scaleUp + 20 ) target:(Targetobject transform:(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])) \
rgb:(color 0 255 0) shadowColor:(color 0 0 0) hotspot:(worldSize * sqrt 2 + 20) falloff:(worldSize * sqrt 2 + 20) \
name:"_SunLight" castShadows:on multiplier:(1+sinAlpha)
name:"_SunLight" castShadows:on multiplier:(sunIntensity)
local shadows = Adv__Ray_traced shadow_Mode:1 blur:0.1 shadow_Transparent:true aa_threshold:(color 0 0 0)
if (areaShadows) then
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment