-
there are two set of shaders in SplatMesh.js
For the second one, there has code as below to config and use it: But for the first one, i haven't find similar code , i think we should have some code as below to draw the quads which cover each Gaussian: Anyone can help me to understand the code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For the first one, which is the shader for rendering the splats, the actual calls to draw the splat geometry are in the Three.js library. I try to use Three.js where ever I can in this project and for the rendering of the splats, all I need to provide to Three.js is the shader code and some setup for the splat quad geometry (which is in the |
Beta Was this translation helpful? Give feedback.
For the first one, which is the shader for rendering the splats, the actual calls to draw the splat geometry are in the Three.js library. I try to use Three.js where ever I can in this project and for the rendering of the splats, all I need to provide to Three.js is the shader code and some setup for the splat quad geometry (which is in the
buildGeometry()
function). Three.js will internally make a call togl.drawArraysInstanced()
. However, Three.js doesn't have built-in support for using transform feedback functionality, so I had to write all of it myself in raw WebGL; that is why you see the call to functions likegl.drawArrays()
for that part.