-Textur. Bereiche) ... zum Beispiel - weiße Quadrate auf dem Boden (↓ USD) und es funktioniert korrekt. Bereiche)
Ich versuche zu verstehen, warum. Kann mir jemand helfen?
Code: Select all
glClearColor(0.6f, 0.62f, 0.65f, 1);
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glEnable(GL_CULL_FACE);
glFrontFace(GL_CW);
glDepthFunc(GL_LESS);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
Code: Select all
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTexCoords;
out vec3 FragPos;
out vec2 TexCoords;
uniform mat4 model;
uniform mat4 projection;
void main() {
FragPos = vec3(model * vec4(aPos, 1.0));
TexCoords = aTexCoords;
gl_Position = projection * vec4(FragPos, 1.0);
}
Code: Select all
#version 330 core
struct Material {
sampler2D diffuse;
};
uniform Material material;
out vec4 FragColor;
in vec2 TexCoords;
void main() {
FragColor = texture(material.diffuse, TexCoords);
}