2022-01-02 01:26:44 +01:00
|
|
|
#version 430 compatibility
|
2021-12-30 12:14:47 +01:00
|
|
|
|
2022-01-02 00:03:53 +01:00
|
|
|
|
2022-01-02 01:26:44 +01:00
|
|
|
in vec3 fragPos;
|
|
|
|
in vec3 interpNormal;
|
2022-01-02 00:03:53 +01:00
|
|
|
uniform vec3 cameraPos;
|
2022-01-02 01:26:44 +01:00
|
|
|
uniform samplerCube skybox;
|
|
|
|
layout (binding = 0) uniform samplerCube tex_map;
|
2021-12-30 12:14:47 +01:00
|
|
|
void main()
|
2022-01-01 12:35:51 +01:00
|
|
|
{
|
2022-01-02 01:26:44 +01:00
|
|
|
vec3 r = reflect(normalize(-fragPos), normalize(interpNormal));
|
|
|
|
gl_FragColor = texture(tex_map, r);
|
2021-12-30 12:14:47 +01:00
|
|
|
}
|