Cleanup shadows

This commit is contained in:
2025-11-12 22:54:43 +00:00
parent cdf998a1e2
commit 5e9d337288
11 changed files with 118 additions and 428 deletions
+8 -8
View File
@@ -1,16 +1,16 @@
#version 450 core
struct PosTex { vec4 pospos; vec4 texang; };
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 colrad; };
layout (std430, binding = 2) readonly buffer Pos { PosTex data[]; };
layout(location=0) uniform vec3 lightPos;
layout(location=1) uniform float rad;
float rad = colrad.w;
int indices[18] =
{5,1,7 // 6----7
,7,1,3 // /| /|
,7,3,6 // 2-+--3 |
,6,3,2 // | 4 | 5
,6,2,4 // 0 1
,4,2,0
{5,7,1 // 6----7
,7,3,1 // /| /|
,7,6,3 // 2-+--3 |
,6,2,3 // | 4 | 5
,6,4,2 // 0 1
,4,0,2
};
vec2 shift(vec2 p) {
return vec2(lightPos.xy + (rad * normalize(p - lightPos.xy)));