24 #ifndef PXR_IMAGING_HDST_SIMPLE_LIGHTING_SHADER_H
25 #define PXR_IMAGING_HDST_SIMPLE_LIGHTING_SHADER_H
28 #include "pxr/imaging/hdSt/api.h"
29 #include "pxr/imaging/hdSt/lightingShader.h"
31 #include "pxr/imaging/hd/version.h"
39 PXR_NAMESPACE_OPEN_SCOPE
42 using HdStSimpleLightingShaderSharedPtr =
43 std::shared_ptr<class HdStSimpleLightingShader>;
56 ~HdStSimpleLightingShader()
override;
65 HdSt_ResourceBinder
const &binder,
69 HdSt_ResourceBinder
const &binder,
72 void AddBindings(HdBindingRequestVector *customBindings)
override;
81 HdSt_MaterialParamVector
const&
GetParams()
const override;
89 void SetLightingStateFromOpenGL();
91 void SetLightingState(GlfSimpleLightingContextPtr
const &lightingContext);
93 GlfSimpleLightingContextRefPtr GetLightingContext()
const {
94 return _lightingContext;
107 const HdStTextureHandleSharedPtr &
109 return _domeLightEnvironmentTextureHandle;
124 GlfSimpleLightingContextRefPtr _lightingContext;
125 GlfBindingMapRefPtr _bindingMap;
127 std::unique_ptr<class HioGlslfx> _glslfx;
133 HdStTextureHandleSharedPtr _domeLightEnvironmentTextureHandle;
136 NamedTextureHandleVector _namedTextureHandles;
138 HdSt_MaterialParamVector _lightTextureParams;
142 PXR_NAMESPACE_CLOSE_SCOPE
144 #endif // PXR_IMAGING_HDST_SIMPLE_LIGHTING_SHADER_H
Standard pointer typedefs.
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.
A shader that supports simple lighting functionality.
HDST_API const HdStTextureHandleSharedPtr & GetTextureHandle(const TfToken &name) const
Get one of the textures that need to be computed from the dome light environment map.
Token for efficient comparison, assignment, and hashing of known strings.
const HdStTextureHandleSharedPtr & GetDomeLightEnvironmentTextureHandle() const
The dome light environment map used as source for the other dome light textures.
Stores a 4x4 matrix of double elements.
HDST_API void UnbindResources(int program, HdSt_ResourceBinder const &binder, HdRenderPassState const &state) override
Unbinds shader-specific resources.
Adapter class providing data exchange with the client scene graph.
HDST_API ID ComputeHash() const override
HdShader overrides.
HDST_API void SetCamera(GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix) override
HdStLightingShader overrides.
The context available in implementations of AddResourcesFromTextures.
HDST_API std::string GetSource(TfToken const &shaderStageKey) const override
Returns the shader source provided by this shader for shaderStageKey.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
A lighting shader base class.
HDST_API NamedTextureHandleVector const & GetNamedTextureHandles() const override
The textures computed from the dome light environment map that the shader needs to bind for the dome ...
HDST_API void AllocateTextureHandles(HdSceneDelegate *delegate)
Allocates texture handles (texture loading happens later during commit) needed for lights...
HDST_API HdSt_MaterialParamVector const & GetParams() const override
HdStShaderCode overrides.
HDST_API void AddResourcesFromTextures(ResourceContext &ctx) const override
Adds computations to create the dome light textures that are pre-calculated from the environment map ...
HDST_API void AddBindings(HdBindingRequestVector *customBindings) override
Add custom bindings (used by codegen)