From c37de30cfc21cd6d742eed27a996a273f5ec2ca1 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 23 Nov 2015 20:26:09 -0500 Subject: gl_shader_gen: Implement fragment lighting fresnel effect. --- src/video_core/pica.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_core/pica.h') 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 -- cgit v1.2.3