summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-11-24 02:26:09 +0100
committerbunnei <bunneidev@gmail.com>2016-02-05 23:20:13 +0100
commitc37de30cfc21cd6d742eed27a996a273f5ec2ca1 (patch)
tree44757e1d0fd83110229e7fad641a54f2e6353baf /src/video_core/pica.h
parentgl_shader_gen: Implement fragment lighting specular 1 component. (diff)
downloadyuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar.gz
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar.bz2
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar.lz
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar.xz
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.tar.zst
yuzu-c37de30cfc21cd6d742eed27a996a273f5ec2ca1.zip
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r--src/video_core/pica.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index 83af6a127..76db51038 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -713,12 +713,15 @@ struct Regs {
}
};
+ /// Returns true if the specified lighting sampler is supported by the current Pica lighting configuration
static bool IsLightingSamplerSupported(LightingConfig config, LightingSampler sampler) {
switch (sampler) {
case LightingSampler::Distribution0:
return (config != LightingConfig::Config1);
case LightingSampler::Distribution1:
return (config != LightingConfig::Config0) && (config != LightingConfig::Config1) && (config != LightingConfig::Config5);
+ case LightingSampler::Fresnel:
+ return (config != LightingConfig::Config0) && (config != LightingConfig::Config2) && (config != LightingConfig::Config4);
}
return false;
}
@@ -761,6 +764,7 @@ struct Regs {
BitField<0, 3, u32> src_num; // number of enabled lights - 1
union {
+ BitField< 2, 2, LightingFresnelSelector> fresnel_selector;
BitField< 4, 4, LightingConfig> config;
BitField<27, 1, u32> clamp_highlights; // 1: GL_TRUE, 0: GL_FALSE
};
@@ -768,6 +772,7 @@ struct Regs {
union {
BitField<16, 1, u32> lut_enable_d0; // 0: GL_TRUE, 1: GL_FALSE
BitField<17, 1, u32> lut_enable_d1; // 0: GL_TRUE, 1: GL_FALSE
+ BitField<19, 1, u32> lut_enable_fr; // 0: GL_TRUE, 1: GL_FALSE
// Each bit specifies whether distance attenuation should be applied for the
// corresponding light