mirror of https://github.com/xemu-project/xemu.git
nv2a: Prevent NaN in specular power factor calculation
This commit is contained in:
parent
ef1b08d79d
commit
43855d3050
|
@ -360,7 +360,7 @@ GLSL_DEFINE(materialEmissionColor, GLSL_LTCTXA(NV_IGRAPH_XF_LTCTXA_CM_COL) ".xyz
|
|||
|
||||
mstring_append_fmt(body,
|
||||
" float pf;\n"
|
||||
" if (nDotVP == 0.0) {\n"
|
||||
" if (nDotVP == 0.0 || nDotHV == 0.0) {\n"
|
||||
" pf = 0.0;\n"
|
||||
" } else {\n"
|
||||
" pf = pow(nDotHV, specularPower);\n"
|
||||
|
|
Loading…
Reference in New Issue