6#ifndef QSSGRENDERPASS_H
7#define QSSGRENDERPASS_H
20#include <QtCore/qglobal.h>
22#include <ssg/qssgrenderhelpers.h>
23#include <QtQuick3DUtils/private/qssgaosettings_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
25#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
26#include <QtQuick3DRuntimeRender/private/qssgrenderableobjects_p.h>
27#include <QtQuick3DRuntimeRender/private/qssgrendermotionvectormap_p.h>
28#include <QtQuick3DRuntimeRender/private/qssgcomputemanager_p.h>
33class QSSGRenderShadowMap;
34class QSSGRenderReflectionMap;
36class QSSGRenderCamera;
37struct QSSGRenderSkyMaterial;
39class QSSGRenderExtension;
40class QSSGRenderUserPass;
41class QSSGRenderComputePass;
58 virtual void renderPass(QSSGRenderer &renderer) = 0;
73 void renderPass(QSSGRenderer &renderer)
final;
91 void renderPass(QSSGRenderer &renderer)
final;
111 void renderPass(QSSGRenderer &renderer)
final;
126 void renderPass(QSSGRenderer &renderer)
final;
135 void renderPass(QSSGRenderer &renderer)
final;
149 void renderPass(QSSGRenderer &renderer)
final;
154 const QSSGRenderCamera *
camera =
nullptr;
161class Q_QUICK3DRUNTIMERENDER_EXPORT
DepthMapPass :
public QSSGRenderPass
164 void renderPrep(QSSGRenderer &renderer, QSSGLayerRenderData &data) final;
165 void renderPass(QSSGRenderer &renderer) final;
166 Type passType()
const final {
return Type::Standalone; }
167 void resetForFrame() final;
168 void setMultisamplingEnabled(
bool enabled) { m_multisampling = enabled; }
169 bool isMultisamplingEnabled()
const {
return m_multisampling; }
171 QSSGRenderableObjectList sortedOpaqueObjects;
172 QSSGRenderableObjectList sortedTransparentObjects;
173 QSSGRhiGraphicsPipelineState ps;
174 QSSGRhiRenderableTexture *rhiDepthTexture =
nullptr;
175 bool m_multisampling =
false;
178class Q_QUICK3DRUNTIMERENDER_EXPORT
NormalPass :
public QSSGRenderPass
181 void renderPrep(QSSGRenderer &renderer, QSSGLayerRenderData &data) final;
182 void renderPass(QSSGRenderer &renderer) final;
183 Type passType()
const final {
return Type::Standalone; }
184 void resetForFrame() final;
186 QSSGRenderableObjectList sortedOpaqueObjects;
187 QSSGRhiGraphicsPipelineState ps;
188 QSSGRhiRenderableTexture *normalTexture =
nullptr;
189 QSSGRhiRenderableTexture *depthBuffer =
nullptr;
196 void renderPass(QSSGRenderer &renderer)
final;
201 QRhiRenderPassDescriptor *
rpDesc =
nullptr;
211 void renderPass(QSSGRenderer &renderer)
final;
216 QRhiRenderPassDescriptor *
rpDesc =
nullptr;
231 void renderPass(QSSGRenderer &renderer)
final;
237 QRhiRenderPassDescriptor *
rpDesc =
nullptr;
246 void renderPass(QSSGRenderer &renderer)
final;
264 void renderPass(QSSGRenderer &renderer)
final;
279 QSSGRhiGraphicsPipelineState &ps,
280 QSSGShaderFeatures shaderFeatures,
281 QRhiRenderPassDescriptor *rpDesc,
282 const QSSGRenderableObjectList &sortedOpaqueObjects);
285 const QSSGRhiGraphicsPipelineState &ps,
286 const QSSGRenderableObjectList &sortedOpaqueObjects);
289 void renderPass(QSSGRenderer &renderer)
final;
298struct QSSGCameraRenderData;
306 QSSGRhiGraphicsPipelineState &ps,
307 QSSGShaderFeatures shaderFeatures,
308 QRhiRenderPassDescriptor *rpDesc,
309 const QSSGRenderableObjectList &sortedTransparentObjects,
313 const QSSGRhiGraphicsPipelineState &ps,
314 const QSSGRenderableObjectList &sortedTransparentObjects);
318 void renderPass(QSSGRenderer &renderer)
final;
331 void renderPass(QSSGRenderer &renderer)
final;
343 void renderPass(QSSGRenderer &renderer)
final;
356 void renderPass(QSSGRenderer &renderer)
final;
368 void renderPass(QSSGRenderer &renderer)
final;
372 bool hasData()
const {
return extensions.size() != 0; }
380 void renderPrep(QSSGRenderer &renderer,
QSSGLayerRenderData &data, QSSGRenderUserPass *pass, QSSGPassKey key);
381 void renderPass(QSSGRenderer &renderer, QSSGRenderUserPass *pass);
402 void prepareTopLevelPass(QSSGRenderer &renderer,
QSSGLayerRenderData &data, QSSGRenderUserPass *passNode, QSSGPassKey key)
404 visitedPasses.clear();
405 preparePassImpl(renderer, data, passNode, {},
nullptr, key);
408 void prepareSubPass(QSSGRenderer &renderer,
410 QSSGRenderUserPass *subPassNode,
411 const QSSGRhiRenderableTextureV2Ptr &renderableTexture,
415 Q_ASSERT(renderableTexture !=
nullptr);
416 preparePassImpl(renderer, data, subPassNode, renderableTexture, parentUserPassData, key);
419 void preparePassImpl(QSSGRenderer &renderer,
421 QSSGRenderUserPass *passNode,
422 QSSGRhiRenderableTextureV2Ptr renderableTexture,
433 void renderPrep(QSSGRenderer &renderer,
QSSGLayerRenderData &data, QSSGRenderComputePass *pass, QSSGPassKey key);
434 void renderPass(QSSGRenderer &renderer, QSSGRenderComputePass *pass);
437 std::unordered_map<QSSGRenderComputePass *, ComputeUserPassData> userPassData;
446 void renderPass(QSSGRenderer &renderer)
final;
450 bool hasData()
const {
return (userPasses.size() != 0); }
460 void renderPass(QSSGRenderer &renderer)
final;
463 void setMethod(QSSGRenderLayer::OITMethod m) { method = m; }
475 QSSGRhiRenderableTexture *rhiAccumTexture =
nullptr;
476 QSSGRhiRenderableTexture *rhiABufferImage;
477 QRhiBuffer *rhiABuffer;
480 QSSGRhiRenderableTexture *rhiRevealageTexture =
nullptr;
481 QSSGRhiRenderableTexture *rhiAuxiliaryImage;
482 QRhiBuffer *rhiAuxBuffer;
498 void renderPass(QSSGRenderer &renderer)
final;
501 void setMethod(QSSGRenderLayer::OITMethod m) { method = m; }
509 QSSGRhiRenderableTexture *rhiAccumTexture =
nullptr;
510 QSSGRhiRenderableTexture *rhiABufferImage;
511 QRhiBuffer *rhiABuffer;
514 QSSGRhiRenderableTexture *rhiRevealageTexture =
nullptr;
515 QSSGRhiRenderableTexture *rhiAuxiliaryImage;
516 QRhiBuffer *rhiAuxBuffer;
QSSGRhiShaderPipelinePtr debugObjectShader
QSSGRhiGraphicsPipelineState ps
Type passType() const final
void resetForFrame() final
QSSGRhiGraphicsPipelineState ps
QSSGRhiShaderPipelinePtr gridShader
void resetForFrame() final
Type passType() const final
Type passType() const final
std::vector< QSGRenderer * > prepdItem2DRenderers
void resetForFrame() final
static constexpr int MaxBuckets
QSSGRhiGraphicsPipelineState ps
QSSGRenderMotionVectorMapPtr motionVectorMapManager
QSSGRenderableObjectList motionVectorPassObjects[MaxBuckets]
Type passType() const final
QSSGRhiRenderableTexture * rhiMotionVectorTexture
QSSGRenderCamera * camera
void resetForFrame() final
QRhiTexture * rhiOverflowTexture
QSSGShaderFeatures shaderFeatures
QRhiShaderResourceBindings * compositeSrb
QSSGRhiShaderPipelinePtr compositeShaderPipeline
QSSGRenderLayer::OITMethod method
void resetForFrame() final
Type passType() const final
QSSGRhiGraphicsPipelineState ps
void setMethod(QSSGRenderLayer::OITMethod m)
void setMethod(QSSGRenderLayer::OITMethod m)
quint32 reportedNodeCount
QSSGShaderFeatures shaderFeatures
QSSGRenderLayer::OITMethod method
QRhiShaderResourceBindings * clearSrb
QSSGRenderableObjectList sortedTransparentObjects
QSSGRhiRenderableTexture * rhiCounterImage
QRhiTextureRenderTarget * renderTarget
Type passType() const final
void resetForFrame() final
QSSGRhiShaderPipelinePtr clearPipeline
QSSGRhiRenderableTexture * rhiDepthTexture
QSSGRhiGraphicsPipelineState ps
QRhiTexture * readbackImage
bool linkedListRequiresResize(QSize dim)
QSSGOITRenderContext * oitRenderContext
QRhiBuffer * rhiCounterBuffer
void resetForFrame() final
Type passType() const final
QSSGShaderFeatures shaderFeatures
QSSGRhiGraphicsPipelineState ps
static void render(const QSSGRenderContextInterface &ctx, const QSSGRhiGraphicsPipelineState &ps, const QSSGRenderableObjectList &sortedOpaqueObjects)
QSSGRenderableObjectList sortedOpaqueObjects
QRect viewport() const
Returns the viewport rectangle.
void drawLine(const QVector3D &startPoint, const QVector3D &endPoint, const QColor &color, bool isPersistent=false)
void recordRenderDebugObjects(QSSGRhiContext *rhiCtx, QSSGRhiGraphicsPipelineState *ps, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpDesc)
void drawPoint(const QVector3D &vertex, const QColor &color, bool isPersistent=false)
void prepareGeometry(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *rub)
static QColor levelOfDetailColor(quint32 lod)
void drawBounds(const QSSGBounds3 &bounds, const QColor &color, bool isPersistent=false)
bool isLayerVisible() const
QSSGLayerRenderPreparationResult(const QRectF &inViewport, QSSGRenderLayer &inLayer)
QSize textureDimensions() const
void setState(State state)
QRectF getViewport() const
QSSGRenderLayer * getLayer() const
const QSSGLayerRenderPreparationResultFlags & getFlags() const
QSSGLayerRenderPreparationResult()=default
friend class QSSGLayerRenderData
friend class QSSGRenderer
friend class QQuick3DWindowAttachment
virtual ~QSSGRenderPass()
virtual void resetForFrame()=0
virtual Type passType() const =0
QSSGRenderableObjectFlags renderableFlags
friend class QSSGParticleRenderer
void releaseItem2DData(const QSSGRenderItem2D &item2D)
const std::unique_ptr< QSSGRhiQuadRenderer > & rhiQuadRenderer() const
quint32 frameDepth() const
friend class QSSGRenderContextInterface
QRect scissorRect() const
void cleanupResources(QSet< QSSGRenderGraphObject * > &resources)
void setViewport(QRect inViewport)
void beginSubLayerRender(QSSGLayerRenderData &inLayer)
const std::unique_ptr< QSSGRhiCubeRenderer > & rhiCubeRenderer() const
void setScissorRect(QRect inScissorRect)
void endSubLayerRender(QSSGLayerRenderData &inLayer)
QSSGRenderContextInterface * contextInterface() const
void resetForFrame() final
std::shared_ptr< QSSGRenderReflectionMap > reflectionMapManager
QSSGRenderableObjectList reflectionPassObjects
std::vector< QSSGRenderReflectionProbe * > reflectionProbes
QSSGRhiGraphicsPipelineState ps
Type passType() const final
Type passType() const final
QSSGRhiRenderableTexture * rhiAoTexture
const QSSGRhiRenderableTexture * rhiDepthTexture
void resetForFrame() final
QSSGRhiShaderPipelinePtr ssaoShaderPipeline
QSSGAmbientOcclusionSettings aoSettings
const QSSGRenderCamera * camera
QSSGRhiGraphicsPipelineState ps
void resetForFrame() final
QSSGRhiGraphicsPipelineState ps
Type passType() const final
std::optional< SkyboxPass > skyboxPass
QSSGShaderFeatures shaderFeatures
QSSGRenderableObjectList sortedOpaqueObjects
std::optional< SkyboxCubeMapPass > skyboxCubeMapPass
QSSGRhiRenderableTexture * rhiScreenTexture
QSSGRenderableObjectList sortedScreenTextureObjects
const QSSGRhiRenderableTexture * rhiScreenTexture
QSSGRhiGraphicsPipelineState ps
void resetForFrame() final
Type passType() const final
QSSGRenderCamera * camera
QSSGBounds3 castingObjectsBox
QSSGShaderLightList globalLights
QSSGRenderableObjectList shadowPassObjects
QSSGRhiGraphicsPipelineState ps
QSSGBounds3 receivingObjectsBox
void resetForFrame() final
std::unique_ptr< QSSGRenderCamera > debugCamera
Type passType() const final
std::shared_ptr< QSSGRenderShadowMap > shadowMapManager
QSSGRhiRenderableTexture * offscreenTexture
QRhiShaderResourceBindings * backgroundSrb
void resetForFrame() final
Type passType() const final
QSSGRhiShaderPipelinePtr pipeline
QSSGRhiGraphicsPipelineState ps
QRhiRenderPassDescriptor * rpDesc
void resetForFrame() final
Type passType() const final
QRhiRenderPassDescriptor * rpDesc
QSSGRhiShaderPipelinePtr skyBoxCubeShader
QSSGRhiGraphicsPipelineState ps
void resetForFrame() final
Type passType() const final
void resetForFrame() final
QRhiRenderPassDescriptor * rpDesc
Type passType() const final
QSSGRhiGraphicsPipelineState ps
QSSGRenderableObjectList sortedTransparentObjects
static void render(const QSSGRenderContextInterface &ctx, const QSSGRhiGraphicsPipelineState &ps, const QSSGRenderableObjectList &sortedTransparentObjects)
QSSGShaderFeatures shaderFeatures
QSSGRhiGraphicsPipelineState ps
void resetForFrame() final
Type passType() const final
Type passType() const final
QList< QSSGRenderExtension * > extensions
void resetForFrame() final
void resetForFrame() final
QList< QSSGRenderUserPassBase * > userPasses
Type passType() const final
static constexpr size_t MAX_SUBPASS_DEPTH
std::vector< UserPassData > userPassData
std::set< QSSGResourceId > visitedPasses
void resetForFrame() final
QSSGRenderableObjectList renderedOpaqueDepthPrepassObjects
Type passType() const final
QSSGRhiGraphicsPipelineState ps
QSSGRenderableObjectList renderedDepthWriteObjects
QSSGRenderResult::Key toInternalRenderResultKey(QSSGFrameData::RenderResult id)
@ SkyMaterialBackgroundTexture
Combined button and popup list for selecting options.
qsizetype rhiPrepareOverrideMaterialUserPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, QSSGRenderGraphObject *overrideMaterial, QSSGLayerRenderData &inData, QSSGRenderableObjectList &inObjects, QSSGShaderFeatures featureSet)
bool setupDrawInputs(QSSGRhiContext *rhiCtx, QRhiGraphicsPipeline *ps, const QSSGSubsetRenderable &renderable, QRhiBuffer *instanceIndexBuffer, QRhiCommandBuffer::VertexInput *vertexBuffers, int &vertexBufferCount, quint32 &instances)
void rhiRenderUserAugmentedPass(QSSGRhiContext *rhiCtx, QSSGRenderableObjectList &inObjects)
quint32 rhiCalculateABufferSize(int nodeCount)
void rhiRenderAoTexture(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRenderer &renderer, QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiGraphicsPipelineState &ps, const QSSGAmbientOcclusionSettings &ao, const QSSGRhiRenderableTexture &rhiAoTexture, const QSSGRhiRenderableTexture &rhiDepthTexture, const QSSGRenderCamera &camera)
bool anyAutoLodInstances(const QSSGSubsetRenderable &renderable)
bool bindInstanceIndices(QRhiGraphicsPipeline *ps, QRhiBuffer *instanceIndexBuffer, QRhiCommandBuffer::VertexInput *vertexBuffers, int *vertexBufferCount)
bool rhiPrepareNormalPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, QSSGLayerRenderData &inData, const QSSGRenderableObjectList &sortedOpaqueObjects)
bool rhiPrepareMotionVectorTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex)
void rhiRenderReflectionMap(const QSSGRenderContextInterface &context, QSSGPassKey passKey, const QSSGLayerRenderData &inData, QSSGRhiGraphicsPipelineState *ps, QSSGRenderReflectionMap &reflectionMapManager, const std::vector< QSSGRenderReflectionProbe * > &reflectionProbes, const QSSGRenderableObjectList &reflectionPassObjects, QSSGRenderer &renderer)
void rhiRenderNormalPass(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &ps, const QSSGRenderableObjectList &sortedOpaqueObjects, bool *needsSetViewport)
Q_QUICK3DRUNTIMERENDER_EXPORT void rhiRenderRenderable(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &state, QSSGRenderableObject &object, bool *needsSetViewport, QSSGRenderTextureCubeFace cubeFace=QSSGRenderTextureCubeFaceNone, qsizetype userPassIndex=-1)
void rhiDrawNonIndexed(QSSGRhiContext *rhiCtx, QRhiCommandBuffer *cb, const QSSGSubsetRenderable &renderable, quint32 instances)
qsizetype rhiPrepareAugmentedUserPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, const QSSGUserShaderAugmentation &shaderAugmentation, const QSSGLayerRenderData &inData, QSSGRenderableObjectList &inObjects, QSSGShaderFeatures featureSet)
bool rhiPrepareDepthPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, QSSGLayerRenderData &inData, const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects, int samples, int viewCount)
qsizetype rhiPrepareOriginalMaterialUserPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, const QSSGLayerRenderData &inData, QSSGRenderableObjectList &inObjects, QSSGShaderFeatures featureSet)
bool rhiPrepareScreenTexture(QSSGRhiContext *rhiCtx, const QSize &size, bool wantsMips, QSSGRhiRenderableTexture *renderableTex, quint8 viewCount)
QRect correctViewportCoordinates(const QRectF &layerViewport, const QRect &deviceRect)
void addAccumulatorImageBindings(QSSGRhiShaderPipeline *shaderPipeline, QSSGRhiShaderResourceBindingList &bindings)
bool rhiPrepareDepthTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex, quint8 viewCount, int samples=1)
void rhiRenderMotionVector(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &state, const QSSGRenderableObjectList *motionVectorPassObjects, int bucketsCount)
void rhiDrawAutoLodInstanced(QSSGRhiContext *rhiCtx, QRhiCommandBuffer *cb, QRhiCommandBuffer::VertexInput *vertexBuffers, int vertexBufferCount, QRhiBuffer *indexBuffer, const QSSGSubsetRenderable &renderable)
Q_AUTOTEST_EXPORT bool rhiPrepareAoTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex, quint8 viewCount)
quint32 rhiCalculateABufferSize(const QSize &size, int levels)
void rhiRenderDepthPass(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &ps, const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects, bool *needsSetViewport)
void addDebugFrustum(const QSSGBoxPoints &frustumPoints, const QColor &color, QSSGDebugDrawSystem *debugDrawSystem)
void addDebugBox(const QSSGBoxPoints &boxUnsorted, const QColor &color, QSSGDebugDrawSystem *debugDrawSystem)
void addDirectionalLightDebugBox(const QSSGBoxPoints &box, QSSGDebugDrawSystem *debugDrawSystem)
QSSGLayerRenderPreparationResultFlag
@ RequiresSkyMaterialPass
@ RequiresMotionVectorPass
@ MaterialHasCustomBlendMode
@ RequiresMipmapsForScreenTexture
QVarLengthArray< QSSGShaderLight, 16 > QSSGShaderLightList
static void setupCubeShadowCameras(const QSSGLayerRenderData &inData, const QSSGRenderLight *inLight, float shadowMapFar, QSSGRenderCamera inCameras[6])
static void updateUniformsForDefaultMaterial(QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, const QSSGLayerRenderData &inData, char *ubufData, QSSGRhiGraphicsPipelineState *ps, QSSGSubsetRenderable &subsetRenderable, const QSSGRenderCameraList &cameras, const QVector2D *depthAdjust, const QMatrix4x4 *alteredModelViewProjection, const QSSGRenderGraphObject *materialOverride=nullptr)
static QSSGRhiShaderPipelinePtr shadersForParticleMaterial(QSSGRhiGraphicsPipelineState *ps, QSSGParticlesRenderable &particleRenderable, const QSSGShaderFeatures &featureSet)
static QSSGRhiShaderPipelinePtr shadersForDefaultMaterial(QSSGRhiGraphicsPipelineState *ps, QSSGSubsetRenderable &subsetRenderable, const QSSGShaderFeatures &featureSet, const QSSGUserShaderAugmentation &shaderAugmentation={})
static std::unique_ptr< QSSGRenderCamera > computeShadowCameraFromFrustum(const QMatrix4x4 &lightMatrix, const QMatrix4x4 &lightMatrixInverted, const QVector3D &lightPivot, const QVector3D &lightForward, const QVector3D &lightUp, const float shadowMapResolution, const float pcfRadius, const QSSGBoxPoints &frustumPoints, float frustumStartT, float frustumEndT, float frustumRadius, bool lockShadowmapTexels, const QSSGBounds3 &castingBox, const QSSGBounds3 &receivingBox, QSSGDebugDrawSystem *debugDrawSystem, const bool drawCascades, const bool drawSceneCascadeIntersection)
static QRhiViewport calculateAtlasViewport(QSize atlasPixelSize, const QSSGShadowMapEntry::AtlasEntry &atlasEntry, bool yIsUp)
static QSSGBoxPoints sliceFrustum(const QSSGBoxPoints &frustumPoints, float t0, float t1)
static void rhiPrepareSkyBox_helper(const QSSGRenderContextInterface &context, QSSGPassKey passKey, QSSGRenderLayer &layer, QSSGRenderCameraList &cameras, QSSGRenderer &renderer, QSSGReflectionMapEntry *entry=nullptr, QSSGRenderTextureCubeFace cubeFace=QSSGRenderTextureCubeFaceNone, uint tonemapMode=0)
static QT_BEGIN_NAMESPACE constexpr float QSSG_PI
static void rhiPrepareResourcesForReflectionMap(const QSSGRenderContextInterface &context, QSSGPassKey passKey, const QSSGLayerRenderData &inData, QSSGReflectionMapEntry *pEntry, QSSGRhiGraphicsPipelineState *ps, const QSSGRenderableObjectList &sortedOpaqueObjects, QSSGRenderCamera &inCamera, QSSGRenderer &renderer, QSSGRenderTextureCubeFace cubeFace)
static void rhiPrepareResourcesForShadowMap(QSSGRhiContext *rhiCtx, const QSSGLayerRenderData &inData, QSSGPassKey passKey, QSSGShadowMapEntry *pEntry, QSSGRhiGraphicsPipelineState *ps, const QVector2D *depthAdjust, const QSSGRenderableObjectList &sortedOpaqueObjects, QSSGRenderCamera &inCamera, bool orthographic, QSSGRenderTextureCubeFace cubeFace, quint32 cascadeIndex)
static void addOpaqueDepthPrePassBindings(QSSGRhiContext *rhiCtx, QSSGRhiShaderPipeline *shaderPipeline, QSSGRenderableImage *renderableImage, QSSGRhiShaderResourceBindingList &bindings, bool isCustomMaterialMeshSubset=false)
static QSSGBoxPoints computeFrustumBounds(const QMatrix4x4 &projection)
static void addNormalTextureBindings(QSSGRhiContext *rhiCtx, QSSGRhiShaderPipeline *shaderPipeline, QSSGRhiShaderResourceBindingList &bindings)
static const QRhiShaderResourceBinding::StageFlags RENDERER_VISIBILITY_ALL
static QRhiShaderResourceBindings * drawCallDataSrb(QSSGRhiContextPrivate *rhiCtxD, QSSGRhiDrawCallData &dcd, const QSSGRhiShaderResourceBindingList &bindings)
static constexpr float QSSG_HALFPI
static int setupInstancing(QSSGSubsetRenderable *renderable, QSSGRhiGraphicsPipelineState *ps, QSSGRhiContext *rhiCtx, const QSSGLayerRenderData &inData, const QVector3D &cameraDirection, const QVector3D &cameraPosition, InstanceLevels instanceLevels, const QSSGRhiShaderPipeline &shaders)
void rhiPrepareRenderableImp(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGLayerRenderData &inData, QSSGRenderableObject &inObject, QRhiRenderPassDescriptor *renderPassDescriptor, QSSGRhiGraphicsPipelineState *ps, QSSGShaderFeatures featureSet, int samples, int viewCount, bool screenMapPass, QSSGRenderCamera *alteredCamera, QMatrix4x4 *alteredModelViewProjection, QSSGRenderTextureCubeFace cubeFace, QSSGReflectionMapEntry *entry, bool oit)
static void setupCubeReflectionCameras(const QSSGLayerRenderData &inData, const QSSGRenderReflectionProbe *inProbe, QSSGRenderCamera inCameras[6])
static void fillTargetBlend(QRhiGraphicsPipeline::TargetBlend *targetBlend, QSSGRenderDefaultMaterial::MaterialBlendMode materialBlend)
static void addDepthTextureBindings(QSSGRhiContext *rhiCtx, QSSGRhiShaderPipeline *shaderPipeline, QSSGRhiShaderResourceBindingList &bindings, QBitArray *specifiedBindings=nullptr)
static QVarLengthArray< std::unique_ptr< QSSGRenderCamera >, 4 > setupCascadingCamerasForShadowMap(const QSSGLayerRenderData &data, const QSSGRenderCamera &inCamera, const QSSGRenderLight *inLight, const int shadowMapResolution, const float pcfRadius, const float clipNear, const float clipFar, const QSSGBounds3 &castingObjectsBox, const QSSGBounds3 &receivingObjectsBox, bool lockShadowmapTexels, QSSGDebugDrawSystem *debugDrawSystem, bool drawCascades, bool drawSceneCascadeIntersection)
QVector< QSSGRenderableObjectHandle > renderables
QSSGBakedLightingModel(const QSSGRenderModel *model, const QVector< QSSGRenderableObjectHandle > &renderables)
const QSSGRenderModel * model
QRhiBuffer * dirLightBuffer
QSSGRenderLight::SoftShadowQuality maxSoftShadowQuality
QSSGDefaultMaterialPreparationResult(QSSGShaderDefaultMaterialKey inMaterialKey)
QSSGRenderableImage * firstImage
QSSGRenderableObjectFlags renderableFlags
QSSGShaderDefaultMaterialKey materialKey
bool requiresDepthTextureMS() const
void setRequiresSsaoPass(bool inValue)
void setRequiresMotionVectorPass(bool inValue)
void setRequiresScreenTexture(bool inValue)
bool wasLayerDataDirty() const
void setRequiresDepthTextureMS(bool inValue)
bool requiresDepthTexture() const
void setLayerDataDirty(bool inValue)
void setWasDirty(bool inValue)
bool requiresMipmapsForScreenTexture() const
void setRequiresSkyMaterialPass(bool inValue)
bool requiresScreenTexture() const
bool hasCustomBlendMode() const
void setRequiresNormalTexture(bool inValue)
bool requiresMotionVectorPass() const
bool requiresShadowMapPass() const
void setRequiresMipmapsForScreenTexture(bool inValue)
void setRequiresDepthTexture(bool inValue)
bool requiresSsaoPass() const
void setRequiresShadowMapPass(bool inValue)
bool requiresSkyMaterialPass() const
void setHasCustomBlendMode(bool inValue)
bool requiresNormalTexture() const
QRhiReadbackResult * pendingResult
QRhiBuffer * counterBuffer
QList< QRhiReadbackResult * > completedResults
QRhiTextureRenderTarget * oitRenderTarget
QRhiResourceUpdateBatch * rub
QRhiTexture * copyTexture
QRhiTexture * colorTexture
QRhiRenderPassDescriptor * renderPassDescriptor
bool castsShadows() const
QSSGRenderableObject * obj
QSSGRhiRenderableTextureV2Ptr renderableTexture
std::optional< SkyboxCubeMapPass > skyboxCubeMapPass
std::vector< UserPassData > subPassData
QSSGRhiGraphicsPipelineState ps
QSSGShaderDefineList shaderDefines
QRhiDepthStencilClearValue depthStencilClearValue
QSSGRenderableObjectList renderables
std::optional< SkyboxPass > skyboxPass
QSSGRenderUserPass * passNode
std::optional< Item2DPass > item2DPass