7#ifndef PXR_IMAGING_HD_ST_RENDER_PASS_STATE_H
8#define PXR_IMAGING_HD_ST_RENDER_PASS_STATE_H
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hd/renderPassState.h"
13#include "pxr/imaging/hgi/graphicsCmdsDesc.h"
17PXR_NAMESPACE_OPEN_SCOPE
25using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
26using HdStRenderPassStateSharedPtr = std::shared_ptr<class HdStRenderPassState>;
28using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
30using HdStShaderCodeSharedPtr = std::shared_ptr<class HdStShaderCode>;
31using HdStLightingShaderSharedPtr = std::shared_ptr<class HdStLightingShader>;
32using HdStRenderPassShaderSharedPtr =
33 std::shared_ptr<class HdStRenderPassShader>;
34using HdSt_FallbackLightingShaderSharedPtr =
35 std::shared_ptr<class HdSt_FallbackLightingShader>;
36using HdSt_GeometricShaderSharedPtr =
37 std::shared_ptr<class HdSt_GeometricShader>;
38using HdStShaderCodeSharedPtrVector = std::vector<HdStShaderCodeSharedPtr>;
40class HdSt_ResourceBinder;
60 Prepare(HdResourceRegistrySharedPtr
const &resourceRegistry)
override;
94 bool GetResolveAovMultiSample()
const;
99 HdStLightingShaderSharedPtr
const & GetLightingShader()
const {
100 return _lightingShader;
106 HdStRenderPassShaderSharedPtr
const &GetRenderPassShader()
const {
107 return _renderPassShader;
111 void ApplyStateFromGeometricShader(
112 HdSt_ResourceBinder
const &binder,
113 HdSt_GeometricShaderSharedPtr
const &geometricShader);
116 void ApplyStateFromCamera();
123 size_t GetShaderHash()
const;
136 ClipPlanesVector
const & clipPlanes);
138 GfMatrix4d GetCullMatrix()
const {
return _cullMatrix; }
171 void InitGraphicsPipelineDesc(
173 HdSt_GeometricShaderSharedPtr
const & geometricShader,
174 bool firstDrawBatch)
const;
179 HdSt_GeometricShaderSharedPtr
const & geometricShader,
180 bool firstDrawBatch)
const;
197 ComputeImageToHorizontallyNormalizedFilmback()
const;
200 bool _UseAlphaMask()
const;
201 unsigned int _GetFramebufferHeight()
const;
202 GfRange2f _ComputeFlippedFilmbackWindow()
const;
212 void _InitPrimitiveState(
214 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
216 bool firstDrawBatch)
const;
219 void _InitRasterizationState(
221 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
229 ClipPlanesVector _clipPlanes;
236 HdStRenderPassShaderSharedPtr _renderPassShader;
237 HdSt_FallbackLightingShaderSharedPtr _fallbackLightingShader;
238 HdStLightingShaderSharedPtr _lightingShader;
240 HdBufferArrayRangeSharedPtr _renderPassStateBar;
241 size_t _clipPlanesBufferSize;
242 float _alphaThresholdCurrent;
243 bool _resolveMultiSampleAov;
246PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type: 2-dimensional floating point range.
Basic type for a vector of 4 double components.
Basic type for a vector of 4 float components.
Basic type for a vector of 4 int components.
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
A set of rendering parameters used among render passes.
A set of rendering parameters used among render passes.
HDST_API void SetRenderPassShader(HdStRenderPassShaderSharedPtr const &renderPassShader)
renderpass shader
HDST_API void SetResolveAovMultiSample(bool state)
If set to true (default) and the render pass is rendering into a multi-sampled aovs,...
HDST_API GfMatrix4d GetWorldToViewMatrix() const override
Overrides the case when no HdCamera is given.
HDST_API ClipPlanesVector const & GetClipPlanes() const override
Overrides the case when no HdCamera is given.
HDST_API void SetLightingShader(HdStLightingShaderSharedPtr const &lightingShader)
Set lighting shader.
HDST_API GfVec4i ComputeViewport() const
Helper to compute and get the y-up Viewport This is either using the modern camera framing,...
HDST_API HdStShaderCodeSharedPtrVector GetShaders() const
returns shaders (lighting/renderpass)
HDST_API void SetCameraFramingState(GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix, GfVec4d const &viewport, ClipPlanesVector const &clipPlanes)
Camera setter API.
HDST_API void Prepare(HdResourceRegistrySharedPtr const &resourceRegistry) override
Schedule to update renderPassState parameters.
HDST_API uint64_t GetGraphicsPipelineHash(HdSt_GeometricShaderSharedPtr const &geometricShader, bool firstDrawBatch) const
Generates the hash for the settings used to init the graphics pipeline.
HDST_API void Bind(HgiCapabilities const &hgiCapabilities)
XXX: Bind and Unbind set.
HDST_API GfMatrix4d GetProjectionMatrix() const override
Overrides the case when no HdCamera is given.
Reports the capabilities of the Hgi device.
A renderpass AOV represents a binding of some output of the rendering process to an output buffer.
Describes the properties of a framebuffer attachment.
Properties to configure depth and stencil test.
Describes the properties to begin a HgiGraphicsCmds.
Describes the properties needed to create a GPU pipeline.
Properties to configure multi sampling.
Properties to configure the rasterization state.