summaryrefslogtreecommitdiffstats
path: root/src/video_core/regs_lighting.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/regs_lighting.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/regs_lighting.h b/src/video_core/regs_lighting.h
index fbfebc0a7..b89709cfe 100644
--- a/src/video_core/regs_lighting.h
+++ b/src/video_core/regs_lighting.h
@@ -26,6 +26,8 @@ struct LightingRegs {
DistanceAttenuation = 16,
};
+ static constexpr unsigned NumLightingSampler = 24;
+
static LightingSampler SpotlightAttenuationSampler(unsigned index) {
return static_cast<LightingSampler>(
static_cast<unsigned>(LightingSampler::SpotlightAttenuation) + index);
@@ -84,7 +86,7 @@ struct LightingRegs {
NV = 2, // Cosine of the angle between the normal and the view vector
LN = 3, // Cosine of the angle between the light and the normal vectors
SP = 4, // Cosine of the angle between the light and the inverse spotlight vectors
- CP = 5, // TODO: document and implement
+ CP = 5, // Cosine of the angle between the tangent and projection of half-angle vectors
};
enum class LightingBumpMode : u32 {
@@ -168,6 +170,8 @@ struct LightingRegs {
union {
BitField<0, 1, u32> directional;
BitField<1, 1, u32> two_sided_diffuse; // When disabled, clamp dot-product to 0
+ BitField<2, 1, u32> geometric_factor_0;
+ BitField<3, 1, u32> geometric_factor_1;
} config;
BitField<0, 20, u32> dist_atten_bias;