diff options
author | wwylele <wwylele@gmail.com> | 2017-05-25 19:15:12 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-05-30 09:54:58 +0200 |
commit | 686cbf3ac6503755337dd683bf22dfaa07b21c67 (patch) | |
tree | 0d8ea8a1ae4f1d90f057b1b1219b96c2cd0e0c69 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | pica: prepare registers for spotlight (diff) | |
download | yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar.gz yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar.bz2 yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar.lz yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar.xz yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.tar.zst yuzu-686cbf3ac6503755337dd683bf22dfaa07b21c67.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 600119321..fe23be340 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -75,6 +75,8 @@ PicaShaderConfig PicaShaderConfig::BuildFromRegs(const Pica::Regs& regs) { state.lighting.light[light_index].two_sided_diffuse = light.config.two_sided_diffuse != 0; state.lighting.light[light_index].dist_atten_enable = !regs.lighting.IsDistAttenDisabled(num); + state.lighting.light[light_index].spot_atten_enable = + !regs.lighting.IsSpotAttenDisabled(num); } state.lighting.lut_d0.enable = regs.lighting.config1.disable_lut_d0 == 0; @@ -87,6 +89,12 @@ PicaShaderConfig PicaShaderConfig::BuildFromRegs(const Pica::Regs& regs) { state.lighting.lut_d1.type = regs.lighting.lut_input.d1.Value(); state.lighting.lut_d1.scale = regs.lighting.lut_scale.GetScale(regs.lighting.lut_scale.d1); + // this is a dummy field due to lack of the corresponding register + state.lighting.lut_sp.enable = true; + state.lighting.lut_sp.abs_input = regs.lighting.abs_lut_input.disable_sp == 0; + state.lighting.lut_sp.type = regs.lighting.lut_input.sp.Value(); + state.lighting.lut_sp.scale = regs.lighting.lut_scale.GetScale(regs.lighting.lut_scale.sp); + state.lighting.lut_fr.enable = regs.lighting.config1.disable_lut_fr == 0; state.lighting.lut_fr.abs_input = regs.lighting.abs_lut_input.disable_fr == 0; state.lighting.lut_fr.type = regs.lighting.lut_input.fr.Value(); @@ -968,6 +976,7 @@ struct LightSrc { vec3 diffuse; vec3 ambient; vec3 position; + vec3 spot_direction; float dist_atten_bias; float dist_atten_scale; }; |