Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrenderdefaultmaterialshadergenerator_p.h
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QSSG_RENDER_DEFAULT_MATERIAL_SHADER_GENERATOR_H
6#define QSSG_RENDER_DEFAULT_MATERIAL_SHADER_GENERATOR_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick3DRuntimeRender/private/qssgrendermaterialshadergenerator_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrendershadercodegenerator_p.h>
21#include <QtQuick3DRuntimeRender/private/qssgrendershadowmap_p.h>
22#include <QtQuick3DRuntimeRender/private/qssgrenderlight_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrenderableimage_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrendershaderkeys_p.h>
25
27
33
34struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGMaterialShaderGenerator
35{
37 {
52 };
53
55 {
61 };
62
64
65 static const char* getSamplerName(QSSGRenderableImage::Type type);
66
67 static QSSGRhiShaderPipelinePtr generateMaterialRhiShader(const QByteArray &inShaderKeyPrefix,
68 QSSGMaterialVertexPipeline &vertexGenerator,
71 const QSSGShaderFeatures &inFeatureSet,
72 const QSSGRenderGraphObject &inMaterial,
73 const QSSGShaderLightListView &inLights,
74 QSSGRenderableImage *inFirstImage, QSSGShaderLibraryManager &shaderLibraryManager,
75 QSSGShaderCache &theCache);
76
77 static void setRhiMaterialProperties(const QSSGRenderContextInterface &,
79 char *ubufData,
80 QSSGRhiGraphicsPipelineState *inPipelineState,
81 const QSSGRenderGraphObject &inMaterial,
84 const QSSGRenderCamera &inCamera,
85 const QMatrix4x4 &inModelViewProjection,
86 const QMatrix3x3 &inNormalMatrix,
87 const QMatrix4x4 &inGlobalTransform,
88 const QMatrix4x4 &clipSpaceCorrMatrix,
89 const QMatrix4x4 &localInstanceTransform,
90 const QMatrix4x4 &globalInstanceTransform,
91 const QSSGDataView<float> &inMorphWeights,
92 QSSGRenderableImage *inFirstImage,
93 float inOpacity,
94 const QSSGLayerGlobalRenderProperties &inRenderProperties,
95 const QSSGShaderLightListView &inLights,
96 const QSSGShaderReflectionProbe &reflectionProbe,
97 bool receivesShadows,
98 bool receivesReflections,
99 const QVector2D *shadowDepthAdjust,
100 QRhiTexture *lightmapTexture);
101
102 static const char *directionalLightProcessorArgumentList();
103 static const char *pointLightProcessorArgumentList();
104 static const char *spotLightProcessorArgumentList();
105 static const char *ambientLightProcessorArgumentList();
106 static const char *specularLightProcessorArgumentList();
107 static const char *shadedFragmentMainArgumentList();
108 static const char *postProcessorArgumentList();
109 static const char *iblProbeProcessorArgumentList();
110 static const char *vertexMainArgumentList();
111 static const char *vertexInstancedMainArgumentList();
112
113private:
115 Q_DISABLE_COPY(QSSGMaterialShaderGenerator)
116};
117
119namespace CustomMaterial {
120// NOTE: Returns a copy of the actual list, cache as needed!
121[[nodiscard]] Q_QUICK3DRUNTIMERENDER_EXPORT QList<QByteArrayView> reservedArgumentNames();
122}
123}
124
126#endif
\inmodule QtCore
Definition qbytearray.h:57
Definition qlist.h:74
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtGui
Definition qrhi.h:883
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:31
Combined button and popup list for selecting options.
Q_QUICK3DRUNTIMERENDER_EXPORT QList< QByteArrayView > reservedArgumentNames()
GLuint64 key
GLenum type
GLsizei GLsizei GLuint * shaders
Definition qopenglext.h:677
std::shared_ptr< QSSGRhiShaderPipeline > QSSGRhiShaderPipelinePtr
~QSSGMaterialShaderGenerator()=default