Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qssgrhicustommaterialsystem_p.h>
Definition at line 42 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 619 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.
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, | ||
int | viewCount, | ||
QSSGRenderCamera * | camera = nullptr, | ||
QSSGRenderTextureCubeFace | cubeFace = QSSGRenderTextureCubeFaceNone, | ||
QMatrix4x4 * | modelViewProjection = nullptr, | ||
QSSGReflectionMapEntry * | entry = nullptr ) |
Definition at line 183 of file qssgrhicustommaterialsystem.cpp.
References QSSGRhiShaderResourceBindingList::addTexture(), QSSGRhiShaderResourceBindingList::addUniformBuffer(), AoTexture, AoTextureArray, QSSGRhiHelpers::bakeVertexInputLocations(), QSSGRenderCustomMaterial::Blending, QSet< T >::cend(), QSSGRhiContext::checkAndAdjustForNPoT(), QRhiSampler::ClampToEdge, QSSGRhiContext::commandBuffer(), QSSGGraphicsPipelineStateKey::create(), QRhiTexture::CubeMap, QSSGRhiGraphicsPipelineState::cullMode, CUSTOM_MATERIAL_VISIBILITY_ALL, DepthTexture, DepthTextureArray, direction, QRhiGraphicsPipeline::TargetBlend::dstAlpha, QRhiGraphicsPipeline::TargetBlend::dstColor, QSSGRhiContext::dummyTexture(), QRhiGraphicsPipeline::TargetBlend::enable, QRhiTexture::flags(), QRhiShaderResourceBinding::FragmentStage, QSSGRhiInputAssemblerStatePrivate::get(), QSSGRhiContextPrivate::get(), QSSGMaterialShaderGenerator::getSamplerName(), i, QSSGBaseTypeHelpers::indexOfCubeFace(), QSSGShaderFeatures::isSet(), it, LightmapTexture, LightProbe, QRhiSampler::Linear, QSSGRenderCustomMaterial::m_cullMode, QSSGRenderCustomMaterial::m_dstAlphaBlend, QSSGRenderCustomMaterial::m_dstBlend, QSSGRenderCustomMaterial::m_renderFlags, QSSGRenderCustomMaterial::m_srcAlphaBlend, QSSGRenderCustomMaterial::m_srcBlend, QRhiTexture::MipMapped, QRhiSampler::Nearest, QRhi::nextResourceUpdateBatch(), QRhiSampler::None, QRhiVertexInputBinding::PerInstance, position(), QSSGLayerRenderData::prepareInstancing(), QSSGParticleRenderer::prepareParticlesForModel(), qMax(), QSSGRenderTextureCubeFaceNone, QSSGShaderFeatures::ReflectionProbe, QRhiSampler::Repeat, QRhiCommandBuffer::resourceUpdate(), QSSGRhiContext::rhi(), QSSGRenderContextInterface::rhiContext(), QSSGRhiContext::sampler(), QShaderDescription::SamplerCube, QSSGRhiGraphicsPipelineState::samples, ScreenTexture, ScreenTextureArray, shadersForCustomMaterial(), QRhiGraphicsPipeline::TargetBlend::srcAlpha, QRhiGraphicsPipeline::TargetBlend::srcColor, QSSGRhiGraphicsPipelineState::targetBlend, QSSGRhiHelpers::toCullMode(), QSSGRhiHelpers::toRhi(), updateUniformsForCustomMaterial(), QSSGParticleRenderer::updateUniformsForParticleModel(), var, QRhiShaderResourceBinding::VertexStage, and QSSGRhiGraphicsPipelineState::viewCount.
Referenced by RenderHelpers::rhiPrepareRenderable().
void QSSGCustomMaterialSystem::rhiRenderRenderable | ( | QSSGRhiContext * | rhiCtx, |
QSSGSubsetRenderable & | renderable, | ||
bool * | needsSetViewport, | ||
QSSGRenderTextureCubeFace | cubeFace, | ||
const QSSGRhiGraphicsPipelineState & | state ) |
Definition at line 632 of file qssgrhicustommaterialsystem.cpp.
References cb, QSSGRhiContext::commandBuffer(), draw(), QSSGBaseTypeHelpers::indexOfCubeFace(), Q_QUICK3D_PROFILE_END_WITH_IDS, Q_QUICK3D_PROFILE_START, QSSGRenderTextureCubeFaceNone, QSSGRHICTX_STAT, QRhiResource::rhi(), and state.
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 QSSGShaderDefaultMaterialKeyProperties & | defaultMaterialShaderKeyProperties, | ||
const QSSGShaderFeatures & | featureSet ) |
Definition at line 53 of file qssgrhicustommaterialsystem.cpp.
References QSSGRenderCustomMaterial::adapter, QSSGShaderFeatures::DisableMultiView, QHash< Key, T >::end(), false, QHash< Key, T >::find(), QSSGMaterialShaderGenerator::generateMaterialRhiShader(), QQsbCollection::EntryDesc::generateSha(), QSSGRhiContextStats::get(), QSSGShaderKeyUnsigned< TBitWidth >::getValue(), QHash< Key, T >::insert(), QSSGShaderFeatures::isSet(), it, QSSGRenderCustomMaterial::m_shaderPathKey, QSSGShaderDefaultMaterialKeyProperties::m_viewCount, QSSGRenderCustomMaterial::MultiViewShaderPathKeyIndex, Q_QUICK3D_PROFILE_END_WITH_ID, Q_QUICK3D_PROFILE_START, Q_TRACE_SCOPE, QSSGRenderCustomMaterial::RegularShaderPathKeyIndex, QSSGRenderContextInterface::rhiContext(), QSSGRhiGraphicsPipelineStatePrivate::setShaderPipeline(), QSSGRenderContextInterface::shaderCache(), QSSGRenderContextInterface::shaderLibraryManager(), QSSGRenderContextInterface::shaderProgramGenerator(), QTimer::start(), timer, and QQsbCollection::toFeatureSet().
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 QSSGRenderCameraList & | cameras, | ||
const QVector2D * | depthAdjust, | ||
const QMatrix4x4 * | alteredModelViewProjection ) |
Definition at line 128 of file qssgrhicustommaterialsystem.cpp.
References QRhi::clipSpaceCorrMatrix(), QSSGRhiContext::rhi(), QSSGMaterialShaderGenerator::setRhiMaterialProperties(), and toDataView().
Referenced by RenderHelpers::rhiPrepareDepthPass(), rhiPrepareRenderable(), and rhiPrepareResourcesForShadowMap().