projects
/
opengl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
WIP on inverse kinematics
[opengl.git]
/
reflectfrag.glsl
1
#version 330
2
3
in vec3 fragPos;
4
in vec3 normal;
5
6
uniform vec3 viewPos;
7
uniform samplerCube skybox;
8
9
out vec4 fragColor;
10
11
void main() {
12
vec3 I = normalize(fragPos - viewPos);
13
vec3 R = reflect(I, normalize(normal));
14
fragColor = vec4(texture(skybox, R).rgb, 1);
15
}