Fix T44240: Lamp Halo invisible in rendering.
Halo is not possible when using 'deep' buffer shadow - reflect that in UI. When not using buffered shadows, switch lamp bufftype to 'regular' on render, as already done with 'halfway' method.
This commit is contained in:
@@ -355,6 +355,7 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
|
|
||||||
|
col.active = (lamp.shadow_method != 'BUFFER_SHADOW' or lamp.shadow_buffer_type != 'DEEP')
|
||||||
col.prop(lamp, "use_halo")
|
col.prop(lamp, "use_halo")
|
||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
sub.active = lamp.use_halo
|
sub.active = lamp.use_halo
|
||||||
|
|||||||
@@ -3813,7 +3813,9 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set flag for spothalo en initvars */
|
/* set flag for spothalo en initvars */
|
||||||
if (la->type==LA_SPOT && (la->mode & LA_HALO) && (la->buftype != LA_SHADBUF_DEEP)) {
|
if ((la->type == LA_SPOT) && (la->mode & LA_HALO) &&
|
||||||
|
(!(la->mode & LA_SHAD_BUF) || la->buftype != LA_SHADBUF_DEEP))
|
||||||
|
{
|
||||||
if (la->haint>0.0f) {
|
if (la->haint>0.0f) {
|
||||||
re->flag |= R_LAMPHALO;
|
re->flag |= R_LAMPHALO;
|
||||||
|
|
||||||
@@ -3832,7 +3834,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
|
|||||||
lar->sh_invcampos[2]*= lar->sh_zfac;
|
lar->sh_invcampos[2]*= lar->sh_zfac;
|
||||||
|
|
||||||
/* halfway shadow buffer doesn't work for volumetric effects */
|
/* halfway shadow buffer doesn't work for volumetric effects */
|
||||||
if (lar->buftype == LA_SHADBUF_HALFWAY)
|
if (ELEM(lar->buftype, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP))
|
||||||
lar->buftype = LA_SHADBUF_REGULAR;
|
lar->buftype = LA_SHADBUF_REGULAR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user