46 Q_DISABLE_COPY(QSSGCustomMaterialSystem)
47 typedef QPair<QByteArray, QByteArray> TStrStrPair;
48 typedef QHash<QSSGShaderMapKey, QSSGRhiShaderPipelinePtr> TShaderMap;
50 QSSGRenderContextInterface *context =
nullptr;
53 void setShaderResources(
char *ubufData,
54 const QSSGRenderCustomMaterial &inMaterial,
55 const QByteArray &inPropertyName,
56 const QVariant &propertyValue,
57 QSSGRenderShaderValue::Type inPropertyType,
58 QSSGRhiShaderPipeline &shaderPipeline);
61 QSSGCustomMaterialSystem();
62 ~QSSGCustomMaterialSystem();
66 void releaseCachedResources();
72 QSSGRenderCustomMaterial &inMaterial);
75 const QSSGRenderCustomMaterial &material,
76 QSSGSubsetRenderable &renderable,
77 const QSSGShaderDefaultMaterialKeyProperties &defaultMaterialShaderKeyProperties,
78 const QSSGShaderFeatures &featureSet,
79 const QSSGUserShaderAugmentation &shaderAugmentation = {});
82 QSSGRhiContext *rhiCtx,
85 QSSGRhiGraphicsPipelineState *ps,
86 const QSSGRenderCustomMaterial &material,
87 QSSGSubsetRenderable &renderable,
88 const QSSGRenderCameraList &cameras,
89 const QVector2D *depthAdjust,
90 const QMatrix4x4 *alteredModelViewProjection);
94 QSSGSubsetRenderable &renderable,
95 const QSSGShaderFeatures &featureSet,
96 const QSSGRenderCustomMaterial &material,
98 QRhiRenderPassDescriptor *renderPassDescriptor,
101 QSSGRenderCamera *camera =
nullptr,
103 QMatrix4x4 *modelViewProjection =
nullptr,
107 const QSSGRenderCustomMaterial &inMaterial,
108 QSSGRhiShaderPipeline &shaderPipeline);
110 QSSGSubsetRenderable &renderable,
111 bool *needsSetViewport,
112 QSSGRenderTextureCubeFace cubeFace,
113 const QSSGRhiGraphicsPipelineState &state,
114 qsizetype userPassIndex = -1);
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, bool oit=false)
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)
QSSGRhiShaderPipelinePtr shadersForCustomMaterial(QSSGRhiGraphicsPipelineState *ps, const QSSGRenderCustomMaterial &material, QSSGSubsetRenderable &renderable, const QSSGShaderDefaultMaterialKeyProperties &defaultMaterialShaderKeyProperties, const QSSGShaderFeatures &featureSet, const QSSGUserShaderAugmentation &shaderAugmentation={})
friend class QSSGLayerRenderData