mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoCommon: Fix D3D shader warning X3571 (negative base for pow())
Add abs() to fix "pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them".
This commit is contained in:
@ -313,8 +313,8 @@ ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data)
|
||||
break;
|
||||
|
||||
case EFBCopyFormat::XFB:
|
||||
out.Write(
|
||||
" ocol0 = float4(pow(texcol.rgb, float3(gamma_rcp, gamma_rcp, gamma_rcp)), 1.0f);\n");
|
||||
out.Write(" ocol0 = float4(pow(abs(texcol.rgb), float3(gamma_rcp, gamma_rcp, gamma_rcp)), "
|
||||
"1.0f);\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user