mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-24 03:05:36 +00:00
pica/gl_shader: optimize ternary operator
This commit is contained in:
parent
0d6db4a0b3
commit
92c7bb9d20
|
@ -688,7 +688,7 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) {
|
||||||
|
|
||||||
// If enabled, clamp specular component if lighting result is zero
|
// If enabled, clamp specular component if lighting result is zero
|
||||||
if (lighting.clamp_highlights) {
|
if (lighting.clamp_highlights) {
|
||||||
out += "clamp_highlights = dot_product == 0.0 ? 0.0 : 1.0;\n";
|
out += "clamp_highlights = sign(dot_product);\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If enabled, compute spot light attenuation value
|
// If enabled, compute spot light attenuation value
|
||||||
|
|
Loading…
Reference in a new issue