mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:13:51 +02:00
replace the model.frag and model.vert files from resource by the sl version of the shaders
This commit is contained in:
parent
7ea9f92492
commit
6628f7b811
2 changed files with 6 additions and 9 deletions
|
@ -235,8 +235,8 @@ void Model::initJointTransforms() {
|
|||
|
||||
void Model::init() {
|
||||
if (!_program.isLinked()) {
|
||||
_program.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + "shaders/model.vert");
|
||||
_program.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + "shaders/model.frag");
|
||||
_program.addShaderFromSourceCode(QGLShader::Vertex, model_vert);
|
||||
_program.addShaderFromSourceCode(QGLShader::Fragment, model_frag);
|
||||
|
||||
initProgram(_program, _locations);
|
||||
|
||||
|
@ -247,8 +247,7 @@ void Model::init() {
|
|||
|
||||
initProgram(_normalMapProgram, _normalMapLocations);
|
||||
|
||||
_specularMapProgram.addShaderFromSourceFile(QGLShader::Vertex,
|
||||
PathUtils::resourcesPath() + "shaders/model.vert");
|
||||
_specularMapProgram.addShaderFromSourceCode(QGLShader::Vertex, model_vert);
|
||||
_specularMapProgram.addShaderFromSourceFile(QGLShader::Fragment,
|
||||
PathUtils::resourcesPath() + "shaders/model_specular_map.frag");
|
||||
|
||||
|
@ -261,8 +260,7 @@ void Model::init() {
|
|||
|
||||
initProgram(_normalSpecularMapProgram, _normalSpecularMapLocations);
|
||||
|
||||
_translucentProgram.addShaderFromSourceFile(QGLShader::Vertex,
|
||||
PathUtils::resourcesPath() + "shaders/model.vert");
|
||||
_translucentProgram.addShaderFromSourceCode(QGLShader::Vertex, model_vert);
|
||||
_translucentProgram.addShaderFromSourceFile(QGLShader::Fragment,
|
||||
PathUtils::resourcesPath() + "shaders/model_translucent.frag");
|
||||
|
||||
|
@ -302,7 +300,7 @@ void Model::init() {
|
|||
PathUtils::resourcesPath() + "shaders/model_shadow.frag");
|
||||
|
||||
_skinProgram.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + "shaders/skin_model.vert");
|
||||
_skinProgram.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + "shaders/model.frag");
|
||||
_skinProgram.addShaderFromSourceCode(QGLShader::Fragment, model_frag);
|
||||
|
||||
initSkinProgram(_skinProgram, _skinLocations);
|
||||
|
||||
|
|
|
@ -23,8 +23,7 @@ void main(void) {
|
|||
normal = normalize(gl_ModelViewMatrix * vec4(gl_Normal, 0.0));
|
||||
|
||||
// pass along the diffuse color
|
||||
// gl_FrontColor = gl_Color * gl_FrontMaterial.diffuse;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_FrontColor = gl_Color * gl_FrontMaterial.diffuse;
|
||||
|
||||
// and the texture coordinates
|
||||
gl_TexCoord[0] = texcoordMatrices[0] * vec4(gl_MultiTexCoord0.xy, 0.0, 1.0);
|
||||
|
|
Loading…
Reference in a new issue