This is a prefab of a cylinder and the eye is the camera in game. Can Unity call out the geometry not visible to the camera?
Do you mean “cull”? From your diagram, it looks to me like you’re asking about backface culling. Yes, Unity does that by default. (Proof: throw a plane into the scene, and try looking at it from the bottom.)
Yes that’s what I mean, sorry about the typo, I updated the title, here is another example.
I see that Unity doesn’t draw the faces that have facing normals away from the camera. What about the shadow, if I put a sphere in a scene the shadow has the right round shape, if Unity draws only half the geometry how does it cast a proper sphere shadow below?
Because shadow-casting works by rendering the scene from the point of view of the light source. While shadow-casting, it is a different set of faces that are backface culled.
Geometry based culling requires the vertex pipeline be purely compute shader driven for those objects. It’s something the team working on HDRP has considered, and something that some AAA engines do now.
It for a long time didn’t make sense to do per triangle culling due CPU pressure in modern engine design, but in the last 3 years AAA engines have added this capability.
To do it in Unity efficiently requires that you have basically got 2 compute shaders: one for “replacing” the vertex shader and one for rendering it etc, so you can tessellate / cull triangles at will.
Anything else is likely to be slower, sorry.
Example reference (page 41):
Other ref:
Thank you all for the replies.