ios - How to exclude model's shadows on itself? -


i have scnlight type scnlighttypedirectional. when scene rendered, model casts shadows on , wasn't expectation. how exclude model's shadows on itself?

or how smooth shadows edge? looks unnatural now.

there scenario : enter image description here

well, find simple way achieve loss material details.

change light model of material scnlightingmodelconstant , exclude model lighting calculation of scnlight.

1. set light model

scnlightingmodelconstant consider ambient light shading, need ambient lights keep model visible.

model.geometry.materials.firstobject.lightingmodelname = scnlightingmodelconstant; 

2. set category bit mask of model , lights

model.categorybitmask = 1; directionallight.categorybitmask = ~1ul; 

if results of bitwise , of categorybitmask zero, node not take consideration light illumination, there no self-shadows anymore. shadows model casted still remain in scene.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -