No Matches
HdStLightingShader Class Referenceabstract

A lighting shader base class. More...

#include <lightingShader.h>

+ Inheritance diagram for HdStLightingShader:

Public Member Functions

virtual void SetCamera (GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix)=0
 Sets camera state.
- Public Member Functions inherited from HdStShaderCode
virtual ID ComputeHash () const =0
 Returns the hash value of the shader code and configuration.
virtual ID ComputeTextureSourceHash () const
 Returns the hash value of the paths of the texture prims consumed by this shader.
virtual std::string GetSource (TfToken const &shaderStageKey) const =0
 Returns the shader source provided by this shader for shaderStageKey.
HDST_API VtDictionary GetLayout (TfTokenVector const &shaderStageKeys) const
 Returns the resource layout for the shader stages specified by shaderStageKeys.
virtual HDST_API HdSt_MaterialParamVector const & GetParams () const
 Returns the shader parameters for this shader.
virtual HDST_API bool IsEnabledPrimvarFiltering () const
 Returns whether primvar filtering is enabled for this shader.
virtual HDST_API TfTokenVector const & GetPrimvarNames () const
 Returns the names of primvar that are used by this shader.
virtual HDST_API HdBufferArrayRangeSharedPtr const & GetShaderData () const
 Returns a buffer which stores parameter fallback values and texture handles.
virtual void BindResources (int program, HdSt_ResourceBinder const &binder)=0
 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.
virtual void UnbindResources (int program, HdSt_ResourceBinder const &binder)=0
 Unbinds shader-specific resources.
virtual void AddBindings (HdStBindingRequestVector *customBindings)=0
 Add custom bindings (used by codegen)
virtual HDST_API TfToken GetMaterialTag () const
 Material tags can be set in the meta-data of a glslfx file to control what rprim collection that prims using this shader should go into.
virtual HDST_API void AddResourcesFromTextures (ResourceContext &ctx) const
 This function is called after textures have been allocated and loaded to add buffer sources and computations to the resource registry that require texture meta data not available until the texture is allocated or loaded.
virtual HDST_API NamedTextureHandleVector const & GetNamedTextureHandles () const
 Textures that need to be bound for this shader.

Additional Inherited Members

- Public Types inherited from HdStShaderCode
typedef size_t ID
using NamedTextureHandleVector = std::vector< NamedTextureHandle >
- Static Public Member Functions inherited from HdStShaderCode
static HDST_API ID ComputeHash (HdStShaderCodeSharedPtrVector const &shaders)
 Returns the combined hash values of multiple shaders.

Detailed Description

A lighting shader base class.

Definition at line 40 of file lightingShader.h.

Member Function Documentation

◆ SetCamera()

virtual void SetCamera ( GfMatrix4d const &  worldToViewMatrix,
GfMatrix4d const &  projectionMatrix 
pure virtual

Sets camera state.

Implemented in HdStSimpleLightingShader.

The documentation for this class was generated from the following file: