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
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/qssgrendershadercodegenerator_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrendershadowmap_p.h>
21#include <QtQuick3DRuntimeRender/private/qssgrenderlight_p.h>
22#include <QtQuick3DRuntimeRender/private/qssgrenderableimage_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrenderableobjects_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrendershaderkeys_p.h>
25
27
30struct QSSGLayerGlobalRenderProperties;
32
33struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGMaterialShaderGenerator
34{
52
61
63
64 static const char* getSamplerName(QSSGRenderableImage::Type type);
65
66 static QSSGRhiShaderPipelinePtr generateMaterialRhiShader(const QByteArray &inShaderKeyPrefix,
67 QSSGMaterialVertexPipeline &vertexGenerator,
70 const QSSGShaderFeatures &inFeatureSet,
71 const QSSGRenderGraphObject &inMaterial,
72 const QSSGShaderLightListView &inLights,
73 QSSGRenderableImage *inFirstImage, QSSGShaderLibraryManager &shaderLibraryManager,
74 QSSGShaderCache &theCache);
75
76 static void setRhiMaterialProperties(const QSSGRenderContextInterface &,
78 char *ubufData,
79 QSSGRhiGraphicsPipelineState *inPipelineState,
80 const QSSGRenderGraphObject &inMaterial,
83 const QSSGRenderCameraList &inCameras,
84 const QSSGRenderMvpArray &inModelViewProjections,
85 const QMatrix3x3 &inNormalMatrix,
86 const QMatrix4x4 &inGlobalTransform,
87 const QMatrix4x4 &clipSpaceCorrMatrix,
88 const QMatrix4x4 &localInstanceTransform,
89 const QMatrix4x4 &globalInstanceTransform,
90 const QSSGDataView<float> &inMorphWeights,
91 QSSGRenderableImage *inFirstImage,
92 float inOpacity,
93 const QSSGLayerRenderData &inRenderProperties,
94 const QSSGShaderLightListView &inLights,
95 const QSSGShaderReflectionProbe &reflectionProbe,
96 bool receivesShadows,
97 bool receivesReflections,
98 const QVector2D *shadowDepthAdjust,
99 QRhiTexture *lightmapTexture);
100
101 static const char *directionalLightProcessorArgumentList();
102 static const char *pointLightProcessorArgumentList();
103 static const char *spotLightProcessorArgumentList();
104 static const char *ambientLightProcessorArgumentList();
105 static const char *specularLightProcessorArgumentList();
106 static const char *shadedFragmentMainArgumentList();
107 static const char *postProcessorArgumentList();
108 static const char *iblProbeProcessorArgumentList();
109 static const char *vertexMainArgumentList();
110 static const char *vertexInstancedMainArgumentList();
111
112private:
114 Q_DISABLE_COPY(QSSGMaterialShaderGenerator)
115};
116
118namespace CustomMaterial {
119// NOTE: Returns a copy of the actual list, cache as needed!
120[[nodiscard]] Q_QUICK3DRUNTIMERENDER_EXPORT QList<QByteArrayView> reservedArgumentNames();
121}
122}
123
125#endif
\inmodule QtCore
Definition qbytearray.h:57
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtGui
Definition qrhi.h:895
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::array< QMatrix4x4, 2 > QSSGRenderMvpArray
std::shared_ptr< QSSGRhiShaderPipeline > QSSGRhiShaderPipelinePtr
~QSSGMaterialShaderGenerator()=default