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>.
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 QSSGShaderDefaultMaterialKeyProperties &defaultMaterialShaderKeyProperties, const QSSGShaderFeatures &featureSet)
 
void 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)
 
void 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)
 
void applyRhiShaderPropertyValues (char *ubufData, const QSSGRenderCustomMaterial &inMaterial, QSSGRhiShaderPipeline &shaderPipeline)
 
void rhiRenderRenderable (QSSGRhiContext *rhiCtx, QSSGSubsetRenderable &renderable, bool *needsSetViewport, QSSGRenderTextureCubeFace cubeFace, const QSSGRhiGraphicsPipelineState &state)
 

Detailed Description

Definition at line 42 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 619 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.

◆ 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,
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().

+ 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,
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().

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

◆ 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 QSSGShaderDefaultMaterialKeyProperties & defaultMaterialShaderKeyProperties,
const QSSGShaderFeatures & featureSet )

◆ updateUniformsForCustomMaterial()

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().

+ 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: