Home › Forums › General Questions › Render calls and geometry buffers – how do they work?
- This topic has 11 replies, 3 voices, and was last updated 2 months ago by c4cc.
-
AuthorPosts
-
2024-07-05 at 5:20 pm #75734c4ccParticipant
Pardon the stupid question, but I’ve looked high and low in Verge3d website and forums, yet no mention on how render calls and geometry buffers work.
Only here in performance bottlenecks do they mention render calls and geometry batch, and even then, no mention on how they function.
2024-07-08 at 5:17 am #75749Yuri KovelenovStaffHi c4cc,
Verge3D/WebGL renders a mesh by processing its geometry information (coordinates, normals, texture coords, vertex colors etc) stored in long arrays. Those are called “geometry buffers”. Big meshes imply large geometry buffers and require more video memory.
When rendering meshes, Verge3D/WebGL must mark a mesh’s geometry buffers “active” and also select a shader (a GPU program), and may be do some other stuff. Only after that, WebGL would issue a command to render this mesh. The whole procedure is called a “render call”. The more different geometry buffers and different shaders (in the 3D software, “materials”) are contained in the scene, the more render calls will be needed.
Preparing for a render call is a CPU-intensive operation that affects the FPS. Thus, you want to have as less of render calls as possible. This can be achieved by batching similar meshes into one, and by using less different materials. Hope this helps!
2024-07-08 at 6:34 am #75753c4ccParticipantThanks for your answer, it’s very informative and helpful. Now, I’ve seen no sources from verge3d itself mentioning specifically how geometry buffers and render calls work? Where are these sources?
- This reply was modified 4 months, 1 week ago by c4cc.
2024-07-08 at 7:15 am #75755Yuri KovelenovStaff2024-07-08 at 7:30 am #75756c4ccParticipantThanks.
Hi c4cc,
Verge3D/WebGL renders a mesh by processing its geometry information (coordinates, normals, texture coords, vertex colors etc) stored in long arrays. Those are called “geometry buffers”. Big meshes imply large geometry buffers and require more video memory.
Also, do vertice count affect geometry buffers?
2024-07-08 at 10:55 am #75758kdvParticipantThe more vertices, the more video memory consumption. One mesh – one geometry buffer. One mesh, visible on the screen – one render/draw call (provided post-processing is not used). Meshes that are out of the camera’s field of view are not rendered.
Any light source casting shadows will double the amount of render calls. Most of post-processing passes will also double the amount of render calls.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-08 at 2:31 pm #75761c4ccParticipantThe more vertices, the more video memory consumption. One mesh – one geometry buffer. One mesh, visible on the screen – one render/draw call (provided post-processing is not used). Meshes that are out of the camera’s field of view are not rendered.
Thanks kdv, that was an informative answer.
Any light source casting shadows will double the amount of render calls. Most of post-processing passes will also double the amount of render calls.
What do you mean, post-processing passes?
2024-07-08 at 2:39 pm #75763kdvParticipantWhat do you mean, post-processing passes?
Brightness/Contrast, Bloom, Afterimage, Greyscale, Outline effect, etc.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-09 at 4:30 am #75777c4ccParticipantI see. Informative.
Btw, what about bones and armature? These are not rendered by blender or verge3d, right?
2024-07-09 at 4:35 am #75778kdvParticipantwhat about bones and armature?
Do you see them in Verge3D?
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-09 at 12:30 pm #75799c4ccParticipantlol, no, not in the screen/browser in verge3d, I just wanna confirm.
2024-09-16 at 3:46 am #77361c4ccParticipantcloning puzzles
https://i.postimg.cc/NjfTFYW1/o46x1.png
- This reply was modified 2 months ago by c4cc.
-
AuthorPosts
- You must be logged in to reply to this topic.