HDK
|
#include <geometricShader.h>
Public Member Functions | |
HDST_API | HdSt_GeometricShader (std::string const &glslfxString, PrimitiveType primType, HdCullStyle cullStyle, bool useHardwareFaceCulling, bool hasMirroredTransform, bool doubleSided, bool useMetalTessellation, HdPolygonMode polygonMode, bool cullingPass, FvarPatchType fvarPatchType, SdfPath const &debugId=SdfPath(), float lineWidth=0) |
HDST_API | ~HdSt_GeometricShader () override |
HDST_API ID | ComputeHash () const override |
HDST_API std::string | GetSource (TfToken const &shaderStageKey) const override |
HDST_API void | BindResources (int program, HdSt_ResourceBinder const &binder) override |
HDST_API void | UnbindResources (int program, HdSt_ResourceBinder const &binder) override |
Unbinds shader-specific resources. More... | |
HDST_API void | AddBindings (HdStBindingRequestVector *customBindings) override |
Add custom bindings (used by codegen) More... | |
bool | IsFrustumCullingPass () const |
Returns true if this geometric shader is used for GPU frustum culling. More... | |
PrimitiveType | GetPrimitiveType () const |
bool | GetUseMetalTessellation () const |
float | GetLineWidth () const |
HdPolygonMode | GetPolygonMode () const |
bool | IsPrimTypePoints () const |
member query functions for PrimitiveType More... | |
bool | IsPrimTypeBasisCurves () const |
bool | IsPrimTypeMesh () const |
bool | IsPrimTypeTriangles () const |
bool | IsPrimTypeQuads () const |
bool | IsPrimTypeTriQuads () const |
bool | IsPrimTypeRefinedMesh () const |
bool | IsPrimTypePatches () const |
bool | IsPrimTypeCompute () const |
FvarPatchType | GetFvarPatchType () const |
HDST_API int | GetPrimitiveIndexSize () const |
HDST_API int | GetNumPatchEvalVerts () const |
HDST_API int | GetNumPrimitiveVertsForGeometryShader () const |
HDST_API HgiPrimitiveType | GetHgiPrimitiveType () const |
HDST_API HgiCullMode | ResolveCullMode (HdCullStyle const renderStateCullStyle) const |
![]() | |
HDST_API | HdStShaderCode () |
virtual HDST_API | ~HdStShaderCode () |
virtual HDST_API ID | ComputeTextureSourceHash () const |
HDST_API VtDictionary | GetLayout (TfTokenVector const &shaderStageKeys) const |
virtual HDST_API HdSt_MaterialParamVector const & | GetParams () const |
Returns the shader parameters for this shader. More... | |
virtual HDST_API bool | IsEnabledPrimvarFiltering () const |
Returns whether primvar filtering is enabled for this shader. More... | |
virtual HDST_API TfTokenVector const & | GetPrimvarNames () const |
Returns the names of primvar that are used by this shader. More... | |
virtual HDST_API HdBufferArrayRangeSharedPtr const & | GetShaderData () const |
virtual HDST_API TfToken | GetMaterialTag () const |
virtual HDST_API void | AddResourcesFromTextures (ResourceContext &ctx) const |
virtual HDST_API NamedTextureHandleVector const & | GetNamedTextureHandles () const |
Static Public Member Functions | |
static bool | IsPrimTypePoints (PrimitiveType primType) |
static query functions for PrimitiveType More... | |
static bool | IsPrimTypeBasisCurves (PrimitiveType primType) |
static bool | IsPrimTypeMesh (PrimitiveType primType) |
static bool | IsPrimTypeTriangles (PrimitiveType primType) |
static bool | IsPrimTypeQuads (PrimitiveType primType) |
static bool | IsPrimTypeTriQuads (PrimitiveType primType) |
static bool | IsPrimTypeRefinedMesh (PrimitiveType primType) |
static bool | IsPrimTypePatches (PrimitiveType primType) |
static bool | IsPrimTypeCompute (PrimitiveType primType) |
static HDST_API HdSt_GeometricShaderSharedPtr | Create (HdSt_ShaderKey const &shaderKey, HdStResourceRegistrySharedPtr const &resourceRegistry) |
![]() | |
static HDST_API ID | ComputeHash (HdStShaderCodeSharedPtrVector const &shaders) |
Returns the combined hash values of multiple shaders. More... | |
Storm breaks down the concept of a shader program into distinct conceptual pieces that are then stitched together during code generation. The pieces are: (i) geometric shader (ii) material shader (iii) lighting shader (iv) render pass shader
The geometric shader contains the entry points for the relevant shader stages and uses geometry opinions (such as cullstyle, double sided, etc) to generate shader code variants via mixins.
Definition at line 43 of file geometricShader.h.
|
strong |
Enumerator | |
---|---|
PATCH_COARSE_TRIANGLES | |
PATCH_REFINED_TRIANGLES | |
PATCH_COARSE_QUADS | |
PATCH_REFINED_QUADS | |
PATCH_BSPLINE | |
PATCH_BOXSPLINETRIANGLE | |
PATCH_NONE |
Definition at line 121 of file geometricShader.h.
|
strong |
Used in HdSt_CodeGen to generate the appropriate shader source.
Definition at line 46 of file geometricShader.h.
HDST_API HdSt_GeometricShader::HdSt_GeometricShader | ( | std::string const & | glslfxString, |
PrimitiveType | primType, | ||
HdCullStyle | cullStyle, | ||
bool | useHardwareFaceCulling, | ||
bool | hasMirroredTransform, | ||
bool | doubleSided, | ||
bool | useMetalTessellation, | ||
HdPolygonMode | polygonMode, | ||
bool | cullingPass, | ||
FvarPatchType | fvarPatchType, | ||
SdfPath const & | debugId = SdfPath() , |
||
float | lineWidth = 0 |
||
) |
|
override |
|
overridevirtual |
Add custom bindings (used by codegen)
Implements HdStShaderCode.
|
overridevirtual |
Binds shader-specific resources to program XXX: this interface is meant to be used for bridging the GlfSimpleLightingContext mechanism, and not for generic use-cases.
Implements HdStShaderCode.
Returns the hash value of the shader code and configuration.
It is computed from the the GLSL code as well as the resource signature of the shader (as determined from its parameters). If two shaders have the same hash, the GLSL code as expanded by codegen should also be the same.
Implements HdStShaderCode.
|
static |
|
inline |
Definition at line 221 of file geometricShader.h.
HDST_API HgiPrimitiveType HdSt_GeometricShader::GetHgiPrimitiveType | ( | ) | const |
|
inline |
Definition at line 176 of file geometricShader.h.
|
inline |
Definition at line 180 of file geometricShader.h.
|
inline |
Definition at line 168 of file geometricShader.h.
|
overridevirtual |
Returns the shader source provided by this shader for shaderStageKey
Implements HdStShaderCode.
|
inline |
Definition at line 172 of file geometricShader.h.
|
inline |
Returns true if this geometric shader is used for GPU frustum culling.
Definition at line 164 of file geometricShader.h.
|
inlinestatic |
Definition at line 68 of file geometricShader.h.
|
inline |
Definition at line 189 of file geometricShader.h.
|
inlinestatic |
Definition at line 116 of file geometricShader.h.
|
inline |
Definition at line 217 of file geometricShader.h.
|
inlinestatic |
Definition at line 74 of file geometricShader.h.
|
inline |
Definition at line 193 of file geometricShader.h.
|
inlinestatic |
Definition at line 109 of file geometricShader.h.
|
inline |
Definition at line 213 of file geometricShader.h.
|
inlinestatic |
static query functions for PrimitiveType
Definition at line 64 of file geometricShader.h.
|
inline |
member query functions for PrimitiveType
Definition at line 185 of file geometricShader.h.
|
inlinestatic |
Definition at line 91 of file geometricShader.h.
|
inline |
Definition at line 201 of file geometricShader.h.
|
inlinestatic |
Definition at line 101 of file geometricShader.h.
|
inline |
Definition at line 209 of file geometricShader.h.
|
inlinestatic |
Definition at line 85 of file geometricShader.h.
|
inline |
Definition at line 197 of file geometricShader.h.
|
inlinestatic |
Definition at line 96 of file geometricShader.h.
|
inline |
Definition at line 205 of file geometricShader.h.
HDST_API HgiCullMode HdSt_GeometricShader::ResolveCullMode | ( | HdCullStyle const | renderStateCullStyle | ) | const |
|
overridevirtual |
Unbinds shader-specific resources.
Implements HdStShaderCode.