nv2a: Prevent NaN in specular power factor calculation

This commit is contained in:
Erik Abair 2025-05-20 13:02:00 -07:00
parent ef1b08d79d
commit 43855d3050
1 changed files with 1 additions and 1 deletions

View File

@ -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"