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

#include <qssgrhicustommaterialsystem_p.h>

+ Collaboration diagram for QSSGCustomMaterialSystem:

Public Member Functions

 QSSGCustomMaterialSystem ()
 
 ~QSSGCustomMaterialSystem ()
 
void setRenderContextInterface (QSSGRenderContextInterface *inContext)
 
void releaseCachedResources ()
 
bool prepareForRender (const QSSGRenderModel &inModel, const QSSGRenderSubset &inSubset, QSSGRenderCustomMaterial &inMaterial)
 
QSSGRhiShaderPipelinePtr shadersForCustomMaterial (QSSGRhiGraphicsPipelineState *ps, const QSSGRenderCustomMaterial &material, QSSGSubsetRenderable &renderable, const QSSGShaderFeatures &featureSet)
 
void updateUniformsForCustomMaterial (QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiContext *rhiCtx, const QSSGLayerRenderData &inData, char *ubufData, QSSGRhiGraphicsPipelineState *ps, const QSSGRenderCustomMaterial &material, QSSGSubsetRenderable &renderable, const QSSGRenderCamera &camera, const QVector2D *depthAdjust, const QMatrix4x4 *alteredModelViewProjection)
 
void rhiPrepareRenderable (QSSGRhiGraphicsPipelineState *ps, QSSGPassKey passKey, QSSGSubsetRenderable &renderable, const QSSGShaderFeatures &featureSet, const QSSGRenderCustomMaterial &material, const QSSGLayerRenderData &layerData, QRhiRenderPassDescriptor *renderPassDescriptor, int samples, QSSGRenderCamera *camera=nullptr, int cubeFace=-1, QMatrix4x4 *modelViewProjection=nullptr, QSSGReflectionMapEntry *entry=nullptr)
 
void applyRhiShaderPropertyValues (char *ubufData, const QSSGRenderCustomMaterial &inMaterial, QSSGRhiShaderPipeline &shaderPipeline)
 
void rhiRenderRenderable (QSSGRhiContext *rhiCtx, QSSGSubsetRenderable &renderable, bool *needsSetViewport, int cubeFace, const QSSGRhiGraphicsPipelineState &state)
 

Detailed Description

Definition at line 43 of file qssgrhicustommaterialsystem_p.h.

Constructor & Destructor Documentation

◆ QSSGCustomMaterialSystem()

QT_BEGIN_NAMESPACE QSSGCustomMaterialSystem::QSSGCustomMaterialSystem ( )
default

◆ ~QSSGCustomMaterialSystem()

QSSGCustomMaterialSystem::~QSSGCustomMaterialSystem ( )

Definition at line 32 of file qssgrhicustommaterialsystem.cpp.

Member Function Documentation

◆ applyRhiShaderPropertyValues()

void QSSGCustomMaterialSystem::applyRhiShaderPropertyValues ( char *  ubufData,
const QSSGRenderCustomMaterial inMaterial,
QSSGRhiShaderPipeline shaderPipeline 
)

Definition at line 568 of file qssgrhicustommaterialsystem.cpp.

References QVariant::fromValue(), QSSGRenderCustomMaterial::m_properties, QSSGRenderCustomMaterial::m_textureProperties, and properties.

+ Here is the call graph for this function:

◆ prepareForRender()

bool QSSGCustomMaterialSystem::prepareForRender ( const QSSGRenderModel inModel,
const QSSGRenderSubset inSubset,
QSSGRenderCustomMaterial inMaterial 
)

Definition at line 36 of file qssgrhicustommaterialsystem.cpp.

References QSSGRenderCustomMaterial::isDirty().

+ Here is the call graph for this function:

◆ releaseCachedResources()

void QSSGCustomMaterialSystem::releaseCachedResources ( )

Definition at line 48 of file qssgrhicustommaterialsystem.cpp.

References QHash< Key, T >::clear().

+ Here is the call graph for this function:

◆ rhiPrepareRenderable()

void QSSGCustomMaterialSystem::rhiPrepareRenderable ( QSSGRhiGraphicsPipelineState ps,
QSSGPassKey  passKey,
QSSGSubsetRenderable renderable,
const QSSGShaderFeatures featureSet,
const QSSGRenderCustomMaterial material,
const QSSGLayerRenderData layerData,
QRhiRenderPassDescriptor renderPassDescriptor,
int  samples,
QSSGRenderCamera camera = nullptr,
int  cubeFace = -1,
QMatrix4x4 modelViewProjection = nullptr,
QSSGReflectionMapEntry entry = nullptr 
)

Definition at line 174 of file qssgrhicustommaterialsystem.cpp.

References QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderResourceBindingList::addUniformBuffer(), AoTexture, QVarLengthArray< T, Prealloc >::append(), QList< T >::append(), QSSGRhiInputAssemblerState::bakeVertexInputLocations(), QRhiBuffer::beginFullDynamicBufferUpdateForCurrentFrame(), QSSGRhiDrawCallData::bindings, QSSGRenderCustomMaterial::Blending, QSSGRhiShadowMapProperties::cachedBinding, camera, QSSGLayerRenderData::camera, QSSGLayerRenderData::cameraData, QList< T >::cbegin(), QVarLengthArray< T, Prealloc >::cbegin(), QRhiVertexInputLayout::cbeginBindings(), QList< T >::cend(), QVarLengthArray< T, Prealloc >::cend(), QRhiVertexInputLayout::cendBindings(), QSSGRhiContext::checkAndAdjustForNPoT(), QRhiSampler::ClampToEdge, QSSGRhiContext::commandBuffer(), QSSGGraphicsPipelineStateKey::create(), QRhiTexture::CubeMap, QSSGRhiGraphicsPipelineState::cullMode, CUSTOM_MATERIAL_VISIBILITY_ALL, QSSGRenderer::defaultMaterialShaderKeyProperties(), DepthTexture, QSSGRhiContext::drawCallData(), QRhiGraphicsPipeline::TargetBlend::dstAlpha, QRhiGraphicsPipeline::TargetBlend::dstColor, QSSGRhiContext::dummyTexture(), QRhiGraphicsPipeline::TargetBlend::enable, QRhiBuffer::endFullDynamicBufferUpdateForCurrentFrame(), QSSGGraphicsPipelineStateKey::extra, QSSGSubsetRenderable::firstImage, QRhiTexture::flags(), QRhiShaderResourceBinding::FragmentStage, QSSGLayerRenderData::getBonemapTexture(), QSSGLayerRenderData::getReflectionMapManager(), QSSGMaterialShaderGenerator::getSamplerName(), QSSGShaderKeyBoolean::getValue(), i, QSSGRenderSubset::ia, QSSGRhiGraphicsPipelineState::ia, QSSGRhiInputAssemblerState::inputLayout, QSSGRenderModel::instanceTable, QSSGRenderableObject::instancingLodMax, QSSGRenderableObject::instancingLodMin, QSSGShaderFeatures::isSet(), it, LightmapTexture, LightProbe, QRhiSampler::Linear, QSSGShaderDefaultMaterialKeyProperties::m_blendParticles, QSSGRenderCustomMaterial::m_cullMode, QSSGRenderCustomMaterial::m_dstBlend, QSSGRenderImage::m_horizontalTilingMode, QSSGRenderableImage::m_imageNode, QSSGRenderImage::m_magFilterType, QSSGRenderableImage::m_mapType, QSSGRenderImage::m_minFilterType, QSSGRenderImage::m_mipFilterType, QSSGRenderableImage::m_nextImage, QSSGRenderCustomMaterial::m_renderFlags, QSSGRenderCustomMaterial::m_srcBlend, QSSGRenderableImage::m_texture, QSSGRenderImageTexture::m_texture, QSSGRenderImage::m_verticalTilingMode, QSSGRhiDrawCallDataKey::Main, QSSGSubsetRenderable::mainPass, QRhiTexture::MipMapped, QSSGModelContext::model, QSSGSubsetRenderable::modelContext, QRhiSampler::Nearest, QRhi::nextResourceUpdateBatch(), QRhiSampler::None, QSSGRenderSubset::offset, QRhiVertexInputBinding::PerInstance, QSSGRhiDrawCallData::pipeline, QSSGRhiContext::pipeline(), QSSGSubsetRenderable::pipeline, QSSGSubsetRenderable::prepareInstancing(), QSSGParticleRenderer::prepareParticlesForModel(), QSSGRhiDrawCallData::ps, qMax(), QSSGRhiDrawCallDataKey::Reflection, QSSGSubsetRenderable::reflectionPass, QSSGShaderFeatures::ReflectionProbe, QSSGSubsetRenderable::reflectionProbeIndex, QSSGSubsetRenderable::renderer, QSSGGraphicsPipelineStateKey::renderTargetDescription, QSSGRhiDrawCallData::renderTargetDescription, QSSGGraphicsPipelineStateKey::renderTargetDescriptionHash, QSSGRhiDrawCallData::renderTargetDescriptionHash, QRhiSampler::Repeat, QRhiCommandBuffer::resourceUpdate(), QSSGRenderSubset::rhi, QSSGRhiContext::rhi(), QSSGRenderContextInterface::rhiContext(), QSSGSubsetRenderable::rhiRenderData, QSSGRhiContext::sampler(), QShaderDescription::SamplerCube, QSSGRhiGraphicsPipelineState::samples, ScreenTexture, QRhiVertexInputLayout::setBindings(), QBitArray::setBit(), QSSGSubsetRenderable::shaderDescription, shadersForCustomMaterial(), QSSGRhiShadowMapProperties::shadowMapTexture, QSSGRhiShadowMapProperties::shadowMapTextureUniformName, QVLABaseBase::size(), QSSGRhiDrawCallData::srb, QSSGRhiContext::srb(), QSSGSubsetRenderable::srb, QRhiGraphicsPipeline::TargetBlend::srcAlpha, QRhiGraphicsPipeline::TargetBlend::srcColor, QSSGRenderInstanceTable::stride(), QSSGSubsetRenderable::subset, QSSGRhiGraphicsPipelineState::targetBlend, QSSGRenderSubset::targetsTexture, QBitArray::testBit(), QSSGRhiGraphicsPipelineState::toCullMode(), toRhi(), QSSGRhiDrawCallData::ubuf, updateUniformsForCustomMaterial(), QSSGParticleRenderer::updateUniformsForParticleModel(), var, and QRhiShaderResourceBinding::VertexStage.

Referenced by RenderHelpers::rhiPrepareRenderable().

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

◆ rhiRenderRenderable()

void QSSGCustomMaterialSystem::rhiRenderRenderable ( QSSGRhiContext rhiCtx,
QSSGSubsetRenderable renderable,
bool *  needsSetViewport,
int  cubeFace,
const QSSGRhiGraphicsPipelineState state 
)

◆ setRenderContextInterface()

void QSSGCustomMaterialSystem::setRenderContextInterface ( QSSGRenderContextInterface inContext)

Definition at line 43 of file qssgrhicustommaterialsystem.cpp.

◆ shadersForCustomMaterial()

QSSGRhiShaderPipelinePtr QSSGCustomMaterialSystem::shadersForCustomMaterial ( QSSGRhiGraphicsPipelineState ps,
const QSSGRenderCustomMaterial material,
QSSGSubsetRenderable renderable,
const QSSGShaderFeatures featureSet 
)

◆ updateUniformsForCustomMaterial()

void QSSGCustomMaterialSystem::updateUniformsForCustomMaterial ( QSSGRhiShaderPipeline shaderPipeline,
QSSGRhiContext rhiCtx,
const QSSGLayerRenderData inData,
char *  ubufData,
QSSGRhiGraphicsPipelineState ps,
const QSSGRenderCustomMaterial material,
QSSGSubsetRenderable renderable,
const QSSGRenderCamera camera,
const QVector2D depthAdjust,
const QMatrix4x4 alteredModelViewProjection 
)

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