![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\qmltype Shader \inherits QtObject \inqmlmodule QtQuick3D More...
Classes | |
| struct | ShaderType< QMetaType::Double > |
| struct | ShaderType< QMetaType::Bool > |
| struct | ShaderType< QMetaType::Int > |
| struct | ShaderType< QMetaType::QVector2D > |
| struct | ShaderType< QMetaType::QVector3D > |
| struct | ShaderType< QMetaType::QVector4D > |
| struct | ShaderType< QMetaType::QColor > |
| struct | ShaderType< QMetaType::QSize > |
| struct | ShaderType< QMetaType::QSizeF > |
| struct | ShaderType< QMetaType::QPoint > |
| struct | ShaderType< QMetaType::QPointF > |
| struct | ShaderType< QMetaType::QRect > |
| struct | ShaderType< QMetaType::QRectF > |
| struct | ShaderType< QMetaType::QQuaternion > |
| struct | ShaderType< QMetaType::QMatrix4x4 > |
| struct | ShaderType |
Typedefs | |
| using | MetaTypeList = QList<QMetaType::Type> |
| using | ResolveFunction = bool (*)(const QUrl &url, const QQmlContext *context, QByteArray &shaderData, QByteArray &shaderPathKey) |
Functions | |
| void | setResolveFunction (ResolveFunction fn) |
| QByteArray | resolveShader (const QUrl &fileUrl, const QQmlContext *context, QByteArray &shaderPathKey) |
| QByteArray | uniformTypeName (QMetaType type) |
| QByteArray | uniformTypeName (QSSGRenderShaderValue::Type type) |
| QSSGRenderShaderValue::Type | uniformType (QMetaType type) |
| MetaTypeList | supportedMetatypes () |
Variables | |
| ResolveFunction | resolveShaderOverride = nullptr |
| static constexpr QMetaType::Type | qssg_metatype_list [] |
\qmltype Shader \inherits QtObject \inqmlmodule QtQuick3D
Container component for defining shader code used by post-processing effects.
The Shader type is used for populating the \l{Pass::shaders}{shaders} list in the render \l{Pass}{pass} of an \l Effect.
A shader is code which is executed directly on the graphic hardware at a particular \l{Shader::stage}{stage} of the rendering pipeline.
\qmlproperty url Shader::shader Specifies the name of the shader source file. For details on how to write shader code, see the \l Effect documentation.
\qmlproperty enumeration Shader::stage Specifies the stage of the rendering pipeline when the shader code will be executed. The default is Shader.Fragment
\value Shader.Vertex The shader is a vertex shader. This code is run once per vertex in the input geometry and can be used to modify it before the geometry is rasterized (scan converted). In the case of effects, the input geometry is always a quad (four vertexes representing the corners of the render target). \value Shader.Fragment The shader is a fragment shader. After vertex processing, the modified geometry is turned into fragments (rasterization). Then a fragment shader is executed for each fragment, assigning a color to it. Fragments are a related concept to pixels, but with additional information attached. Also, as a result of some anti-aliasing strategies, there may be more than one fragment for each pixel in the output.
\qmltype TextureInput \inherits QtObject \inqmlmodule QtQuick3D
Specifies a texture exposed to the shaders of a CustomMaterial or Effect.
This is a type which can be used for exposing a \l Texture to a shader, either in the \l{Pass}{render pass} of an \l Effect, or in a \l CustomMaterial. It exists primarily to assign a local name to the \l Texture that can be referenced from shaders.
When a TextureInput property is declared in an \l Effect or a \l CustomMaterial, it will automatically be available as a sampler in all shaders by its property name.
\qmlproperty Texture TextureInput::texture The texture for which this TextureInput serves as an indirection.
\qmlproperty bool TextureInput::enabled The property determines if this TextureInput is enabled. The default value is true. When disabled, the shaders of the effect sample a dummy, opaque black texture instead of the one specified by \l texture.
\qmltype Pass \inherits QtObject \inqmlmodule QtQuick3D
Defines a render pass in an Effect.
An \l Effect may consist of multiple render passes. Each render pass has a setup phase where the list of \l{Pass::commands}{render commands} are executed, a \l{Pass::output}{output buffer} and a list of \l{Pass::shaders}{shaders} to use for rendering the effect.
See the documentation for \l Effect for more details on how to set up multiple rendering passes.
\qmlproperty Buffer Pass::output Specifies the output \l {Buffer}{buffer} of the pass.
\qmlproperty list Pass::commands Specifies the list of render \l {Command}{commands} of the pass.
\qmlproperty list Pass::shaders Specifies the list of \l {Shader}{shaders} of the pass.
\qmltype Command \inherits QtObject \inqmlmodule QtQuick3D
Supertype of commands to be performed as part of a pass in an Effect.
The Command type should not be instantiated by itself, but only exists as a polymorphic supertype for the different actions that can be performed as part of a \l{Pass}{render pass}.
\qmltype BufferInput \inherits Command \inqmlmodule QtQuick3D
Defines an input buffer to be used as input for a pass of an Effect.
BufferInput is a \l Command which can be added to the list of commands in the \l Pass of an \l Effect. When executed, it will expose the buffer as a sample to the shaders in the render pass. The shaders must declare a sampler with the name given in the BufferInput's sampler property.
This can be used for sharing intermediate results between the different passes of an effect.
\qmlproperty Buffer BufferInput::buffer Specifies the \l {Buffer}{buffer} which should be exposed to the shader.
\qmlproperty string BufferInput::sampler Specifies the name under which the buffer is exposed to the shader. When this property is not set, the buffer is exposed with the built-in name INPUT.
\qmltype Buffer \inherits QtObject \inqmlmodule QtQuick3D
Creates or references a color buffer to be used for a pass of an Effect.
A Buffer can be used to create intermediate buffers to share data between \l{Pass}{render passes} in an \l Effect.
\qmlproperty enumeration Buffer::format Specifies the texture format. The default value is Buffer.RGBA8.
\value Buffer.RGBA8 \value Buffer.RGBA16F \value Buffer.RGBA32F \value Buffer.R8 \value Buffer.R16 \value Buffer.R16F \value Buffer.R32F
\qmlproperty enumeration Buffer::textureFilterOperation Specifies the texture filtering mode when sampling the contents of the Buffer. The default value is Buffer.Linear.
\value Buffer.Nearest Use nearest-neighbor filtering. \value Buffer.Linear Use linear filtering.
\qmlproperty enumeration Buffer::textureCoordOperation Specifies the behavior for texture coordinates when sampling outside the [0, 1] range. The default is Buffer.ClampToEdge.
\value Buffer.ClampToEdge Clamp coordinates to the edges. \value Buffer.Repeat Wrap the coordinates at the edges to tile the texture. \value Buffer.MirroredRepeat Wrap the coordinate at the edges, but mirror the texture when tiling it.
\qmlproperty real Buffer::sizeMultiplier Specifies the size multiplier of the buffer. For instance, a value of 1.0 creates a buffer with the same size as the effect's input texture while 0.5 creates buffer where both width and height is half as big. The default value is 1.0.
\qmlproperty enumeration Buffer::bufferFlags Specifies the buffer allocation flags. The default is Buffer.None.
\value Buffer.None No special behavior. \value Buffer.SceneLifetime The buffer is allocated for the whole lifetime of the scene.
\qmlproperty string Buffer::name Specifies the name of the buffer.
\qmltype SetUniformValue \inherits Command \inqmlmodule QtQuick3D
Defines a value to be set during a single \l {Pass}{pass}.
SetUniformValue is a \l Command which can be added to the list of commands in a \l Pass. When executed, it will set the uniform given by the \l{SetUniformValue::target}{target} property to \l{SetUniformValue::value}{value}.
\qmlproperty string SetUniformValue::target Specifies the name of the uniform that will have its value changed during the \l {Pass}{pass}. This must match the name of an existing property in the \l Effect.
\qmlproperty Variant SetUniformValue::value Specifies the value that will be set on the target uniform.
\qmltype renderTargetBlend \inqmlmodule QtQuick3D
Defines blending parameters for a single color attachment of a render pass.
The renderTargetBlend type is used to specify blending parameters for a single color attachment of a \l RenderPass. An instance of renderTargetBlend can be assigned to one of the PipelineStateOverride::targetBlendN properties, where N is the index of the color attachment to configure.
\qmlproperty bool renderTargetBlend::blendEnabled If set to true, enables blending for the color attachment. If set to false, disables blending.
\qmlproperty enumeration renderTargetBlend::colorWrite Sets the color channels that will be written to the color attachment. \value renderTargetBlend.R \value renderTargetBlend.G \value renderTargetBlend.B \value renderTargetBlend.A
\qmlproperty enumeration renderTargetBlend::srcColor Sets the source color blend factor for the color attachment. \value renderTargetBlend.Zero \value renderTargetBlend.One \value renderTargetBlend.SrcColor \value renderTargetBlend.OneMinusSrcColor \value renderTargetBlend.DstColor \value renderTargetBlend.OneMinusDstColor \value renderTargetBlend.SrcAlpha \value renderTargetBlend.OneMinusSrcAlpha \value renderTargetBlend.DstAlpha \value renderTargetBlend.OneMinusDstAlpha \value renderTargetBlend.ConstantColor \value renderTargetBlend.OneMinusConstantColor \value renderTargetBlend.ConstantAlpha \value renderTargetBlend.OneMinusConstantAlpha \value renderTargetBlend.SrcAlphaSaturate \value renderTargetBlend.Src1Color \value renderTargetBlend.OneMinusSrc1Color \value renderTargetBlend.Src1Alpha \value renderTargetBlend.OneMinusSrc1Alpha
\qmlproperty enumeration renderTargetBlend::dstColor Sets the destination color blend factor for the color attachment. \value renderTargetBlend.Zero \value renderTargetBlend.One \value renderTargetBlend.SrcColor \value renderTargetBlend.OneMinusSrcColor \value renderTargetBlend.DstColor \value renderTargetBlend.OneMinusDstColor \value renderTargetBlend.SrcAlpha \value renderTargetBlend.OneMinusSrcAlpha \value renderTargetBlend.DstAlpha \value renderTargetBlend.OneMinusDstAlpha \value renderTargetBlend.ConstantColor \value renderTargetBlend.OneMinusConstantColor \value renderTargetBlend.ConstantAlpha \value renderTargetBlend.OneMinusConstantAlpha \value renderTargetBlend.SrcAlphaSaturate \value renderTargetBlend.Src1Color \value renderTargetBlend.OneMinusSrc1Color \value renderTargetBlend.Src1Alpha \value renderTargetBlend.OneMinusSrc1Alpha
\qmlproperty enumeration renderTargetBlend::opColor Sets the color blend operation for the color attachment. \value renderTargetBlend.Add \value renderTargetBlend.Subtract \value renderTargetBlend.ReverseSubtract \value renderTargetBlend.Min \value renderTargetBlend.Max
\qmlproperty enumeration renderTargetBlend::srcAlpha Sets the source alpha blend factor for the color attachment. \value renderTargetBlend.Zero \value renderTargetBlend.One \value renderTargetBlend.SrcColor \value renderTargetBlend.OneMinusSrcColor \value renderTargetBlend.DstColor \value renderTargetBlend.OneMinusDstColor \value renderTargetBlend.SrcAlpha \value renderTargetBlend.OneMinusSrcAlpha \value renderTargetBlend.DstAlpha \value renderTargetBlend.OneMinusDstAlpha \value renderTargetBlend.ConstantColor \value renderTargetBlend.OneMinusConstantColor \value renderTargetBlend.ConstantAlpha \value renderTargetBlend.OneMinusConstantAlpha \value renderTargetBlend.SrcAlphaSaturate \value renderTargetBlend.Src1Color \value renderTargetBlend.OneMinusSrc1Color \value renderTargetBlend.Src1Alpha \value renderTargetBlend.OneMinusSrc1Alpha
\qmlproperty enumeration renderTargetBlend::dstAlpha Sets the destination alpha blend factor for the color attachment. \value renderTargetBlend.Zero \value renderTargetBlend.One \value renderTargetBlend.SrcColor \value renderTargetBlend.OneMinusSrcColor \value renderTargetBlend.DstColor \value renderTargetBlend.OneMinusDstColor \value renderTargetBlend.SrcAlpha \value renderTargetBlend.OneMinusSrcAlpha \value renderTargetBlend.DstAlpha \value renderTargetBlend.OneMinusDstAlpha \value renderTargetBlend.ConstantColor \value renderTargetBlend.OneMinusConstantColor \value renderTargetBlend.ConstantAlpha \value renderTargetBlend.OneMinusConstantAlpha \value renderTargetBlend.SrcAlphaSaturate \value renderTargetBlend.Src1Color \value renderTargetBlend.OneMinusSrc1Color \value renderTargetBlend.Src1Alpha \value renderTargetBlend.OneMinusSrc1Alpha
\qmlproperty enumeration renderTargetBlend::opAlpha Sets the alpha blend operation for the color attachment. \value renderTargetBlend.Add \value renderTargetBlend.Subtract \value renderTargetBlend.ReverseSubtract \value renderTargetBlend.Min \value renderTargetBlend.Max
\qmltype PipelineStateOverride \inherits Command \inqmlmodule QtQuick3D
Defines pipeline state overrides for a single \l {RenderPass}{pass}.
PipelineStateOverride is a \l Command which can be added to the list of commands in a \l RenderPass. When executed, it will override the pipeline state in the render pass according to the properties set on the PipelineStateOverride. Only values that are set will override the existing pipeline state's values. If you want to reset a value that has been overriden to the default, then make sure to set the property to undefined.
\qmlproperty bool PipelineStateOverride::depthTestEnabled If set to true, enables depth testing for the render pass. If set to false, disables depth testing. Setting this property to true requires a depth attachment for the render pass.
\qmlproperty bool PipelineStateOverride::depthWriteEnabled If set to true, enables depth writing for the render pass. If set to false, disables depth writing. Setting this property to true requires a depth attachment for the render pass.
\qmlproperty bool PipelineStateOverride::blendEnabled If set to true, enables blending for the render pass. If set to false, disables blending.
\qmlproperty bool PipelineStateOverride::usesStencilReference If set to true, enables the use of stencil reference value for the render pass. If set to false, disables the use of stencil reference value.
\qmlproperty bool PipelineStateOverride::usesScissor If set to true, enables the use of scissor test for the render pass. If set to false, disables the use of scissor test.
\qmlproperty enumeration PipelineStateOverride::depthFunction Sets the depth comparison function for the render pass. \value PipelineStateOverride.Never \value PipelineStateOverride.Less \value PipelineStateOverride.Equal \value PipelineStateOverride.LessOrEqual \value PipelineStateOverride.Greater \value PipelineStateOverride.NotEqual \value PipelineStateOverride.GreaterOrEqual \value PipelineStateOverride.Always
\qmlproperty enumeration PipelineStateOverride::cullMode Sets the face culling mode for the render pass. \value PipelineStateOverride.None \value PipelineStateOverride.Front \value PipelineStateOverride.Back
\qmlproperty enumeration PipelineStateOverride::polygonMode Sets the polygon rasterization mode for the render pass. \value PipelineStateOverride.Fill \value PipelineStateOverride.Line
\qmlproperty uint PipelineStateOverride::stencilWriteMask Sets the stencil write mask for the render pass.
\qmlproperty uint PipelineStateOverride::stencilReference Sets the stencil reference value for the render pass.
\qmlproperty Rectangle PipelineStateOverride::viewport Sets the viewport rectangle for the render pass.
\qmlproperty Rectangle PipelineStateOverride::scissor Sets the scissor rectangle for the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend0 Sets the blending parameters for color attachment 0 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend1 Sets the blending parameters for color attachment 1 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend2 Sets the blending parameters for color attachment 2 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend3 Sets the blending parameters for color attachment 3 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend4 Sets the blending parameters for color attachment 4 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend5 Sets the blending parameters for color attachment 5 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend6 Sets the blending parameters for color attachment 6 of the render pass.
\qmlproperty TargetBlend PipelineStateOverride::targetBlend7 Sets the blending parameters for color attachment 7 of the render pass.
\qmltype DepthStencilAttachment \inherits Command \inqmlmodule QtQuick3D
Defines a depth-stencil attachment for a RenderPass.
The DepthStencilAttachment type is used to specify a depth-stencil attachment for a \l RenderPass. This represents a render buffer attachment, so it cannot be directly sampled in shaders.
Definition at line 37 of file qquick3dshaderutils_p.h.
| using QSSGShaderUtils::ResolveFunction = bool (*)(const QUrl &url, const QQmlContext *context, QByteArray &shaderData, QByteArray &shaderPathKey) |
Definition at line 38 of file qquick3dshaderutils_p.h.
| QByteArray QSSGShaderUtils::resolveShader | ( | const QUrl & | fileUrl, |
| const QQmlContext * | context, | ||
| QByteArray & | shaderPathKey ) |
Definition at line 493 of file qquick3dshaderutils.cpp.
References resolveShaderOverride.
| void QSSGShaderUtils::setResolveFunction | ( | ResolveFunction | fn | ) |
Definition at line 488 of file qquick3dshaderutils.cpp.
References resolveShaderOverride.
| MetaTypeList QSSGShaderUtils::supportedMetatypes | ( | ) |
Definition at line 758 of file qquick3dshaderutils.cpp.
| QSSGRenderShaderValue::Type QSSGShaderUtils::uniformType | ( | QMetaType | type | ) |
Definition at line 719 of file qquick3dshaderutils.cpp.
| QByteArray QSSGShaderUtils::uniformTypeName | ( | QMetaType | type | ) |
Definition at line 642 of file qquick3dshaderutils.cpp.
| QByteArray QSSGShaderUtils::uniformTypeName | ( | QSSGRenderShaderValue::Type | type | ) |
Definition at line 681 of file qquick3dshaderutils.cpp.
|
staticconstexpr |
Definition at line 519 of file qquick3dshaderutils.cpp.
| ResolveFunction QSSGShaderUtils::resolveShaderOverride = nullptr |
Definition at line 486 of file qquick3dshaderutils.cpp.
Referenced by resolveShader(), and setResolveFunction().