25#ifndef _SO_VOLUME_SHADER_H_
26#define _SO_VOLUME_SHADER_H_
36#include <Inventor/STL/cassert>
37#include <Inventor/STL/string>
38#include <Inventor/STL/vector>
39#include <Inventor/STL/map>
45#pragma warning(disable : 4251)
49class SoIsosurfaceTexture;
712#ifndef HIDDEN_FROM_DOC
731 T* setupPublicShaderStage(
const ShaderPosition stagePos,
const char* hiddenName, T* defaultShader)
733 T* fp = getCustomShader<T>(stagePos);
736 return setupPrivateShaderStage<T>(hiddenName,defaultShader);
738 removeHiddenShaderObject(hiddenName);
747 T* setupPublicShaderStage(
const ShaderPosition stagePos,
const char* hiddenName,
const SbString& shaderSource)
749 T* fp = getCustomShader<T>(stagePos);
752 return setupPrivateShaderStage<T>(hiddenName, shaderSource);
754 removeHiddenShaderObject(hiddenName);
763 T* setupPrivateShaderStageNoOverride(
const char* hiddenName,
const SbString& shaderSource)
765 T* fp = (T*) getHiddenShaderObject(hiddenName);
769 fp->sourceProgram.setValue(shaderSource);
770 setHiddenShaderObject(hiddenName, fp);
780 T* setupPublicShaderStageNoOverride(
const ShaderPosition stagePos,
const char* hiddenName,
const SbString& shaderSource)
782 T* fp = getCustomShader<T>(stagePos);
784 return setupPrivateShaderStageNoOverride<T>(hiddenName, shaderSource);
786 removeHiddenShaderObject(hiddenName);
800 virtual void doAction(
SoAction *action);
815 static void initClass() ;
818 static void exitClass() ;
835 void chooseLightConfig(
SoState* state,
bool forbidVertexTwoSide =
false);
858 static bool isRaycastingDefault()
859 {
return s_forceRaycasting; };
864 void createRenderModeShaders(){}
871 bool mustUseOrthoCamera(
SoState* state );
876 virtual void notify(SoNotList *list);
886 void uninstallJitteringTexture();
902 void updateShaderSlots(
SoState* state );
907 static const float DEFAULT_GRADIENT_THRESHOLD;
909 static const float DEFAULT_EDGE_THRESHOLD;
911 static const float DEFAULT_BOUNDARY_THRESHOLD;
912 static const float DEFAULT_BOUNDARY_INTENSITY;
925 static const size_t JITTER_TEX_SIZE;
930 void createJitterTex();
936 bool hasToHandleFakeSoVolumeIsosurfaceStyle(
SoState* state);
946 static int s_texture_array_EXT_extensionID;
947 static bool s_forceRaycasting;
#define SO_NODE_HEADER(className)
Class for smart character strings.
Abstract base class for all actions.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
Renders a scene graph using Open Inventor's Render Engine.
Base class for all group nodes.
Field interactive complexity node.
int getNum() const
Returns the number of values currently in the field.
This class is a cache handler that can be used to monitor the modifications made to elements or field...
Abstract base class for all database nodes.
Smart pointer for any class inheriting SoRefCounter.
Field containing a single Boolean value.
SbBool getValue() const
Returns this field's value.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract node cl...
SourceType
Shader Object source type possible values.
@ FILENAME
Only the name of the file containing the source is given (default).
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shader program p...
SoMFNode shaderObject
Specifies the list of shader objects (i.e., vertex shaders, geometry and fragment shaders) which form...
Abstract base class for texture mapping nodes.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume draw style.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume data property ...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume rendering qual...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Shader node for volum...
SoSFBool interpolateOnMove
When set to FALSE, interpolation between LDM tiles (across the tile boundary) is not done when render...
virtual SoVertexShader * setVertexShader(int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
Creates a vertex shader with the given filename and adds it at the given pos.
static SbBool isSupported(SoState *state=NULL)
Returns TRUE if SoVolumeShader is supported by the current graphics board.
virtual SoFragmentShader * setFragmentShader(int pos, const SbString &filenameOrSource, SoShaderObject::SourceType sourceType=SoShaderObject::FILENAME)
Creates a fragment shader with the given filename and add it at the given pos.
SoVolumeShader()
Constructor.
SoSFBool forVolumeOnly
Set to TRUE if the shader should be called for volume rendering (SoVolumeRender).
ShaderPosition
Specifies the position of the shader pipeline stages in the field shaderObject.
@ VERTEX_MAIN
Main vertex shader used for rendering.
@ TESS_VERTEX_SHIFT
Shader function used to modify the position of vertices during HeightField rendering.
@ CLIPPING_FUNCTION
This method can be used to implement a custom clipping algorithm.
@ CUSTOM_SHADER
This position and all subsequent positions CUSTOM_SHADER+x are freely available for user-defined shad...
@ GEOMETRY_MAIN
The main geometry program used for rendering.
@ FRAGMENT_MAIN
Main fragment shader used for rendering.
@ DATA_COMBINE_FUNCTION
This shader is used for GPU multi-data composition.
@ FRAGMENT_COMPUTE_COLOR
This shader is used to compute the current fragment color.
@ VERTEX_POSTPROCESSING
Method called at the end of the VolumeViz vertex shader stage.
@ GET_DATA_FUNCTION
This shader is used to access datasets.
void notify(SoNotList *list)