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;
108 bool GetResolveAovMultiSample()
const;
113 HdStLightingShaderSharedPtr
const & GetLightingShader()
const {
114 return _lightingShader;
120 HdStRenderPassShaderSharedPtr
const &GetRenderPassShader()
const {
121 return _renderPassShader;
125 void ApplyStateFromGeometricShader(
126 HdSt_ResourceBinder
const &binder,
127 HdSt_GeometricShaderSharedPtr
const &geometricShader);
130 void ApplyStateFromCamera();
137 size_t GetShaderHash()
const;
150 ClipPlanesVector
const & clipPlanes);
152 GfMatrix4d GetCullMatrix()
const {
return _cullMatrix; }
185 void InitGraphicsPipelineDesc(
187 HdSt_GeometricShaderSharedPtr
const & geometricShader,
188 bool firstDrawBatch)
const;
193 HdSt_GeometricShaderSharedPtr
const & geometricShader,
194 bool firstDrawBatch)
const;
211 ComputeImageToHorizontallyNormalizedFilmback()
const;
214 unsigned int _GetFramebufferHeight()
const;
215 GfRange2f _ComputeFlippedFilmbackWindow()
const;
225 void _InitPrimitiveState(
227 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
229 bool firstDrawBatch)
const;
232 void _InitRasterizationState(
234 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
242 ClipPlanesVector _clipPlanes;
249 HdStRenderPassShaderSharedPtr _renderPassShader;
250 HdSt_FallbackLightingShaderSharedPtr _fallbackLightingShader;
251 HdStLightingShaderSharedPtr _lightingShader;
253 HdBufferArrayRangeSharedPtr _renderPassStateBar;
254 size_t _clipPlanesBufferSize;
255 bool _resolveMultiSampleAov;
258PXR_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 render index is part of the Hydra 1.0 API and is only used for emulation purposes so that HdScene...
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 CopyUniforms(HdStRenderPassState const &src)
Copy the uniform buffer state from src into this object.
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 void Copy(HdRenderPassState const &src) override
Copy state from src into this object.
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.