mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-01-25 12:34:15 +00:00
feat: add imgui library & primitive shapes
This commit is contained in:
31
res/render/primitives/cube.frag
Normal file
31
res/render/primitives/cube.frag
Normal file
@@ -0,0 +1,31 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user