Added [models] example - skybox loading and drawing

This commit is contained in:
skullbulb 2024-11-09 19:34:09 +00:00
parent 553871567e
commit 382cbda3de
4 changed files with 168 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#version 330
// input vertex attributes (from vertex shader)
in vec3 fragPosition;
// input uniform values
uniform samplerCube environmentMap;
// output fragment color
out vec4 finalColor;
void main()
{
// fetch color from texture map
vec3 color = texture(environmentMap, fragPosition).rgb;
// calculate final fragment color
finalColor = vec4(color, 1.0);
}