diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/include/texture.h | 5 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_texture.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index ebc83984306..ed161e186b8 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -56,6 +56,11 @@ _hsv[1] *= tex->saturation; \ hsv_to_rgb(_hsv[0], _hsv[1], _hsv[2], \ &texres->tr, &texres->tg, &texres->tb); \ + if ((tex->saturation > 1.0f) && !(tex->flag & TEX_NO_CLAMP)) { \ + if (texres->tr < 0.0f) texres->tr= 0.0f; \ + if (texres->tg < 0.0f) texres->tg= 0.0f; \ + if (texres->tb < 0.0f) texres->tb= 0.0f; \ + } \ } \ struct HaloRen; diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index c6a80c822a3..6acdde6af9c 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -2431,7 +2431,7 @@ void do_material_tex(ShadeInput *shi, Render *re) BKE_image_pool_release_ibuf(ima, ibuf, re->pool); } - + if (mtex->mapto & MAP_COL) { float colfac= mtex->colfac*stencilTin; texture_rgb_blend(&shi->r, tcol, &shi->r, texres.tin, colfac, mtex->blendtype); |