author | Florian Link |
package | MeVisLab/Standard |
dll | SoRenderers |
definition | SoRenderers.def |
keywords | spheres, instanced, multi |
The SoPointSpriteRenderer module renders all provided SoPointSet point sets as shaded spheres using point sprite rendering.
It works by rendering each point as a screen space quad. In the fragment shader, the quad is shaded like a real 3D sphere, calculating the per-pixel normal and the correct depth.
This offers very fast rendering of per-pixel shaded spheres.
The SoPointSpriteRenderer module can be used together with the SoShaderPipeline, so most shader extensions of the shader pipeline work together with this module.
Any SoPointSet that is placed below this module is rendered as spheres instead of points. To provide per sphere radii, add a SoVertexAttribute1f to the scene, name it "sphereRadius" and fill it with per-sphere radii. Don't forget to enable PER_SPHERE in the Radius Mode field.
The SoMarkerListPointSet can be used to render a marker list as a point set. In combination with this module, you can render a marker list with half a million markers as spheres interactively.
The module should be used with orthographic projections, since the rendered spheres are not perspectively correct, because no real ray-sphere intersection is calculated.
This becomes only visible when rendering wide angled perspective views, so a perspective view is still possible.
The SoPointSpriteRenderer module makes use of the GLSL Shader Pipeline.
The point sprite rendering can be extended. To see the involved pipeline steps, place a SoShaderPipelineDiagnosis and SoShaderPipeline into the scene below this module.
boundingBoxCaching: Enum | Write Sphere Depth: Bool |
pickCulling: Enum | |
Radius: Float | |
Radius Mode: Enum | |
Radius Scale Factor: Float | |
Radius Vertex Attribute: String | |
renderCaching: Enum | |
renderCulling: Enum |
Selects how the sphere radius is calculated.
Values:
Title | Name | Description |
---|---|---|
Fixed | FIXED | A fixed radius is provided. |
Per Sphere | PER_SPHERE | Each sphere has its own radius, which is provided as a SoVertexAttribute1f. |
Scales the radii that are provided as vertex attribute.
Specifies the name of the SoVertexAttribute1f vertex attribute that is used for the sphere radii. The default is "sphereRadius".