Solved multiple texture loading problem.
This commit is contained in:
parent
40f12dd510
commit
3d3aaa3c3c
2 changed files with 2 additions and 5 deletions
|
|
@ -121,8 +121,5 @@ void main()
|
|||
color = color / (color + vec3(1.0));
|
||||
color = pow(color, vec3(1.0/2.2));
|
||||
|
||||
//FragColor = texture(texture_diffuse1, ourTexCoord);
|
||||
FragColor = texture(texture_metalness1, ourTexCoord);
|
||||
//FragColor = texture(texture_diffuse1, ourTexCoord) * vec4(color, 0.0);
|
||||
//FragColor = vec4(CameraPos,1.0);
|
||||
FragColor = texture(texture_diffuse1, ourTexCoord) * vec4(color, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ void Mesh::draw(ShaderLoader &shader) {
|
|||
error.log(("material." + name + number).c_str() + std::string(" ") +
|
||||
std::to_string(i) + " " + std::to_string(textures[i].id));
|
||||
|
||||
shader.setInt(("material." + name + number).c_str(), i);
|
||||
shader.setInt((name + number).c_str(), i);
|
||||
glBindTexture(GL_TEXTURE_2D, textures[i].id);
|
||||
// error.log(std::to_string(i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue