Skyboxes
This commit is contained in:
parent
eb01ec4877
commit
f135d99d74
60 changed files with 924 additions and 90 deletions
18
resources/EngineResources/shaders/skybox_vertex.glsl
Normal file
18
resources/EngineResources/shaders/skybox_vertex.glsl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#version 450
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
layout(location = 0) out vec3 outTexCoords;
|
||||
|
||||
layout(set = 0, binding = 0) uniform ProjectionBuffer {
|
||||
mat4 proj;
|
||||
} uboProj;
|
||||
|
||||
layout(set = 1, binding = 0) uniform ViewBuffer {
|
||||
mat4 view;
|
||||
} uboView;
|
||||
|
||||
void main() {
|
||||
outTexCoords = inPosition;
|
||||
mat4 skyView = mat4(mat3(uboView.view));
|
||||
vec4 pos = uboProj.proj * skyView * vec4(inPosition, 1.0);
|
||||
gl_Position = vec4(pos.xy, 0.0, pos.w);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue