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"
34PXR_NAMESPACE_OPEN_SCOPE
42using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
43using HdStRenderPassStateSharedPtr = std::shared_ptr<class HdStRenderPassState>;
45using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
47using HdStShaderCodeSharedPtr = std::shared_ptr<class HdStShaderCode>;
48using HdStLightingShaderSharedPtr = std::shared_ptr<class HdStLightingShader>;
49using HdStRenderPassShaderSharedPtr =
50 std::shared_ptr<class HdStRenderPassShader>;
51using HdSt_FallbackLightingShaderSharedPtr =
52 std::shared_ptr<class HdSt_FallbackLightingShader>;
53using HdSt_GeometricShaderSharedPtr =
54 std::shared_ptr<class HdSt_GeometricShader>;
55using HdStShaderCodeSharedPtrVector = std::vector<HdStShaderCodeSharedPtr>;
57class 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;
147 size_t GetShaderHash()
const;
160 ClipPlanesVector
const & clipPlanes);
162 GfMatrix4d GetCullMatrix()
const {
return _cullMatrix; }
195 void InitGraphicsPipelineDesc(
197 HdSt_GeometricShaderSharedPtr
const & geometricShader,
198 bool firstDrawBatch)
const;
203 HdSt_GeometricShaderSharedPtr
const & geometricShader,
204 bool firstDrawBatch)
const;
221 ComputeImageToHorizontallyNormalizedFilmback()
const;
224 bool _UseAlphaMask()
const;
225 unsigned int _GetFramebufferHeight()
const;
226 GfRange2f _ComputeFlippedFilmbackWindow()
const;
236 void _InitPrimitiveState(
238 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
240 bool firstDrawBatch)
const;
243 void _InitRasterizationState(
245 HdSt_GeometricShaderSharedPtr
const & geometricShader)
const;
253 ClipPlanesVector _clipPlanes;
260 HdStRenderPassShaderSharedPtr _renderPassShader;
261 HdSt_FallbackLightingShaderSharedPtr _fallbackLightingShader;
262 HdStLightingShaderSharedPtr _lightingShader;
264 HdBufferArrayRangeSharedPtr _renderPassStateBar;
265 size_t _clipPlanesBufferSize;
266 float _alphaThresholdCurrent;
267 bool _resolveMultiSampleAov;
268 bool _useSceneMaterials;
271PXR_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 SetUseSceneMaterials(bool state)
scene materials
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.