4#include <QtQuick3DRuntimeRender/private/qssgrenderer_p.h>
5#include <QtQuick3DRuntimeRender/private/qssgrendereffect_p.h>
6#include <QtQuick3DRuntimeRender/private/qssgrenderlayer_p.h>
7#include <QtQuick3DRuntimeRender/private/qssgrendercommands_p.h>
11#include <QtGui/QVector2D>
12#include <QtGui/QVector3D>
39 " qt_inputUV = attr_uv;\n"
40 " qt_textureUV = qt_effectTextureMapUV(attr_uv);\n"
41 " vec4 qt_vertPosition = vec4(attr_pos, 1.0);\n"
42 "#if QSHADER_VIEW_COUNT >= 2\n"
43 " qt_viewIndex = gl_ViewIndex;\n"
45 " qt_viewIndex = 0;\n"
47 " qt_customMain(qt_vertPosition.xyz);\n";
50 " gl_Position = qt_modelViewProjection * qt_vertPosition;\n";
62 "#include \"tonemapping.glsllib\"\n"
66 " fragOutput = qt_tonemap(fragOutput);\n"
85 const bool isLastPass =
i == ie - 1;
86 const bool shouldTonemapIfEnabled = isLastEffect && isLastPass;
93 const bool multiview = renderContext->
rhiContext()->mainPassViewCount() >= 2;
103 completeVertexShader = code;
104 sourceCodeForHash += code;
109 if (shouldTonemapIfEnabled)
113 completeFragmentShader = code;
114 sourceCodeForHash += code;
125 if (shouldTonemapIfEnabled) {
138 if (!completeVertexShader.isEmpty()) {
141 completeVertexShader,
144 if (!completeFragmentShader.isEmpty()) {
149 completeFragmentShader,
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
QByteArray & append(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QByteArray hash(QByteArrayView data, Algorithm method)
Returns the hash of data using method.
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
bool isYUpInFramebuffer() const
static void setTonemapFeatures(QSSGShaderFeatures &features, QSSGRenderLayer::TonemapMode tonemapMode)
const std::unique_ptr< QSSGRhiContext > & rhiContext() const
const std::shared_ptr< QSSGShaderLibraryManager > & shaderLibraryManager() const
QString & append(QChar c)
Combined button and popup list for selecting options.
GLsizei const GLubyte * commands
static const char * effect_vertex_main_pre
static const char * effect_vertex_main_post
static const char * effect_fragment_main_with_tonemapping
static const char * effect_fragment_main
static const char * effect_vertex_main_position
@ MultiViewShaderPathKeyIndex
@ RegularShaderPathKeyIndex
QByteArray shaderPathKeyPrefix
QSSGCustomShaderMetaData vertexMetaData[2]
QByteArray vertexShaderCode[2]
QSSGCustomShaderMetaData fragmentMetaData[2]
QByteArray fragmentShaderCode[2]
QVector< Command > commands
struct QSSGRenderEffect::@755 shaderPrepData
void finalizeShaders(const QSSGRenderLayer &layer, QSSGRenderContextInterface *renderContext)
QSSGRenderEffect * m_nextEffect
std::underlying_type_t< Flags > FlagT