GRK-Projekt/grafika_projekt/shaders/bubble.frag

16 lines
346 B
GLSL
Raw Normal View History

2022-01-01 12:21:15 +01:00
#version 330 core
out vec4 gl_FragColor;
2021-12-30 12:14:47 +01:00
2022-01-01 12:21:15 +01:00
uniform sampler2D textureSampler;
in vec3 fragPos;
in vec3 interpNormal;
2021-12-30 12:14:47 +01:00
uniform vec3 cameraPos;
uniform samplerCube skybox;
void main()
{
2022-01-01 12:21:15 +01:00
vec3 I = normalize(fragPos - cameraPos);
vec3 R = reflect(I, normalize(interpNormal));
gl_FragColor = vec4(texture(skybox, R).rgb, 1.0);
2021-12-30 12:14:47 +01:00
}