24 #ifndef PXR_IMAGING_HD_ST_RENDER_PASS_STATE_H 25 #define PXR_IMAGING_HD_ST_RENDER_PASS_STATE_H 28 #include "pxr/imaging/hdSt/api.h" 29 #include "pxr/imaging/hd/renderPassState.h" 30 #include "pxr/imaging/hgi/graphicsCmdsDesc.h" 34 PXR_NAMESPACE_OPEN_SCOPE
42 using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
43 using HdStRenderPassStateSharedPtr = std::shared_ptr<class HdStRenderPassState>;
45 using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
47 using HdStShaderCodeSharedPtr = std::shared_ptr<class HdStShaderCode>;
48 using HdStLightingShaderSharedPtr = std::shared_ptr<class HdStLightingShader>;
49 using HdStRenderPassShaderSharedPtr =
50 std::shared_ptr<class HdStRenderPassShader>;
51 using HdSt_FallbackLightingShaderSharedPtr =
52 std::shared_ptr<class HdSt_FallbackLightingShader>;
53 using HdSt_GeometricShaderSharedPtr =
54 std::shared_ptr<class HdSt_GeometricShader>;
55 using HdStShaderCodeSharedPtrVector = std::vector<HdStShaderCodeSharedPtr>;
57 class HdSt_ResourceBinder;
77 Prepare(HdResourceRegistrySharedPtr
const &resourceRegistry)
override;
111 bool GetResolveAovMultiSample()
const;
116 HdStLightingShaderSharedPtr
const & GetLightingShader()
const {
117 return _lightingShader;
123 HdStRenderPassShaderSharedPtr
const &GetRenderPassShader()
const {
124 return _renderPassShader;
128 void ApplyStateFromGeometricShader(
129 HdSt_ResourceBinder
const &binder,
130 HdSt_GeometricShaderSharedPtr
const &geometricShader);
133 void ApplyStateFromCamera();
138 bool GetUseSceneMaterials()
const {
139 return _useSceneMaterials;
144 HdStShaderCodeSharedPtrVector
GetShaders()
const;
147 size_t GetShaderHash()
const;
160 ClipPlanesVector
const & clipPlanes);
162 GfMatrix4d GetCullMatrix()
const {
return _cullMatrix; }
176 HDST_API ClipPlanesVector
const &
GetClipPlanes()
const override;
189 void InitGraphicsPipelineDesc(
191 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
198 bool _UseAlphaMask()
const;
204 int aovIndex = -1)
const;
206 void _InitPrimitiveState(
208 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
212 void _InitRasterizationState(
214 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
222 ClipPlanesVector _clipPlanes;
229 HdStRenderPassShaderSharedPtr _renderPassShader;
230 HdSt_FallbackLightingShaderSharedPtr _fallbackLightingShader;
231 HdStLightingShaderSharedPtr _lightingShader;
233 HdBufferArrayRangeSharedPtr _renderPassStateBar;
234 size_t _clipPlanesBufferSize;
235 float _alphaThresholdCurrent;
236 bool _resolveMultiSampleAov;
237 bool _useSceneMaterials;
240 PXR_NAMESPACE_CLOSE_SCOPE
242 #endif // PXR_IMAGING_HD_ST_RENDER_PASS_STATE_H The Hydra render index is a flattened representation of the client scene graph, which may be composed...
HDST_API GfMatrix4d GetProjectionMatrix() const override
Overrides the case when no HdCamera is given.
Describes the properties of a framebuffer attachment.
A set of rendering parameters used among render passes.
Basic type for a vector of 4 double components.
HDST_API uint64_t GetGraphicsPipelineHash() const
Generates the hash for the settings used to init the graphics pipeline.
HDST_API void Prepare(HdResourceRegistrySharedPtr const &resourceRegistry) override
Schedule to update renderPassState parameters.
HDST_API void Bind(HgiCapabilities const &hgiCapabilities)
XXX: Bind and Unbind set.
A set of rendering parameters used among render passes.
HD_API void SetResolveAovMultiSample(bool state)
If set to true (default) and the render pass is rendering into a multi-sampled aovs,...
HDST_API HdStShaderCodeSharedPtrVector GetShaders() const
returns shaders (lighting/renderpass)
Properties to configure multi sampling.
Stores a 4x4 matrix of double elements.
Reports the capabilities of the Hgi device.
HDST_API void SetUseSceneMaterials(bool state)
scene materials
Describes the properties to begin a HgiGraphicsCmds.
HDST_API void SetCameraFramingState(GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix, GfVec4d const &viewport, ClipPlanesVector const &clipPlanes)
Camera setter API.
HDST_API GfMatrix4d GetWorldToViewMatrix() const override
Overrides the case when no HdCamera is given.
Properties to configure the rasterization state.
Properties to configure depth and stencil test.
HDST_API void SetRenderPassShader(HdStRenderPassShaderSharedPtr const &renderPassShader)
renderpass shader
Describes the properties needed to create a GPU pipeline.
HDST_API void SetLightingShader(HdStLightingShaderSharedPtr const &lightingShader)
Set lighting shader.
HDST_API ClipPlanesVector const & GetClipPlanes() const override
Overrides the case when no HdCamera is given.