summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dscustommaterial.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2017-11-29 17:06:05 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-12-05 11:41:27 +0000
commit43c5b993f18c8319c32a4ce29f429a987fc0b1c2 (patch)
tree0095863d4dbc9f005bd5073c460514dadc634c68 /src/runtime/q3dscustommaterial.cpp
parentb66988a48396d1ce7ba7f6c54c1e82d05109ef43 (diff)
Add shader generator for Custom Materials
This supports generating shader code for Custom Materials. This does not generate materials or passes yet (just example code). It also does not parse and generate uniforms based on the material parameters yet (which is needed to make this linkable shader code). Change-Id: I67d713868d6245fed23b869e2d850dc30370a58a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/runtime/q3dscustommaterial.cpp')
-rw-r--r--src/runtime/q3dscustommaterial.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/q3dscustommaterial.cpp b/src/runtime/q3dscustommaterial.cpp
index 0c34a98..72ee19c 100644
--- a/src/runtime/q3dscustommaterial.cpp
+++ b/src/runtime/q3dscustommaterial.cpp
@@ -177,7 +177,7 @@ Qt3DRender::QShaderProgram* Q3DSCustomMaterial::generateShaderProgram(const Q3DS
fragmentShaderCode.append(globalShared.toUtf8());
fragmentShaderCode.append(shared.toUtf8());
fragmentShaderCode.append(QByteArrayLiteral("\n#ifdef FRAGMENT_SHADER\n"));
- fragmentShaderCode.append(vertexShader.toUtf8());
+ fragmentShaderCode.append(fragmentShader.toUtf8());
fragmentShaderCode.append(QByteArrayLiteral("\n#endif\n"));
auto shaderProgram = new Qt3DRender::QShaderProgram();