mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-23 04:12:32 +00:00
Use a light_
prefix for the soft shadows, in consideration for potential future expansions with regards to lights.
This commit is contained in:
parent
3750bdd79a
commit
5fd4056750
2 changed files with 6 additions and 5 deletions
|
@ -57,13 +57,13 @@ thing // ZDRayInfo (ZDRay properties for the map)
|
|||
thing // Lightmap point light (Light color and distance properties use the same args as dynamic lights)
|
||||
{
|
||||
type = 9876;
|
||||
SoftShadowRadius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature)
|
||||
light_softshadowradius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature)
|
||||
}
|
||||
|
||||
thing // Lightmap spotlight (Light color, distance and angle properties use the same args as dynamic lights)
|
||||
{
|
||||
type = 9881;
|
||||
SoftShadowRadius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature)
|
||||
light_softshadowradius = <float> (default: 5, radius of the light source in map units; controls the shadow softness. Note that dynamic raytraced lights can also use this feature)
|
||||
}
|
||||
|
||||
linedef
|
||||
|
|
|
@ -264,6 +264,7 @@ void FLevel::CreateLights()
|
|||
|
||||
// UDB's color picker will assign the color as a hex string, stored
|
||||
// in the arg0str field. detect this, so that it can be converted into an int
|
||||
// this behavior is unique to spotlights.
|
||||
if (thing->arg0str.Len() > 0)
|
||||
{
|
||||
FString hex = "0x" + thing->arg0str;
|
||||
|
@ -282,16 +283,16 @@ void FLevel::CreateLights()
|
|||
|
||||
for (const auto& prop : thing->props)
|
||||
{
|
||||
if (!stricmp(prop.key, "softshadowradius"))
|
||||
if (!stricmp(prop.key, "light_softshadowradius"))
|
||||
{
|
||||
softshadowradius = atof(prop.value);
|
||||
}
|
||||
}
|
||||
|
||||
// this is known as "intensity" on dynamic lights (and in UDB)
|
||||
// this is known as "intensity" on dynamic lights (and in UDB) - what it actually is though, is the radius
|
||||
lightDistance = thing->args[3];
|
||||
|
||||
// lightmap light intensity (not to be confused with dynamic lights' intensity, which is actually lightmap light distance
|
||||
// light intensity is how bright or dark a light is. can go below or above 1.0.
|
||||
lightIntensity = thing->alpha;
|
||||
|
||||
if (lightDistance > 0.0f && lightIntensity > 0.0f && lightColor != FVector3(0, 0, 0))
|
||||
|
|
Loading…
Reference in a new issue