Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qssgrenderhelpers_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QSSGRENDERHELPERS_P_H
7#define QSSGRENDERHELPERS_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3DRuntimeRender/qtquick3druntimerenderglobal.h>
21
22#include <QtQuick3DUtils/private/qssgaosettings_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrenderableobjects_p.h>
24
26
27class QSSGRhiContext;
28class QSSGRenderShadowMap;
29class QRhiRenderPassDescriptor;
30class QSSGRenderReflectionMap;
31class QSSGRenderMotionVectorMap;
34class QSSGRhiShaderPipeline;
35
37{
38
39// Whether any instance is left to draw with the automatic per-instance LOD.
40bool anyAutoLodInstances(const QSSGSubsetRenderable &renderable);
41
42// Draws each level of the automatic per-instance LOD, see
43// QSSGLayerRenderData::prepareAutoLodInstancing().
44void rhiDrawAutoLodInstanced(QSSGRhiContext *rhiCtx,
45 QRhiCommandBuffer *cb,
46 QRhiCommandBuffer::VertexInput *vertexBuffers,
47 int vertexBufferCount,
48 QRhiBuffer *indexBuffer,
49 const QSSGSubsetRenderable &renderable);
50
51[[nodiscard]] bool setupDrawInputs(QSSGRhiContext *rhiCtx,
52 QRhiGraphicsPipeline *ps,
53 const QSSGSubsetRenderable &renderable,
54 QRhiBuffer *instanceIndexBuffer,
55 QRhiCommandBuffer::VertexInput *vertexBuffers,
56 int &vertexBufferCount,
57 quint32 &instances);
58
59void rhiDrawNonIndexed(QSSGRhiContext *rhiCtx,
60 QRhiCommandBuffer *cb,
61 const QSSGSubsetRenderable &renderable,
62 quint32 instances);
63
64void rhiRenderShadowMap(QSSGRhiContext *rhiCtx,
65 QSSGPassKey passKey,
66 QSSGRhiGraphicsPipelineState &ps,
67 QSSGRenderShadowMap &shadowMapManager,
68 const QSSGRenderCamera &camera,
69 QSSGRenderCamera *debugCamera,
70 const QSSGShaderLightList &globalLights,
71 const QSSGRenderableObjectList &sortedOpaqueObjects,
72 QSSGRenderer &renderer,
73 const QSSGBounds3 &castingObjectsBox,
74 const QSSGBounds3 &receivingObjectsBox);
75
76void rhiRenderReflectionMap(const QSSGRenderContextInterface &context,
77 QSSGPassKey passKey,
78 const QSSGLayerRenderData &inData,
79 QSSGRhiGraphicsPipelineState *ps,
80 QSSGRenderReflectionMap &reflectionMapManager,
81 const std::vector<QSSGRenderReflectionProbe *> &reflectionProbes,
82 const QSSGRenderableObjectList &reflectionPassObjects,
83 QSSGRenderer &renderer);
84
85bool rhiPrepareDepthPass(QSSGRhiContext *rhiCtx,
86 QSSGPassKey passKey,
87 const QSSGRhiGraphicsPipelineState &basePipelineState,
88 QRhiRenderPassDescriptor *rpDesc,
89 QSSGLayerRenderData &inData,
90 const QSSGRenderableObjectList &sortedOpaqueObjects,
91 const QSSGRenderableObjectList &sortedTransparentObjects,
92 int samples,
93 int viewCount);
94
95void rhiRenderDepthPass(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &ps,
96 const QSSGRenderableObjectList &sortedOpaqueObjects,
97 const QSSGRenderableObjectList &sortedTransparentObjects,
98 bool *needsSetViewport);
99
100bool rhiPrepareNormalPass(QSSGRhiContext *rhiCtx,
101 QSSGPassKey passKey,
102 const QSSGRhiGraphicsPipelineState &basePipelineState,
103 QRhiRenderPassDescriptor *rpDesc,
104 QSSGLayerRenderData &inData,
105 const QSSGRenderableObjectList &sortedOpaqueObjects);
106
107void rhiRenderNormalPass(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &ps,
108 const QSSGRenderableObjectList &sortedOpaqueObjects,
109 bool *needsSetViewport);
110
111Q_AUTOTEST_EXPORT bool rhiPrepareAoTexture(QSSGRhiContext *rhiCtx,
112 const QSize &size,
113 QSSGRhiRenderableTexture *renderableTex,
114 quint8 viewCount);
115
116void rhiRenderAoTexture(QSSGRhiContext *rhiCtx,
117 QSSGPassKey passKey,
118 QSSGRenderer &renderer,
119 QSSGRhiShaderPipeline &shaderPipeline,
120 QSSGRhiGraphicsPipelineState &ps,
121 const QSSGAmbientOcclusionSettings &ao,
122 const QSSGRhiRenderableTexture &rhiAoTexture,
123 const QSSGRhiRenderableTexture &rhiDepthTexture,
124 const QSSGRenderCamera &camera);
125
126bool rhiPrepareScreenTexture(QSSGRhiContext *rhiCtx,
127 const QSize &size,
128 bool wantsMips,
129 QSSGRhiRenderableTexture *renderableTex,
130 quint8 viewCount);
131
132void addAccumulatorImageBindings(QSSGRhiShaderPipeline *shaderPipeline,
133 QSSGRhiShaderResourceBindingList &bindings);
134
135void rhiPrepareGrid(QSSGRhiContext *rhiCtx,
136 QSSGPassKey passKey,
137 QSSGRenderLayer &layer,
138 QSSGRenderCameraList &cameras,
139 QSSGRenderer &renderer);
140
141void rhiPrepareSkyBox(const QSSGRenderContextInterface &context,
142 QSSGPassKey passKey,
143 QSSGRenderLayer &layer,
144 QSSGRenderCameraList &cameras,
145 QSSGRenderer &renderer,
146 uint tonemapMode = 0);
147
148void rhiPrepareSkyBoxForReflectionMap(const QSSGRenderContextInterface &context,
149 QSSGPassKey passKey,
150 QSSGRenderLayer &layer,
151 QSSGRenderCamera &inCamera,
152 QSSGRenderer &renderer,
154 QSSGRenderTextureCubeFace cubeFace);
155
156[[nodiscard]] qsizetype rhiPrepareOverrideMaterialUserPass(QSSGRhiContext *rhiCtx,
157 QSSGPassKey passKey,
158 const QSSGRhiGraphicsPipelineState &basePipelineState,
159 QRhiRenderPassDescriptor *rpDesc,
160 QSSGRenderGraphObject *overrideMaterial,
161 QSSGLayerRenderData &inData,
162 QSSGRenderableObjectList &inObjects,
163 QSSGShaderFeatures featureSet);
164
165[[nodiscard]] qsizetype rhiPrepareOriginalMaterialUserPass(QSSGRhiContext *rhiCtx,
166 QSSGPassKey passKey,
167 const QSSGRhiGraphicsPipelineState &basePipelineState,
168 QRhiRenderPassDescriptor *rpDesc,
169 const QSSGLayerRenderData &inData,
170 QSSGRenderableObjectList &inObjects,
171 QSSGShaderFeatures featureSet);
172
173[[nodiscard]] qsizetype rhiPrepareAugmentedUserPass(QSSGRhiContext *rhiCtx,
174 QSSGPassKey passKey,
175 const QSSGRhiGraphicsPipelineState &basePipelineState,
176 QRhiRenderPassDescriptor *rpDesc,
177 const QSSGUserShaderAugmentation &shaderAugmentation,
178 const QSSGLayerRenderData &inData,
179 QSSGRenderableObjectList &inObjects,
180 QSSGShaderFeatures featureSet);
181
182void rhiRenderUserAugmentedPass(QSSGRhiContext *rhiCtx,
183 QSSGRenderableObjectList &inObjects);
184
185Q_QUICK3DRUNTIMERENDER_EXPORT void rhiPrepareRenderable(QSSGRhiContext *rhiCtx,
186 QSSGPassKey passKey,
187 const QSSGLayerRenderData &inData,
188 QSSGRenderableObject &inObject,
189 QRhiRenderPassDescriptor *renderPassDescriptor,
190 QSSGRhiGraphicsPipelineState *ps,
191 QSSGShaderFeatures featureSet,
192 int samples,
193 int viewCount,
194 QSSGRenderCamera *alteredCamera = nullptr,
195 QMatrix4x4 *alteredModelViewProjection = nullptr,
196 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
197 QSSGReflectionMapEntry *entry = nullptr,
198 bool oit = false);
199
200Q_QUICK3DRUNTIMERENDER_EXPORT void rhiPrepareRenderableForScreenMapPass(QSSGRhiContext *rhiCtx,
201 QSSGPassKey passKey,
202 const QSSGLayerRenderData &inData,
203 QSSGRenderableObject &inObject,
204 QRhiRenderPassDescriptor *renderPassDescriptor,
205 QSSGRhiGraphicsPipelineState *ps,
206 QSSGShaderFeatures featureSet,
207 int samples,
208 int viewCount,
209 QSSGRenderCamera *alteredCamera = nullptr,
210 QMatrix4x4 *alteredModelViewProjection = nullptr,
211 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
212 QSSGReflectionMapEntry *entry = nullptr,
213 bool oit = false);
214
215Q_QUICK3DRUNTIMERENDER_EXPORT void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
216 const QSSGRhiGraphicsPipelineState &state,
217 QSSGRenderableObject &object,
218 bool *needsSetViewport,
219 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
220 qsizetype userPassIndex = -1);
221
222[[nodiscard]] bool bindInstanceIndices(QRhiGraphicsPipeline *ps, QRhiBuffer *instanceIndexBuffer,
223 QRhiCommandBuffer::VertexInput *vertexBuffers, int *vertexBufferCount);
224
225bool rhiPrepareDepthTexture(QSSGRhiContext *rhiCtx,
226 const QSize &size,
227 QSSGRhiRenderableTexture *renderableTex,
228 quint8 viewCount,
229 int samples = 1);
230
231bool rhiPrepareMotionVectorTexture(QSSGRhiContext *rhiCtx,
232 const QSize &size,
233 QSSGRhiRenderableTexture *renderableTex);
234
235void rhiPrepareMotionVectorRenderable(QSSGRhiContext *rhiCtx,
236 QSSGPassKey passKey,
237 const QSSGLayerRenderData &inData,
238 const QMatrix4x4 &viewProjection,
239 QSSGRenderableObject &inObject,
240 QRhiRenderPassDescriptor *renderPassDescriptor,
241 QSSGRhiGraphicsPipelineState *ps,
242 QSSGRenderMotionVectorMap &motionVectorMapManager);
243
244void rhiRenderMotionVector(QSSGRhiContext *rhiCtx,
245 const QSSGRhiGraphicsPipelineState &state,
246 const QSSGRenderableObjectList *motionVectorPassObjects,
247 int bucketsCount);
248
249inline QRect correctViewportCoordinates(const QRectF &layerViewport, const QRect &deviceRect)
250{
251 const int y = deviceRect.bottom() - layerViewport.bottom() + 1;
252 return QRect(layerViewport.x(), y, layerViewport.width(), layerViewport.height());
253}
254
255inline quint32 rhiCalculateABufferSize(int nodeCount)
256{
257 if (nodeCount <= 0)
258 return 0;
259 // Sqrt of the node count is a good approximation for the width and height of the A-buffer texture.
260 // we use qCeil to round up to the nearest integer, ensuring that we have enough space for all nodes.
261 return quint32(qCeil(qSqrt(double(nodeCount))));
262}
263
264inline quint32 rhiCalculateABufferSize(const QSize &size, int levels)
265{
266 // Multiply in 64 bits and avoid negative numbers, or we can cause an overflow.
267 const quint64 s = quint64(qMax(0, size.width())) * quint64(qMax(0, size.height())) * quint64(qMax(0, levels));
268 return quint32(qCeil(qSqrt(double(s))));
269}
270
271}
272
273QT_END_NAMESPACE
274
275
276#endif // QSSGRENDERHELPERS_P_H
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)
QSSGRenderableObjectFlags renderableFlags
friend class QSSGRenderContextInterface
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)
#define M_PI_2
Definition qmath.h:205
#define M_PI
Definition qmath.h:201
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)