mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-02-21 10:41:24 +00:00
Rename "static lights" to "lightmap lights" to accurately reflect its usage.
This commit is contained in:
parent
7af7737ffb
commit
3443793f79
3 changed files with 10 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
||||||
# ZDRay baking utility for GZDoom
|
# ZDRay baking utility for GZDoom
|
||||||
|
|
||||||
ZDRay is a node and lightmap generator for GZDoom. ZDRay is intended as a drop-in replacement for zdbsp, with the additional feature
|
ZDRay is a node and lightmap generator for GZDoom. ZDRay is intended as a drop-in replacement for zdbsp, with the additional feature
|
||||||
that it can also bake lights. Once ZDRay has processed the level WAD it is ready to be used by GZDoom.
|
that it can also bake lightmap lights. Once ZDRay has processed the level WAD it is ready to be used by GZDoom.
|
||||||
|
|
||||||
ZDRay is based on zdbsp for the node generation and originally used dlight for the lightmap generation. Special thanks to Randi Heit,
|
ZDRay is based on zdbsp for the node generation and originally used dlight for the lightmap generation. Special thanks to Randi Heit,
|
||||||
Samuel Villarreal, Christoph Oelckers and anyone else involved in creating or maintaining those tools.
|
Samuel Villarreal, Christoph Oelckers and anyone else involved in creating or maintaining those tools.
|
||||||
|
@ -55,12 +55,12 @@ thing // ZDRayInfo (ZDRay properties for the map)
|
||||||
lm_sampledistance = <int> (default: 16, map units each lightmap texel covers, must be in powers of two)
|
lm_sampledistance = <int> (default: 16, map units each lightmap texel covers, must be in powers of two)
|
||||||
}
|
}
|
||||||
|
|
||||||
thing // Static point light (Light color and distance properties use the same args as dynamic lights)
|
thing // Lightmap point light (Light color and distance properties use the same args as dynamic lights)
|
||||||
{
|
{
|
||||||
type = 9876;
|
type = 9876;
|
||||||
}
|
}
|
||||||
|
|
||||||
thing // Static spotlight (Light color, distance and angle properties use the same args as dynamic lights)
|
thing // Lightmap spotlight (Light color, distance and angle properties use the same args as dynamic lights)
|
||||||
{
|
{
|
||||||
type = 9881;
|
type = 9881;
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,9 +356,9 @@ struct FloatVertex
|
||||||
float y;
|
float y;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define THING_POINTLIGHT_STATIC 9876
|
#define THING_POINTLIGHT_LM 9876
|
||||||
#define THING_SPOTLIGHT_STATIC 9881
|
#define THING_SPOTLIGHT_LM 9881
|
||||||
#define THING_ZDRAYINFO 9890
|
#define THING_ZDRAYINFO 9890
|
||||||
|
|
||||||
struct ThingLight
|
struct ThingLight
|
||||||
{
|
{
|
||||||
|
|
|
@ -221,7 +221,7 @@ void FLevel::CreateLights()
|
||||||
IntThing *thing = &Things[i];
|
IntThing *thing = &Things[i];
|
||||||
|
|
||||||
// skip things that aren't actually static point lights or static spotlights
|
// skip things that aren't actually static point lights or static spotlights
|
||||||
if (thing->type != THING_POINTLIGHT_STATIC && thing->type != THING_SPOTLIGHT_STATIC)
|
if (thing->type != THING_POINTLIGHT_LM && thing->type != THING_SPOTLIGHT_LM)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
vec3 lightColor(0, 0, 0);
|
vec3 lightColor(0, 0, 0);
|
||||||
|
@ -232,14 +232,14 @@ void FLevel::CreateLights()
|
||||||
|
|
||||||
// need to process point lights and spot lights differently due to their
|
// need to process point lights and spot lights differently due to their
|
||||||
// inconsistent arg usage...
|
// inconsistent arg usage...
|
||||||
if (thing->type == THING_POINTLIGHT_STATIC)
|
if (thing->type == THING_POINTLIGHT_LM)
|
||||||
{
|
{
|
||||||
int r = thing->args[0];
|
int r = thing->args[0];
|
||||||
int g = thing->args[1];
|
int g = thing->args[1];
|
||||||
int b = thing->args[2];
|
int b = thing->args[2];
|
||||||
lightColor = vec3(r / 255.0, g / 255.0, b / 255.0);
|
lightColor = vec3(r / 255.0, g / 255.0, b / 255.0);
|
||||||
}
|
}
|
||||||
else if (thing->type == THING_SPOTLIGHT_STATIC)
|
else if (thing->type == THING_SPOTLIGHT_LM)
|
||||||
{
|
{
|
||||||
auto rgb = (uint32_t)thing->args[0];
|
auto rgb = (uint32_t)thing->args[0];
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ void FLevel::CreateLights()
|
||||||
// this is known as "intensity" on dynamic lights (and in UDB)
|
// this is known as "intensity" on dynamic lights (and in UDB)
|
||||||
lightDistance = thing->args[3];
|
lightDistance = thing->args[3];
|
||||||
|
|
||||||
// static light intensity (not to be confused with dynamic lights' intensity, which is actually static light distance
|
// lightmap light intensity (not to be confused with dynamic lights' intensity, which is actually lightmap light distance
|
||||||
lightIntensity = thing->alpha;
|
lightIntensity = thing->alpha;
|
||||||
|
|
||||||
if (lightDistance > 0.0f && lightIntensity > 0.0f && lightColor != vec3(0, 0, 0))
|
if (lightDistance > 0.0f && lightIntensity > 0.0f && lightColor != vec3(0, 0, 0))
|
||||||
|
|
Loading…
Reference in a new issue