24 #ifndef PXR_IMAGING_HD_ST_RENDER_PASS_SHADER_H
25 #define PXR_IMAGING_HD_ST_RENDER_PASS_SHADER_H
28 #include "pxr/imaging/hdSt/api.h"
29 #include "pxr/imaging/hd/enums.h"
30 #include "pxr/imaging/hd/binding.h"
31 #include "pxr/imaging/hdSt/shaderCode.h"
39 PXR_NAMESPACE_OPEN_SCOPE
41 using HdStRenderPassShaderSharedPtr =
42 std::shared_ptr<class HdStRenderPassShader>;
44 using HdRenderPassAovBindingVector =
45 std::vector<struct HdRenderPassAovBinding>;
56 HdStRenderPassShader(
TfToken const &glslfxFile);
58 ~HdStRenderPassShader()
override;
67 HdSt_ResourceBinder
const &binder,
71 HdSt_ResourceBinder
const &binder,
74 void AddBindings(HdBindingRequestVector *customBindings)
override;
76 HdSt_MaterialParamVector
const&
GetParams()
const override;
93 HdCullStyle GetCullStyle()
const {
97 void SetCullStyle(HdCullStyle cullStyle) {
98 _cullStyle = cullStyle;
108 void UpdateAovInputTextures(
109 HdRenderPassAovBindingVector
const &aovInputBindings,
114 std::unique_ptr<HioGlslfx> _glslfx;
115 mutable size_t _hash;
116 mutable bool _hashValid;
118 TfHashMap<TfToken, HdBindingRequest, TfToken::HashFunctor> _customBuffers;
119 HdCullStyle _cullStyle;
121 NamedTextureHandleVector _namedTextureHandles;
123 HdSt_MaterialParamVector _params;
126 HdStRenderPassShader(
const HdStRenderPassShader &) =
delete;
127 HdStRenderPassShader &operator =(
const HdStRenderPassShader &) =
delete;
131 PXR_NAMESPACE_CLOSE_SCOPE
133 #endif // PXR_IMAGING_HD_ST_RENDER_PASS_SHADER_H
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Standard pointer typedefs.
HDST_API HdSt_MaterialParamVector const & GetParams() const override
Returns the shader parameters for this shader.
HDST_API void AddBindings(HdBindingRequestVector *customBindings) override
Add custom bindings (used by codegen)
HDST_API std::string GetSource(TfToken const &shaderStageKey) const override
Returns the shader source provided by this shader for shaderStageKey.
HDST_API void RemoveBufferBinding(TfToken const &name)
Remove name from custom binding.
HDST_API void BindResources(int program, HdSt_ResourceBinder const &binder, HdRenderPassState const &state) override
Binds shader-specific resources to program XXX: this interface is meant to be used for bridging the G...
A set of rendering parameters used among render passes.
HDST_API NamedTextureHandleVector const & GetNamedTextureHandles() const override
Textures that need to be bound for this shader.
Token for efficient comparison, assignment, and hashing of known strings.
HDST_API void ClearBufferBindings()
Clear all custom bindings associated with this shader.
A base class representing the implementation (code) of a shader, used in conjunction with HdRenderPas...
A shader that supports common renderPass functionality.
BindingRequest allows externally allocated buffers to be bound at render time.
HDST_API void UnbindResources(int program, HdSt_ResourceBinder const &binder, HdRenderPassState const &state) override
Unbinds shader-specific resources.
HDST_API ID ComputeHash() const override
HdShader overrides.
HDST_API void AddBufferBinding(HdBindingRequest const &req)
Add a custom binding request for use when this shader executes.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...