wined3d: Use the absolute source value in shader_glsl_rsq().

This commit is contained in:
Henri Verbeet 2010-02-01 13:52:59 +01:00 committed by Alexandre Julliard
parent adf4ca2e23
commit c43c2a2845
1 changed files with 2 additions and 2 deletions

View File

@ -2255,12 +2255,12 @@ static void shader_glsl_rsq(const struct wined3d_shader_instruction *ins)
if (mask_size > 1)
{
shader_addline(buffer, "vec%d(%s == 0.0 ? FLT_MAX : inversesqrt(%s)));\n",
shader_addline(buffer, "vec%d(%s == 0.0 ? FLT_MAX : inversesqrt(abs(%s))));\n",
mask_size, src_param.param_str, src_param.param_str);
}
else
{
shader_addline(buffer, "%s == 0.0 ? FLT_MAX : inversesqrt(%s));\n",
shader_addline(buffer, "%s == 0.0 ? FLT_MAX : inversesqrt(abs(%s)));\n",
src_param.param_str, src_param.param_str);
}
}