diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-06-28 15:42:53 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-06-29 12:00:05 +0000 |
commit | b87fd4752afd6b559d69ec2e08b2e3df69373b9e (patch) | |
tree | 49497c0aefb1fdb379f69c9f96ee4cfb596defb0 /src/quick/doc | |
parent | ee595e9c0a4a24733195db22244cbf17b8514f72 (diff) |
D3D12: Add support for shader sources in files
Now we support all combinations: source strings, HLSL source in files
and bytecode in files. The type of file contents is detected
automatically.
Change-Id: Id6ab269df52463fb95a9a1ef2598ed5576a873d3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc b/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc index d506e68d6a..fbbc947c4c 100644 --- a/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc +++ b/src/quick/doc/src/concepts/visualcanvas/adaptations.qdoc @@ -236,9 +236,18 @@ different than with OpenGL. With D3D12, these strings can either be an URL for a local file or a file in the resource system, or a HLSL source string. The former indicates that the file in question contains pre-compiled D3D shader bytecode generated by the -\c fxc tool. - -See the ShaderEffect documentation for a detailed description. +\c fxc tool, or, alternatively, HLSL source code. The type of the file is detected +automatically. This means that the D3D12 backend supports all options from +GraphicsInfo.shaderCompilationType and GraphicsInfo.shaderSourceType. + +Unlike OpenGL, there is a QFileSelector with the extra selector \c hlsl used +whenever opening a file. This allows easy creation of ShaderEffect items that +are functional across both backends, for example by placing the GLSL source +code into "shaders/effect.frag", the HLSL source code or - preferably - +pre-compiled bytecode into "shaders/+hlsl/effect.frag", while simply writing +\c{fragmentShader: "qrc:shaders/effect.frag"} in QML. + +See the ShaderEffect documentation for more details. \section2 Unsupported Features |