Add skybox rendering support
This commit is contained in:
parent
f6a9d18c5c
commit
f943e4c945
4 changed files with 93 additions and 3 deletions
15
resources/shaders/skybox.vert
Normal file
15
resources/shaders/skybox.vert
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 330 core
|
||||
|
||||
in vec3 position;
|
||||
|
||||
uniform mat4 view;
|
||||
|
||||
uniform mat4 projection;
|
||||
|
||||
out vec3 direction;
|
||||
|
||||
void main() {
|
||||
direction = position;
|
||||
vec4 pos = projection * view * vec4(position, 1.0);
|
||||
gl_Position = pos.xyww;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue