12#include <welder/vocabulary.hpp>
22 =welder::doc(
"The kind of a WMO light (SMOLight.type).")
24 Omni [[=welder::doc(
"A point light.")]] = 0,
25 Spot [[=welder::doc(
"A spot light.")]] = 1,
26 Direct [[=welder::doc(
"A directional light.")]] = 2,
27 Ambient [[=welder::doc(
"An ambient light.")]] = 3
33 "One MOLT light. Not rendered by classic-era clients, but baked "
34 "into vertex colors by the exporter.")
36 [[=welder::doc(
"The light kind; a LightType value.")]]
39 [[=welder::doc(
"Whether attenuation applies.")]]
43 [[=welder::mark::exclude]] std::array<std::uint8_t, 2>
pad{};
45 [[=welder::doc(
"Light color.")]]
48 [[=welder::doc(
"Position in model space.")]]
51 [[=welder::doc(
"Intensity.")]]
54 [[=welder::doc(
"Orientation; spot/direct lights only.")]]
57 [[=welder::doc(
"Attenuation start distance.")]]
60 [[=welder::doc(
"Attenuation end distance.")]]
69 One MOLV entry (9.1+): a directional-gradient extension to a MOLT
70 light. Multiple entries may extend the same light.)")
72 struct [[=welder::doc(
73 "One directional gradient sample: a direction (usually axis-"
75 [[=welder::doc(
"Gradient direction; usually either xy or z, remainder 0.")
79 [[=welder::doc(
"Gradient value.")]]
83 [[=welder::doc(
"The six gradient samples.")]]
84 std::array<Gradient, 6> gradients{};
87 [[=welder::mark::exclude]] std::array<std::uint8_t, 3> pad{};
89 [[=welder::doc(
"The MOLT light this entry extends.")]]
98 One MNLD entry (9.0+): a Shadowlands dynamic light - point or spot -
99 used for everything from torch fires to window-light projection.)")
101 [[=welder::doc("0 = point light (sphere), 1 = spot light (cone).")]]
104 [[=welder::doc(
"Index of this light in the MNLD array.")]]
107 [[=welder::doc(
"0x1: blend outer and inner color; 0x2: casts shadows.")]]
110 [[=welder::doc(
"The doodad set this light belongs to.")]]
113 [[=welder::doc(
"Inner color.")]]
116 [[=welder::doc(
"Position in the WMO.")]]
119 [[=welder::doc(
"Euler rotation in radians; rotates the light (spot) or its "
123 [[=welder::doc(
"Attenuation start distance.")]]
126 [[=welder::doc(
"Attenuation end distance.")]]
129 [[=welder::doc(
"Light intensity.")]]
132 [[=welder::doc(
"Outer color; used with flag 0x1.")]]
136 "Gradient start distance for inner/outer blending (flag 0x1).")]]
137 float blendStart = 0;
139 [[=welder::doc(
"Gradient end distance for inner/outer blending (flag 0x1).")
144 [[=welder::mark::exclude]] std::array<std::uint8_t, 4> gap1{};
146 [[=welder::doc(
"Flickering intensity.")]]
147 float flickerIntensity = 0;
149 [[=welder::doc(
"Flickering speed.")]]
150 float flickerSpeed = 0;
152 [[=welder::doc(
"0 = off, 1 = sine curve, 2 = noise curve, 3 = noise step.")]
154 std::int32_t flickerMode = 0;
156 [[=welder::doc(
"Unknown; only zeros observed.")]]
160 [[=welder::mark::exclude]] std::array<std::uint8_t, 4> gap2{};
162 [[=welder::doc(
"FileDataID of the light cookie texture (a cube map for "
164 std::uint32_t lightCookieFdid = 0;
167 [[=welder::mark::exclude]] std::array<std::uint8_t, 20> gap3{};
169 [[=welder::doc(
"Falloff exponent for spot lights.")]]
172 [[=welder::doc(
"Start of the spot drop-off gradient, in radians.")]]
173 float innerAngle = 0;
175 [[=welder::doc(
"End of the spot drop-off gradient, in radians.")]]
176 float outerAngle = 0;
178 [[=welder::doc(
"Scale, as raw IEEE half-float bits; used with flag 0x2.")]]
179 std::uint16_t scaleHalf = 0;
181 [[=welder::doc(
"Intensity multiplier, as raw IEEE half-float bits; 0 is "
182 "corrected to 1 by the client.")]]
183 std::uint16_t intensityMultiplierHalf = 0;
186 [[=welder::mark::exclude]] std::array<std::int32_t, 11> unused{};
189 static_assert(
sizeof(
NewLight) == 0xB8);
Flag-testing convenience for the binary formats' bit-mask enums.
One directional gradient sample: a direction (usually axis-aligned) and its value.
C3Vector direction
Gradient direction; usually either xy or z, remainder 0.
float value
Gradient value.
std::array< Gradient, 6 > gradients
The six gradient samples.
std::array< std::uint8_t, 3 > pad
Alignment padding; zero in client files.
std::uint8_t lightIndex
The MOLT light this entry extends.
The binary-level math and color primitives shared across WoW file formats (wowdev....