Start day 26 Advanced Data and Advanced GLSL.
This commit is contained in:
parent
9310215aa3
commit
6c542eb014
119 changed files with 15705 additions and 0 deletions
16
26-advanced-data-glsl/shaders/11-lightsource.frag.glsl
Normal file
16
26-advanced-data-glsl/shaders/11-lightsource.frag.glsl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
struct Light {
|
||||
vec3 position;
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
};
|
||||
|
||||
uniform Light light;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(light.diffuse, 1.0); // set all 4 vector values to 1.0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue