48 #include <Qt3DRender/QEffect>
49 #include <Qt3DRender/qshaderprogram.h>
50 #include <Qt3DRender/qparameter.h>
61 using namespace DISP3DLIB;
62 using namespace Qt3DRender;
74 , m_pAmbientColor(new QParameter(QStringLiteral(
"ka"), QColor::fromRgbF(0.2f, 0.2f, 0.2f, 1.0f)))
75 , m_pVertexGL3Shader(new QShaderProgram())
76 , m_pVertexES2Shader(new QShaderProgram())
85 void GeometryMultiplierMaterial::setShaderCode()
87 m_pVertexGL3Shader->setVertexShaderCode(QShaderProgram::loadSource(QUrl(QStringLiteral(
"qrc:/engine/model/materials/shaders/gl3/instancedposition.vert"))));
88 m_pVertexGL3Shader->setFragmentShaderCode(QShaderProgram::loadSource(QUrl(QStringLiteral(
"qrc:/engine/model/materials/shaders/gl3/instancedposition.frag"))));
90 m_pVertexES2Shader->setVertexShaderCode(QShaderProgram::loadSource(QUrl(QStringLiteral(
"qrc:/engine/model/materials/shaders/es2/instancedposition.vert"))));
91 m_pVertexES2Shader->setFragmentShaderCode(QShaderProgram::loadSource(QUrl(QStringLiteral(
"qrc:/engine/model/materials/shaders/es2/instancedposition.frag"))));
102 m_pAmbientColor->setValue(tColor);