Graphic tweaks/cleanup

This commit is contained in:
2025-12-01 12:37:54 +00:00
parent 1635ce0176
commit 25efce7a89
8 changed files with 116 additions and 146 deletions
+2 -2
View File
@@ -1,13 +1,13 @@
#version 450 core
layout(early_fragment_tests) in;
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 lumRad; };
layout (binding = 0) uniform sampler2D screenTexture;
layout (binding = 0) uniform sampler2D posTexture;
layout (binding = 1) uniform sampler2D normals;
in vec2 vTexPos;
out vec4 fColor;
float rad = lumRad.a;
void main() {
vec3 pos = texture(screenTexture, vTexPos).xyz;
vec3 pos = texture(posTexture, vTexPos).xyz;
vec3 distVec = pos - lightPos.xyz;
float dist = dot(distVec, distVec);
vec3 norm = texture(normals, vTexPos).xyz;
+2 -2
View File
@@ -1,13 +1,13 @@
#version 450 core
layout(early_fragment_tests) in;
layout (std140, binding = 1) uniform TheLight { vec4 lightPos; vec4 lumRad; };
layout (binding = 0) uniform sampler2D screenTexture;
layout (binding = 0) uniform sampler2D posTexture;
layout (binding = 1) uniform sampler2D normals;
in vec2 vTexPos;
out vec4 fColor;
float rad = lumRad.a;
void main() {
vec3 pos = texture(screenTexture, vTexPos).xyz;
vec3 pos = texture(posTexture, vTexPos).xyz;
vec3 distVec = pos - lightPos.xyz;
float dist = dot(distVec, distVec);
// float dist = dot(distVec.xy, distVec.xy);
+1 -1
View File
@@ -1,5 +1,5 @@
#version 450 core
layout (std140, binding = 2) uniform PosTex { vec4 posTex[6]; };
layout (std140, binding = 2) uniform PosTex { vec4 posTex[3]; };
out vec2 vTexPos;
void main() {
gl_Position = vec4(posTex[gl_VertexID].xy,0,1);