Sketchy skybox

This commit is contained in:
2025-12-07 23:27:42 +01:00
parent df00e3052f
commit 7c438d1284
7 changed files with 534 additions and 47 deletions

View File

@@ -0,0 +1,22 @@
#version 460
#extension GL_EXT_scalar_block_layout : require
layout(location = 0) in vec3 directionWS;
out Varyings {
layout(location = 0) vec3 texCoord;
} var;
layout(set = 0, binding = 0, scalar) uniform GlobalUniforms {
mat4 matrixWStoVS;
mat4 matrixVStoCS;
vec3 ambientLight;
} _Global;
void main() {
vec3 directionVS = (_Global.matrixWStoVS * vec4(directionWS, 0.0)).xyz;
vec4 directionCS = _Global.matrixVStoCS * vec4(directionVS, 0.0);
gl_Position = vec4(directionCS.xy, 0.0, directionCS.w);
var.texCoord = -directionWS;
}