![]() |
Qt 6.x
The Qt SDK
|
#include <qssgrhicustommaterialsystem_p.h>
Definition at line 43 of file qssgrhicustommaterialsystem_p.h.
|
default |
QSSGCustomMaterialSystem::~QSSGCustomMaterialSystem | ( | ) |
Definition at line 32 of file qssgrhicustommaterialsystem.cpp.
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.
bool QSSGCustomMaterialSystem::prepareForRender | ( | const QSSGRenderModel & | inModel, |
const QSSGRenderSubset & | inSubset, | ||
QSSGRenderCustomMaterial & | inMaterial | ||
) |
Definition at line 36 of file qssgrhicustommaterialsystem.cpp.
References QSSGRenderCustomMaterial::isDirty().
void QSSGCustomMaterialSystem::releaseCachedResources | ( | ) |
Definition at line 48 of file qssgrhicustommaterialsystem.cpp.
References QHash< Key, T >::clear().
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().
void QSSGCustomMaterialSystem::rhiRenderRenderable | ( | QSSGRhiContext * | rhiCtx, |
QSSGSubsetRenderable & | renderable, | ||
bool * | needsSetViewport, | ||
int | cubeFace, | ||
const QSSGRhiGraphicsPipelineState & | state | ||
) |
Definition at line 581 of file qssgrhicustommaterialsystem.cpp.
References cb, QSSGRhiContext::commandBuffer(), QSSGRenderSubset::count, draw(), QSSGRenderSubset::indexBuffer, QSSGSubsetRenderable::instanceBuffer, QSSGRenderModel::instanceCount(), QSSGRenderModel::instancing(), QSSGSubsetRenderable::mainPass, QSSGSubsetRenderable::material, QSSGModelContext::model, QSSGSubsetRenderable::modelContext, QSSGRenderSubset::offset, QSSGSubsetRenderable::pipeline, Q_QUICK3D_PROFILE_END_WITH_IDS, Q_QUICK3D_PROFILE_START, QSSGRHICTX_STAT, QSSGSubsetRenderable::reflectionPass, QSSGRenderSubset::rhi, QSSGSubsetRenderable::rhiRenderData, QSSGSubsetRenderable::srb, state, QSSGSubsetRenderable::subset, and QSSGRenderSubset::vertexBuffer.
Referenced by RenderHelpers::rhiRenderRenderable().
void QSSGCustomMaterialSystem::setRenderContextInterface | ( | QSSGRenderContextInterface * | inContext | ) |
Definition at line 43 of file qssgrhicustommaterialsystem.cpp.
QSSGRhiShaderPipelinePtr QSSGCustomMaterialSystem::shadersForCustomMaterial | ( | QSSGRhiGraphicsPipelineState * | ps, |
const QSSGRenderCustomMaterial & | material, | ||
QSSGSubsetRenderable & | renderable, | ||
const QSSGShaderFeatures & | featureSet | ||
) |
Definition at line 53 of file qssgrhicustommaterialsystem.cpp.
References QSSGRenderCustomMaterial::adapter, QSSGShaderMapKey::detach(), QHash< Key, T >::end(), QHash< Key, T >::find(), QSSGSubsetRenderable::firstImage, QSSGMaterialShaderGenerator::generateMaterialRhiShader(), QQsbCollection::EntryDesc::generateSha(), QHash< Key, T >::insert(), it, QSSGSubsetRenderable::lights, QSSGRenderCustomMaterial::m_shaderPathKey, QSSGSubsetRenderable::material, Q_QUICK3D_PROFILE_END_WITH_ID, Q_QUICK3D_PROFILE_START, Q_TRACE_SCOPE, QSSGRenderContextInterface::renderer(), QSSGRhiShaderPipeline::resetExtraTextures(), QSSGRenderContextInterface::rhiContext(), QSSGRenderContextInterface::shaderCache(), QSSGSubsetRenderable::shaderDescription, QSSGRenderContextInterface::shaderLibraryManager(), QSSGRhiGraphicsPipelineState::shaderPipeline, QSSGRenderContextInterface::shaderProgramGenerator(), QTimer::start(), timer, QQsbCollection::toFeatureSet(), and QSSGShaderDefaultMaterialKey::toString().
Referenced by RenderHelpers::rhiPrepareDepthPass(), rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().
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 | ||
) |
Definition at line 121 of file qssgrhicustommaterialsystem.cpp.
References camera, QRhi::clipSpaceCorrMatrix(), QSSGSubsetRenderable::firstImage, QSSGRenderer::getLayerGlobalRenderProperties(), QSSGLayerRenderData::getLightmapTexture(), QSSGRenderableObject::globalTransform, QSSGSubsetRenderable::lights, QSSGModelContext::model, QSSGSubsetRenderable::modelContext, QSSGModelContext::modelViewProjection, QSSGModelContext::normalMatrix, QSSGSubsetRenderable::opacity, QSSGRenderableObjectFlags::receivesReflections(), QSSGSubsetRenderable::reflectionProbe, QSSGRenderableObject::renderableFlags, QSSGRenderContextInterface::renderer(), QSSGSubsetRenderable::renderer, QSSGRhiContext::rhi(), QSSGMaterialShaderGenerator::setRhiMaterialProperties(), QSSGSubsetRenderable::shaderDescription, and toDataView().
Referenced by RenderHelpers::rhiPrepareDepthPass(), rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().