Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGParticleRenderer Class Reference

#include <qssgrhiparticles_p.h>

+ Collaboration diagram for QSSGParticleRenderer:

Static Public Member Functions

static void updateUniformsForParticles (QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, char *ubufData, QSSGParticlesRenderable &renderable, QSSGRenderCamera &inCamera)
 
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, QSSGRenderCamera *camera=nullptr, int cubeFace=-1, QSSGReflectionMapEntry *entry=nullptr)
 
static void rhiRenderRenderable (QSSGRhiContext *rhiCtx, QSSGParticlesRenderable &renderable, bool *needsSetViewport, int cubeFace, const QSSGRhiGraphicsPipelineState &state)
 
static void prepareParticlesForModel (QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, QSSGRhiShaderResourceBindingList &bindings, const QSSGRenderModel *model)
 

Detailed Description

Definition at line 34 of file qssgrhiparticles_p.h.

Member Function Documentation

◆ prepareParticlesForModel()

void QSSGParticleRenderer::prepareParticlesForModel ( QSSGRhiShaderPipeline shaderPipeline,
QSSGRhiContext rhiCtx,
QSSGRhiShaderResourceBindingList bindings,
const QSSGRenderModel model 
)
static

◆ rhiPrepareRenderable()

void QSSGParticleRenderer::rhiPrepareRenderable ( QSSGRhiShaderPipeline shaderPipeline,
QSSGPassKey  passKey,
QSSGRhiContext rhiCtx,
QSSGRhiGraphicsPipelineState ps,
QSSGParticlesRenderable renderable,
const QSSGLayerRenderData inData,
QRhiRenderPassDescriptor renderPassDescriptor,
int  samples,
QSSGRenderCamera camera = nullptr,
int  cubeFace = -1,
QSSGReflectionMapEntry entry = nullptr 
)
static

Definition at line 324 of file qssgrhiparticles.cpp.

References QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderResourceBindingList::addUniformBuffer(), QSSGRenderParticles::Animated, QRhiBuffer::beginFullDynamicBufferUpdateForCurrentFrame(), QSSGRhiShaderPipeline::bindingForTexture(), QSSGRhiDrawCallData::bindings, camera, QSSGLayerRenderData::camera, QSSGLayerRenderData::cameraData, QRhiSampler::ClampToEdge, QByteArray::clear(), QList< T >::clear(), QVarLengthArray< T, Prealloc >::clear(), QSSGParticlesRenderable::colorTable, QSSGRhiContext::commandBuffer(), QSSGRhiParticleData::convertData, convertParticleData(), QRhiTexture::create(), QSSGGraphicsPipelineStateKey::create(), QSSGRhiGraphicsPipelineState::cullMode, QSSGParticleBuffer::data(), QSSGRhiContext::drawCallData(), QSSGRhiContext::dummyTexture(), QRhiBuffer::endFullDynamicBufferUpdateForCurrentFrame(), QSSGRhiShaderPipeline::ensureUniformBuffer(), QSSGGraphicsPipelineStateKey::extra, fillTargetBlend(), QSSGParticlesRenderable::firstImage, QRhiTexture::flags(), QRhiShaderResourceBinding::FragmentStage, QSSGRenderableObjectFlags::hasTransparency(), QSSGRhiGraphicsPipelineState::ia, QSSGRhiInputAssemblerState::inputLayout, QSSGRhiInputAssemblerState::inputs, QRhi::isTextureFormatSupported(), QSSGRenderParticles::m_blendMode, QSSGRenderParticles::m_depthSorting, QSSGRenderParticles::m_featureLevel, QSSGRenderImage::m_horizontalTilingMode, QSSGRenderableImage::m_imageNode, QSSGRenderImage::m_magFilterType, QSSGRenderImage::m_minFilterType, QSSGRenderImage::m_mipFilterType, QSSGRenderParticles::m_particleBuffer, QSSGRenderableImage::m_texture, QSSGRenderImageTexture::m_texture, QSSGRenderImage::m_verticalTilingMode, QSSGRhiDrawCallDataKey::Main, QSSGParticlesRenderable::mainPass, QRhiTexture::MipMapped, QRhiSampler::Nearest, QRhi::newTexture(), QRhi::nextResourceUpdateBatch(), QRhiSampler::None, QRhiGraphicsPipeline::None, QSSGParticleBuffer::particleCount(), QSSGRhiParticleData::particleCount, QSSGRhiContext::particleData(), QSSGParticlesRenderable::particles, QSSGRhiDrawCallData::pipeline, QSSGRhiContext::pipeline(), QSSGParticlesRenderable::pipeline, QSSGRhiDrawCallData::ps, QSSGRhiDrawCallDataKey::Reflection, QSSGParticlesRenderable::reflectionPass, QSSGRenderableObject::renderableFlags, QSSGGraphicsPipelineStateKey::renderTargetDescription, QSSGRhiDrawCallData::renderTargetDescription, QSSGGraphicsPipelineStateKey::renderTargetDescriptionHash, QSSGRhiDrawCallData::renderTargetDescriptionHash, QRhiSampler::Repeat, QRhiCommandBuffer::resourceUpdate(), QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, QSSGRhiContext::rhi(), QSSGParticlesRenderable::rhiRenderData, QSSGRhiContext::sampler(), QSSGRhiGraphicsPipelineState::samples, QRhiTextureSubresourceUploadDescription::setData(), QRhiTexture::setPixelSize(), QSSGParticleBuffer::size(), QSSGRhiParticleData::sortData, QSSGRhiParticleData::sortedData, QSSGRhiParticleData::sorting, sortParticles(), QSSGRhiDrawCallData::srb, QSSGRhiContext::srb(), QSSGParticlesRenderable::srb, QSSGRhiGraphicsPipelineState::targetBlend, QSSGRhiParticleData::texture, QSSGRhiInputAssemblerState::topology, toRhi(), QRhiGraphicsPipeline::TriangleStrip, QSSGRhiShaderPipeline::ub0Size(), QSSGRhiDrawCallData::ubuf, updateUniformsForParticles(), QRhiResourceUpdateBatch::uploadTexture(), QRhiShaderResourceBinding::VertexStage, VISIBILITY_ALL, and Qt::white.

Referenced by RenderHelpers::rhiPrepareRenderable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rhiRenderRenderable()

void QSSGParticleRenderer::rhiRenderRenderable ( QSSGRhiContext rhiCtx,
QSSGParticlesRenderable renderable,
bool *  needsSetViewport,
int  cubeFace,
const QSSGRhiGraphicsPipelineState state 
)
static

Definition at line 579 of file qssgrhiparticles.cpp.

References cb, QSSGRhiContext::commandBuffer(), draw(), QSSGRenderParticles::Line, QSSGRenderParticles::m_featureLevel, QSSGRenderParticles::m_particleBuffer, QSSGParticlesRenderable::mainPass, QSSGParticleBuffer::particleCount(), QSSGParticlesRenderable::particles, QSSGParticlesRenderable::pipeline, Q_QUICK3D_PROFILE_END_WITH_ID, Q_QUICK3D_PROFILE_START, QSSGRHICTX_STAT, QSSGParticlesRenderable::reflectionPass, QSSGParticlesRenderable::rhiRenderData, QSSGParticleBuffer::segments(), QSSGParticlesRenderable::srb, and state.

Referenced by RenderHelpers::rhiRenderRenderable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateUniformsForParticleModel()

void QSSGParticleRenderer::updateUniformsForParticleModel ( QSSGRhiShaderPipeline shaderPipeline,
char *  ubufData,
const QSSGRenderModel model,
quint32  offset 
)
static

Definition at line 144 of file qssgrhiparticles.cpp.

References model, and QSSGRhiShaderPipeline::setUniform().

Referenced by RenderHelpers::rhiPrepareRenderable(), QSSGCustomMaterialSystem::rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateUniformsForParticles()

void QSSGParticleRenderer::updateUniformsForParticles ( QSSGRhiShaderPipeline shaderPipeline,
QSSGRhiContext rhiCtx,
char *  ubufData,
QSSGParticlesRenderable renderable,
QSSGRenderCamera inCamera 
)
static

Definition at line 37 of file qssgrhiparticles.cpp.

References QRhi::clipSpaceCorrMatrix(), QMatrix4x4::constData(), QVarLengthArray< T, Prealloc >::contains(), direction, QSSGParticlesRenderable::firstImage, QSSGRenderNode::getGlobalPos(), QSSGRenderNode::globalTransform, QSSGRenderableObject::globalTransform, QMatrix4x4::inverted(), QVarLengthArray< T, Prealloc >::isEmpty(), QSSGRhiShaderPipeline::CommonUniformIndices::light_ambient_totalIdx, QSSGParticlesRenderable::lights, QSSGRenderParticles::m_alphaFade, QSSGRenderLight::m_ambientColor, QSSGRenderParticles::m_billboard, QSSGRenderParticles::m_blendImages, QSSGRenderLight::m_brightness, QSSGRenderLight::m_coneAngle, QSSGRenderLight::m_constantFade, QSSGRenderLight::m_diffuseColor, QSSGRenderLight::m_innerConeAngle, QSSGRenderParticles::m_lights, QSSGRenderLight::m_linearFade, QSSGRenderParticles::m_particleBuffer, QSSGRenderLight::m_quadraticFade, QSSGRenderParticles::m_sizeModifier, QSSGRenderParticles::m_spriteImageCount, QSSGRenderParticles::m_texcoordScale, QSSGRhiShaderPipeline::CommonUniformIndices::modelMatrixIdx, QSSGParticlesRenderable::opacity, QSSGParticlesRenderable::particles, QSSGParticleBuffer::particlesPerSlice(), ParticleLightData::pointLightColor, ParticleLightData::pointLightConstantAtt, ParticleLightData::pointLightLinearAtt, ParticleLightData::pointLightPos, ParticleLightData::pointLightQuadAtt, QSSGRenderCamera::projection, QSSGRhiShaderPipeline::CommonUniformIndices::projectionMatrixIdx, qDegreesToRadians(), QSSG_MAX_NUM_LIGHTS, QSSGRhiContext::rhi(), segmentCount(), ParticleLightData::spotLightColor, ParticleLightData::spotLightConeAngle, ParticleLightData::spotLightConstantAtt, ParticleLightData::spotLightDir, ParticleLightData::spotLightInnerConeAngle, ParticleLightData::spotLightLinearAtt, ParticleLightData::spotLightPos, ParticleLightData::spotLightQuadAtt, aux::translateConstantAttenuation(), aux::translateLinearAttenuation(), aux::translateQuadraticAttenuation(), QSSGRenderGraphObject::type, and QSSGRhiShaderPipeline::CommonUniformIndices::viewMatrixIdx.

Referenced by rhiPrepareRenderable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: