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

ConstantDescription
Shader.VertexThe 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.FragmentThe 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.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.