IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Shader QML Type

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

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Shader QML Type

  • Import Statement: import QtQuick3D

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

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+