SoShaderProgram¶
-
InventorModule
¶ genre Shader
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoShader
definition SoShader.def keywords vertex
,fragment
,geometry
Purpose¶
Links all vertex, geometry, and fragment shaders encountered so far. Determines all active uniform parameters and uses the shader parameter modules to update the uniforms before the OpenGL shading language program is run. Allows to setup the geometry shader state for the shader program.
Details¶
Provides the following additional uniform parameters:
vec4 oiv_ViewPosition
- the first three components specify the viewpoint position, the fourth component is 0 for orthographic projection or 1 for perspective projectionivec2 oiv_ViewportSize
- contains the current viewport size as determined from the Open Inventor statefloat oiv_DevicePixelRatio
- contains the ratio between physical pixels and device-independent pixels of the connected viewer (e.g. 2.0 for Apple Retina Display)ivec2 oiv_NearDistance
- contains the current near clipping plane distance determined from the Open Inventor stateivec2 oiv_FarDistance
- contains the current far clipping plane distance determined from the Open Inventor statevec4 oiv_DiffuseColor
- contains the current diffuse color and alpha value (1-transparency)int oiv_NumEnabledLights
- provides the number of currently active OpenGL lightssampler2D oiv_Texture0
- provides the texture sampler for the current Open Inventor texture (which is set viaSoTexture2
orSoMLTexture2
).
Parameter Fields¶
Field Index¶
Geometry Input Type : Enum |
Geometry Output Type : Enum |
Max Emitted Geometry Vertices : Integer |
parameter : String |
shaderObject : String |
Visible Fields¶
Geometry Input Type¶
-
name:
geometryInputType
, type:
Enum
, default:
TRIANGLES_INPUT
¶ Defines the input type that the geometry shader expects. Note that for LINES_ADJACENCY_INPUT and TRIANGLES_ADJACENCY_INPUT modes the OpenGL rendering needs to send adjacency information, this can be done using the sendAdjacency that is available in SoIndexedFaceSet, SoIndexedLineSet and SoIndexedTriangleSet.
Values:
Title | Name |
---|---|
Points Input | POINTS_INPUT |
Lines Input | LINES_INPUT |
Triangles Input | TRIANGLES_INPUT |
Lines Adjacency Input | LINES_ADJACENCY_INPUT |
Triangles Adjacency Input | TRIANGLES_ADJACENCY_INPUT |