diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-14 13:56:46 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-14 13:56:46 +0300 |
commit | ba12d909c9706954c59e47fd32e4b09f89737416 (patch) | |
tree | 973b698b957faa2c8e42e917a98f297e20f97683 /source | |
parent | e294808fdcd0f55dbfdebbc5f0a3d3bb3b1baf3a (diff) |
When faces are extremely small (like 0.01 size of pixel), the UV calculus
for faces can give inaccuracies resulting in UV values in the hundreds
range. The UV values now are being clipped.
This should fix weird 'shooting lines' for vectorblur on hair renders.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 2f85e3dd344..965c7ae56f9 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2015,6 +2015,9 @@ void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, i shi->dyuv[1]= shi->dyco[2]*t00- shi->dyco[1]*t01; } } + /* u and v are in range -1 to 0, we allow a little bit extra but not too much, screws up speedvectors */ + CLAMP(u, -2.0f, 1.0f); + CLAMP(v, -2.0f, 1.0f); } } } |