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
qssgrhiparticles_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSG_RHI_PARTICLES_H
5#define QSSG_RHI_PARTICLES_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3DRuntimeRender/qtquick3druntimerenderglobal.h>
19#include <QtQuick3DRuntimeRender/private/qssgrenderableobjects_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrenderparticles_p.h>
21#include <QtGui/QMatrix4x4>
22#include <QtGui/QMatrix3x3>
23
24QT_BEGIN_NAMESPACE
25
26class QSSGLayerRenderData;
27struct QSSGRenderableImage;
28struct QSSGRenderLayer;
29struct QSSGRenderLight;
30class QSSGRenderCamera;
32class QRhiTexture;
33
35{
36public:
37 static void updateUniformsForParticles(const QSSGLayerRenderData &inData, QSSGRhiShaderPipeline &shaderPipeline,
38 QSSGRhiContext *rhiCtx,
39 char *ubufData,
40 QSSGParticlesRenderable &renderable,
41 const QSSGRenderCameraList &cameras);
42 static void updateUniformsForParticleModel(QSSGRhiShaderPipeline &shaderPipeline,
43 char *ubufData,
44 const QSSGRenderModel *model, quint32 offset);
45
46 static void rhiPrepareRenderable(QSSGRhiShaderPipeline &shaderPipeline, QSSGPassKey passKey,
47 QSSGRhiContext *rhiCtx,
48 QSSGRhiGraphicsPipelineState *ps,
49 QSSGParticlesRenderable &renderable,
50 const QSSGLayerRenderData &inData,
51 QRhiRenderPassDescriptor *renderPassDescriptor,
52 int samples,
53 int viewCount,
54 QSSGRenderCamera *alteredCamera = nullptr,
55 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
56 QSSGReflectionMapEntry *entry = nullptr);
57 static void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
58 QSSGParticlesRenderable &renderable,
59 bool *needsSetViewport,
60 QSSGRenderTextureCubeFace cubeFace,
61 const QSSGRhiGraphicsPipelineState &state);
62 static void prepareParticlesForModel(QSSGRhiShaderPipeline &shaderPipeline,
63 QSSGRhiContext *rhiCtx,
64 QSSGRhiShaderResourceBindingList &bindings,
65 const QSSGRenderModel *model);
66};
67
68QT_END_NAMESPACE
69
70#endif
static void updateUniformsForParticleModel(QSSGRhiShaderPipeline &shaderPipeline, char *ubufData, const QSSGRenderModel *model, quint32 offset)
static void rhiPrepareRenderable(QSSGRhiShaderPipeline &shaderPipeline, QSSGPassKey passKey, QSSGRhiContext *rhiCtx, QSSGRhiGraphicsPipelineState *ps, QSSGParticlesRenderable &renderable, const QSSGLayerRenderData &inData, QRhiRenderPassDescriptor *renderPassDescriptor, int samples, int viewCount, QSSGRenderCamera *alteredCamera=nullptr, QSSGRenderTextureCubeFace cubeFace=QSSGRenderTextureCubeFaceNone, QSSGReflectionMapEntry *entry=nullptr)
static void updateUniformsForParticles(const QSSGLayerRenderData &inData, QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, char *ubufData, QSSGParticlesRenderable &renderable, const QSSGRenderCameraList &cameras)
static void rhiRenderRenderable(QSSGRhiContext *rhiCtx, QSSGParticlesRenderable &renderable, bool *needsSetViewport, QSSGRenderTextureCubeFace cubeFace, const QSSGRhiGraphicsPipelineState &state)
static void prepareParticlesForModel(QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, QSSGRhiShaderResourceBindingList &bindings, const QSSGRenderModel *model)
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:48
Q_CORE_EXPORT void qFloatToFloat16(qfloat16 *, const float *, qsizetype length) noexcept
#define QSSGRHICTX_STAT(ctx, f)
#define QSSG_MAX_NUM_LIGHTS
static QByteArray convertParticleData(QByteArray &dest, const QByteArray &data, bool convert)
static void fillTargetBlend(QRhiGraphicsPipeline::TargetBlend &targetBlend, QSSGRenderParticles::BlendMode mode)
static void sortParticles(const QSSGLayerRenderData &renderData, QByteArray &result, QList< QSSGRhiSortData > &sortData, const QSSGParticleBuffer &buffer, const QSSGRenderParticles &particles, const QVector3D &cameraDirection, bool animatedParticles)
QVector4D spotLightPos[4]
QVector4D spotLightColor[4]
QVector4D pointLightColor[4]
QVector4D pointLightPos[4]
QVector4D spotLightDir[4]