how to remove the flicker and shadows of an scnnode in swift - swift4

I am using a directional SCNLight attached above the chair. The shadow around the legs of the chair are flickering and there is unwanted shadows on the seat of the chair.

Related

Why SpotLight passes through 3D sprite using this shader?

I'm using Unity2021.3, and this is a URP project.
There is a 3D sprite in the scene that receives and casts shadow, the material for its spriteRender uses a shader that is a simple modification of Unity URP Simple Lit, and there is a spotLight in front of the 3D sprite with shadow enabled, and there is also a directional light in the scene. The 3D sprite casts shadow on the ground due to the directional light and the spotLight, everything is correct.
But if I switch to a new shader, it seems the SpotLight passes through the 3D sprite, rendering the shadow incorrectly, if I move the SpotLight to make it far away from the 3D sprite, then it seems the shadow is correct.
Please see the attached screenshot, the top three screens are custom shader, below two are the URP Simple Lit variant.
I'm wondering what the problem is with the new shader?
Thank you so much.

Why don't camera mesh appear in Unity?

I have two cameras and for each I've associated a Mesh Filter and Mesh Renderer (which are just red and green cubes. I notice that in the Scene view I can see one cameras position from the other camera. But when I actually play the scene the camera I'm looking through cannot see the cube of the other camera?
EDIT: Adding some clarity I hope.
When I click the play symbol.
When I switch to the green camera it cannot see the red camera.
When I switch to the red camera it cannot see the green camera.
Even though both cameras has a mesh attached to them which appears both in the Scene and Game previews (screenshot above).
The camera at the position of the green cube cannot see the green cube because it is inside the cube and the standard material uses backface culling, which means that only the fronts of the faces of the mesh are drawn and not their backs. And the standard Unity cube has all its faces facing outwards.
Also, I assume the cube would have been clipped regardless, since it's too close, under the near clipping distance of the camera. So anything outside the camera frustum will not be drawn.

rendering of material to a gameobject in unity 3d

I have applied red material to gameobject plane still its showing black colour..can anyone help me out
It looks like your directional light isn't pointing downwards. Without any light, a plane will appear completely black. Try changing the X rotation of the directional light so that it points down.

Render shadows of objects culled by camera

My setup is as follows:
Two layers with GameObjects in them: walls and shortWalls
Single camera, which is culling either walls or shortWalls
Single light, which is culling shortWalls
The effect I'm trying to create is a room where the walls can be fully rendered walls or only render the lowest part shortWalls (kind of like The Sims wall height).
The problem I am facing is that, when I change the camera culling mask to ignore walls, the light seems to ignore walls too. The culling mask of this light is constant, set to ignore shortWalls and to illuminate and cast shadows from walls.
I assume that, since the Unity Manual's layers page separates the use of layers by cameras and lights, the functionality is separated too. But it seems that the camera is ignoring the shadows cast by an object that is being culled.
Is there any way to allow the camera to render shadows casts by objects that are culled by the camera (but not the light)?

sprite kit - partially mask sprite layer

i have a 2-d fruit ninja style iOS (swift 3) game where an animal eats the "enemy" sprite.
currently i can detect a collision between the mouth and the enemy and cause the enemy to disappear with an animation.
however, i would like to implement a more realistic effect where the enemy sprite disappears into the mouth by occluding an increasing portion of the enemy as it moves further into the mouth.
i tried using combinations of masks and layering, but they were hacky and compromise the UX. what would be the most elegant approach to achieving this effect?
current/non-preferred example:
ideal/preferred example: