mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-01-25 16:34:17 +00:00
32 lines
424 B
GLSL
32 lines
424 B
GLSL
#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;
|
|
}
|