mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-03-31 11:01:37 +00:00
feat: replace triangle test by cube
This commit is contained in:
@@ -1,31 +1,11 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
struct Material
|
||||
{
|
||||
sampler2D diffuse;
|
||||
vec3 specular;
|
||||
float shininess;
|
||||
};
|
||||
struct Light
|
||||
{
|
||||
vec3 position;
|
||||
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
};
|
||||
|
||||
in vec3 FragPos;
|
||||
in vec3 Normal;
|
||||
in vec2 TexCoords;
|
||||
|
||||
uniform vec3 viewPos;
|
||||
uniform Material material;
|
||||
uniform Light light;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texColor = texture(material.diffuse , TexCoords);
|
||||
FragColor = texColor;
|
||||
FragColor = vec4(0.8, 0.8, 1.0, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user