HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStRenderPassShader Class Reference

#include <renderPassShader.h>

+ Inheritance diagram for HdStRenderPassShader:

Public Member Functions

HDST_API HdStRenderPassShader ()
 
HDST_API HdStRenderPassShader (TfToken const &glslfxFile)
 
virtual HDST_API ~HdStRenderPassShader () override
 
virtual HDST_API ID ComputeHash () const override
 HdShader overrides. More...
 
virtual HDST_API std::string GetSource (TfToken const &shaderStageKey) const override
 
virtual HDST_API void BindResources (int program, HdSt_ResourceBinder const &binder, HdRenderPassState const &state) override
 
virtual HDST_API void UnbindResources (int program, HdSt_ResourceBinder const &binder, HdRenderPassState const &state) override
 Unbinds shader-specific resources. More...
 
virtual HDST_API void AddBindings (HdBindingRequestVector *customBindings) override
 Add custom bindings (used by codegen) More...
 
virtual HDST_API
HdSt_MaterialParamVector const
GetParams () const override
 Returns the shader parameters for this shader. More...
 
HDST_API void AddBufferBinding (HdBindingRequest const &req)
 Add a custom binding request for use when this shader executes. More...
 
HDST_API void RemoveBufferBinding (TfToken const &name)
 Remove name from custom binding. More...
 
HDST_API void ClearBufferBindings ()
 Clear all custom bindings associated with this shader. More...
 
HDST_API void AddAovReadback (TfToken const &name)
 
HDST_API void RemoveAovReadback (TfToken const &name)
 Remove name from requests to read AOVs. More...
 
HdCullStyle GetCullStyle () const
 
void SetCullStyle (HdCullStyle cullStyle)
 
- Public Member Functions inherited from HdStShaderCode
HDST_API HdStShaderCode ()
 
virtual HDST_API ~HdStShaderCode ()
 
virtual ID ComputeTextureSourceHash () const
 
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
TextureDescriptorVector 
GetTextures () const
 
virtual HDST_API
NamedTextureHandleVector const
GetNamedTextureHandles () const
 

Additional Inherited Members

- Public Types inherited from HdStShaderCode
typedef size_t ID
 
typedef std::vector
< TextureDescriptor
TextureDescriptorVector
 
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. More...
 

Detailed Description

A shader that supports common renderPass functionality.

Definition at line 48 of file renderPassShader.h.

Constructor & Destructor Documentation

HDST_API HdStRenderPassShader::HdStRenderPassShader ( )
HDST_API HdStRenderPassShader::HdStRenderPassShader ( TfToken const glslfxFile)
virtual HDST_API HdStRenderPassShader::~HdStRenderPassShader ( )
overridevirtual

Member Function Documentation

HDST_API void HdStRenderPassShader::AddAovReadback ( TfToken const name)

Add a request to read an AOV back in the shader. The shader can access the requested AOV as HdGet_NAMEReadback().

virtual HDST_API void HdStRenderPassShader::AddBindings ( HdBindingRequestVector customBindings)
overridevirtual

Add custom bindings (used by codegen)

Implements HdStShaderCode.

HDST_API void HdStRenderPassShader::AddBufferBinding ( HdBindingRequest const req)

Add a custom binding request for use when this shader executes.

virtual HDST_API void HdStRenderPassShader::BindResources ( int  program,
HdSt_ResourceBinder const binder,
HdRenderPassState const state 
)
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.

HDST_API void HdStRenderPassShader::ClearBufferBindings ( )

Clear all custom bindings associated with this shader.

virtual HDST_API ID HdStRenderPassShader::ComputeHash ( ) const
overridevirtual

HdShader overrides.

Implements HdStShaderCode.

HdCullStyle HdStRenderPassShader::GetCullStyle ( ) const
inline

Definition at line 96 of file renderPassShader.h.

virtual HDST_API HdSt_MaterialParamVector const& HdStRenderPassShader::GetParams ( ) const
overridevirtual

Returns the shader parameters for this shader.

Reimplemented from HdStShaderCode.

virtual HDST_API std::string HdStRenderPassShader::GetSource ( TfToken const shaderStageKey) const
overridevirtual

Returns the shader source provided by this shader for shaderStageKey

Implements HdStShaderCode.

HDST_API void HdStRenderPassShader::RemoveAovReadback ( TfToken const name)

Remove name from requests to read AOVs.

HDST_API void HdStRenderPassShader::RemoveBufferBinding ( TfToken const name)

Remove name from custom binding.

void HdStRenderPassShader::SetCullStyle ( HdCullStyle  cullStyle)
inline

Definition at line 100 of file renderPassShader.h.

virtual HDST_API void HdStRenderPassShader::UnbindResources ( int  program,
HdSt_ResourceBinder const binder,
HdRenderPassState const state 
)
overridevirtual

Unbinds shader-specific resources.

Implements HdStShaderCode.


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