39 static void updateUniformsForParticles(
const QSSGLayerRenderData &inData, QSSGRhiShaderPipeline &shaderPipeline,
40 QSSGRhiContext *rhiCtx,
42 QSSGParticlesRenderable &renderable,
43 const QSSGRenderCameraList &cameras);
44 static void updateUniformsForParticleModel(QSSGRhiShaderPipeline &shaderPipeline,
46 const QSSGRenderModel *model, quint32 offset);
48 static QSSGRhiShaderPipelinePtr getShaderPipelineParticles(QSSGRenderer &renderer,
49 QSSGParticlesRenderable &inRenderable,
50 const QSSGShaderFeatures &inFeatureSet);
52 static QSSGRhiShaderPipelinePtr generateRhiShaderPipeline(QSSGRenderer &renderer,
53 QSSGParticlesRenderable &inRenderable,
54 const QSSGShaderFeatures &inFeatureSet,
55 QByteArray &shaderString,
56 const QSSGShaderParticleMaterialKeyProperties &shaderKeyProperties);
58 static void rhiPrepareRenderable(QSSGRhiShaderPipeline &shaderPipeline, QSSGPassKey passKey,
59 QSSGRhiContext *rhiCtx,
60 QSSGRhiGraphicsPipelineState *ps,
61 QSSGParticlesRenderable &renderable,
62 const QSSGLayerRenderData &inData,
63 QRhiRenderPassDescriptor *renderPassDescriptor,
66 QSSGRenderCamera *alteredCamera =
nullptr,
67 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
68 QSSGReflectionMapEntry *entry =
nullptr,
70 static void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
71 QSSGParticlesRenderable &renderable,
72 bool *needsSetViewport,
73 QSSGRenderTextureCubeFace cubeFace,
74 const QSSGRhiGraphicsPipelineState &state);
75 static void prepareParticlesForModel(QSSGRhiShaderPipeline &shaderPipeline,
76 QSSGRhiContext *rhiCtx,
77 QSSGRhiShaderResourceBindingList &bindings,
78 const QSSGRenderModel *model);
79 static QSSGShaderFeatures particleShaderFeatures(
const QSSGShaderFeatures& features);
80 static void setShaderCacheEnabled(
bool enabled);
friend class QSSGLayerRenderData
#define QSSGRHICTX_STAT(ctx, f)
#define QSSG_MAX_NUM_LIGHTS
static QByteArray particlesLogPrefix()
static const char * s_lightPrefix
static QByteArray convertParticleData(QByteArray &dest, const QByteArray &data, bool convert)
static void fillTargetBlend(QRhiGraphicsPipeline::TargetBlend &targetBlend, QSSGRenderParticles::BlendMode mode)
static bool s_shaderCacheEnabled
static void sortParticles(const QSSGLayerRenderData &renderData, QByteArray &result, QList< QSSGRhiSortData > &sortData, const QSSGParticleBuffer &buffer, const QSSGRenderParticles &particles, const QVector3D &cameraDirection, bool animatedParticles)
static QT_BEGIN_NAMESPACE const QRhiShaderResourceBinding::StageFlags VISIBILITY_ALL
float pointLightQuadAtt[4]
QVector4D spotLightPos[4]
float spotLightLinearAtt[4]
float pointLightLinearAtt[4]
QVector4D spotLightColor[4]
float spotLightConeAngle[4]
float spotLightQuadAtt[4]
float spotLightInnerConeAngle[4]
QVector4D pointLightColor[4]
float pointLightConstantAtt[4]
QVector4D pointLightPos[4]
QVector4D spotLightDir[4]
float spotLightConstantAtt[4]