diff options
author | wwylele <wwylele@gmail.com> | 2017-08-27 06:33:27 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-09-03 07:22:03 +0200 |
commit | 12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824 (patch) | |
tree | 522b5aee2b1f8ca487923c4a8f7d7da2d561bf2b /src/video_core/swrasterizer/lighting.cpp | |
parent | Merge pull request #2891 from wwylele/sw-bump (diff) | |
download | yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar.gz yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar.bz2 yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar.lz yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar.xz yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.tar.zst yuzu-12fbc8c8dff3265b03cffdd5bb5e6dd6537cd824.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/swrasterizer/lighting.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/swrasterizer/lighting.cpp b/src/video_core/swrasterizer/lighting.cpp index b38964530..5fa748611 100644 --- a/src/video_core/swrasterizer/lighting.cpp +++ b/src/video_core/swrasterizer/lighting.cpp @@ -230,7 +230,8 @@ std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors( d1_lut_value * refl_value * light_config.specular_1.ToVec3f(); // Fresnel - if (lighting.config1.disable_lut_fr == 0 && + // Note: only the last entry in the light slots applies the Fresnel factor + if (light_index == lighting.max_light_index && lighting.config1.disable_lut_fr == 0 && LightingRegs::IsLightingSamplerSupported(lighting.config0.config, LightingRegs::LightingSampler::Fresnel)) { @@ -242,14 +243,14 @@ std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors( if (lighting.config0.fresnel_selector == LightingRegs::LightingFresnelSelector::PrimaryAlpha || lighting.config0.fresnel_selector == LightingRegs::LightingFresnelSelector::Both) { - diffuse_sum.a() *= lut_value; + diffuse_sum.a() = lut_value; } // Enabled for the specular lighting alpha component if (lighting.config0.fresnel_selector == LightingRegs::LightingFresnelSelector::SecondaryAlpha || lighting.config0.fresnel_selector == LightingRegs::LightingFresnelSelector::Both) { - specular_sum.a() *= lut_value; + specular_sum.a() = lut_value; } } |