Shader QML Type

Container component for defining shader code used by post-processing effects. More...

Import Statement: import QtQuick3D .

Properties

Detailed Description

The Shader type is used for populating the shaders list in the render pass of an Effect.

A shader is code which is executed directly on the graphic hardware at a particular stage of the rendering pipeline.

See also Effect.

Property Documentation

shader : url

Specifies the name of the shader source file. For details on how to write shader code, see the Effect documentation.

stage : enumeration

Specifies the stage of the rendering pipeline when the shader code will be executed. The default is Shader.Fragment

Constant Description
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).
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.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.0/qml-qtquick3d-shader.html