diff options
author | Eric Anholt <[email protected]> | 2010-07-07 14:53:43 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-07-07 14:55:33 -0700 |
commit | 0b74bbb3dcf07489e1dbd1976f07093ad7821e51 (patch) | |
tree | d18a9c8ac1b4d8591584fc5d2fcf743b52043a1b /src/glsl/builtin_function.cpp | |
parent | 9cbd8a1d5a85f39f12e9edbd2defbb9e9d0468ef (diff) |
glsl: Fix the setup of refract()'s output for vec3/vec4 and k < 0.0.
caught by valgrind.
Diffstat (limited to 'src/glsl/builtin_function.cpp')
-rw-r--r-- | src/glsl/builtin_function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index 40c85e7c989..5b3b49d3107 100644 --- a/src/glsl/builtin_function.cpp +++ b/src/glsl/builtin_function.cpp @@ -1808,7 +1808,7 @@ static const char *builtins_110_refract = { " (expression float dot (var_ref n) (var_ref i))\n" " (expression float dot (var_ref n) (var_ref i))))))))\n" " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant vec3 (0.0 0.0))))\n" + " ((return (constant vec3 (0.0 0.0 0.0))))\n" " ((return (expression vec3 -\n" " (expression vec3 * (var_ref eta) (var_ref i))\n" " (expression vec3 *\n" @@ -1833,7 +1833,7 @@ static const char *builtins_110_refract = { " (expression float dot (var_ref n) (var_ref i))\n" " (expression float dot (var_ref n) (var_ref i))))))))\n" " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant vec4 (0.0 0.0))))\n" + " ((return (constant vec4 (0.0 0.0 0.0 0.0))))\n" " ((return (expression vec4 -\n" " (expression vec4 * (var_ref eta) (var_ref i))\n" " (expression vec4 *\n" |