Shader QML Type

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

import 语句: import QtQuick3D

特性

详细描述

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.

另请参阅 Effect .

特性文档编制

shader : url

Specifies the name of the shader source file. For details on how to write shader code, see the Effect 文档编制。

stage : enumeration

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

常量 描述
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.