- disabled 'ray shadow' option from UI and render for Hemi lights.
reason is that raytrace code doesnt like shadow on backfacing faces at all. the hemi light is omni-directional, and would need a shadow calculation to mimic this as well. the new 'Ambient Occlusion' patch will make that possible.
This commit is contained in:
parent
d7f3f66728
commit
e5749a632e
@ -1890,9 +1890,10 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr, int mask)
|
||||
if(lar->shb) {
|
||||
shadfac[3] = testshadowbuf(lar->shb, shi->co, inp);
|
||||
}
|
||||
else if(lar->type==LA_HEMI); // no shadow
|
||||
else if(lar->mode & LA_SHAD_RAY) {
|
||||
// this extra check prevents boundary cases (shadow on smooth sphere)
|
||||
if( shi->vlr->n[0]*lv[0] + shi->vlr->n[1]*lv[1] + shi->vlr->n[2]*lv[2] > -0.001)
|
||||
// this extra 0.001 prevents boundary cases (shadow on smooth sphere)
|
||||
if((shi->vlr->n[0]*lv[0] + shi->vlr->n[1]*lv[1] + shi->vlr->n[2]*lv[2]) > -0.001)
|
||||
ray_shadow(shi, lar, shadfac, mask);
|
||||
}
|
||||
|
||||
|
@ -1816,6 +1816,9 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
|
||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_spot", UI_EMBOSS, UI_HELV, curarea->win);
|
||||
if(uiNewPanel(curarea, block, "Shadow and Spot", "Lamp", 640, 0, 318, 204)==0) return;
|
||||
|
||||
// hemis and ray shadow dont work at all...
|
||||
if(la->type==LA_HEMI) return;
|
||||
|
||||
if(G.vd) grid= G.vd->grid;
|
||||
if(grid<1.0) grid= 1.0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user