diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-12-07 15:29:51 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-12-07 15:29:51 +0300 |
commit | b5c2f9df95a0115de85dab9233082e98aff254c3 (patch) | |
tree | 6610fd8c45a7f2183b27dc215a8e5433d05fcd82 /source | |
parent | 3e7469cd01dd177b8eeae904216e5c4d1c3c09ec (diff) |
Bug fix: Halos didn't use texture alpha
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/renderdatabase.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 91d58b7943e..9c2a3c143af 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -1048,7 +1048,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater MTex *mtex; float tin, tr, tg, tb, ta; float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3],tex[3],out[3]; - int i; + int i, hasrgb; if(hasize==0.0) return NULL; @@ -1151,7 +1151,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater VECCOPY(texvec, orco); } - externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0); + hasrgb = externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0); //yn= tin*mtex->colfac; //zn= tin*mtex->alphafac; @@ -1172,6 +1172,11 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->g= in[1]; har->b= in[2]; } + + /* alpha returned, so let's use it instead of intensity */ + if(hasrgb) + tin = ta; + if(mtex->mapto & MAP_ALPHA) har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype); if(mtex->mapto & MAP_HAR) |