Qt Quick 3D - Custom Effect Example
Demonstrates writing custom post-processing effects.
The example implements its custom post-processing effects, which are then applied on the scene via SceneEnvironment::effects. It demonstrates both the simplest type of effects, that only have a fragment shader, and also the more advanced case with both a vertex and fragment shader present, with data passed between the too.
The shader snippets in the .vert
and .frag
files are written using the built-in keywords as described in the Effect documentation. Custom properties with basic types, as well as properties with the TextureInput type are automatically exposed to the shaders as uniforms and samplers.
Files:
- customeffect/CMakeLists.txt
- customeffect/customeffect.pro
- customeffect/main.cpp
- customeffect/main.qml
- customeffect/qml.qrc
Images: