Made the game loose its edges

This commit is contained in:
Cametendo
2026-06-01 11:09:12 +02:00
parent 560a638eb6
commit 47e6f5e8e3

View File

@@ -19,8 +19,8 @@ void main() {
float lumaSquaredSum_tr = 0.0; float lumaSquaredSum_tr = 0.0;
vec3 colorSum_tr = vec3(0.0); vec3 colorSum_tr = vec3(0.0);
for (int i = 0; i <= 4; i++) { for (int i = 0; i <= 16; i++) {
for (int j = 0; j <= 4; j++) { for (int j = 0; j <= 16; j++) {
vec2 offset = vec2(float(i), float(j)) * texelSize; vec2 offset = vec2(float(i), float(j)) * texelSize;
vec3 neighborColor = texture(colortex0, texCoord + offset).rgb; vec3 neighborColor = texture(colortex0, texCoord + offset).rgb;
float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114)); float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114));
@@ -30,9 +30,9 @@ void main() {
lumaSquaredSum_tr += (luma * luma); lumaSquaredSum_tr += (luma * luma);
} }
} }
vec3 mean_tr = colorSum_tr / 25.0; vec3 mean_tr = colorSum_tr / 256.0;
float mean_luma_tr = lumaSum_tr / 25.0; float mean_luma_tr = lumaSum_tr / 256.0;
float variance_tr = (lumaSquaredSum_tr / 25.0) - (mean_luma_tr * mean_luma_tr); float variance_tr = (lumaSquaredSum_tr / 256.0) - (mean_luma_tr * mean_luma_tr);
// ========================================================================= // =========================================================================
// QUADRANT 2: Oben-Links (Top-Left) // QUADRANT 2: Oben-Links (Top-Left)
@@ -41,8 +41,8 @@ void main() {
float lumaSquaredSum_tl = 0.0; float lumaSquaredSum_tl = 0.0;
vec3 colorSum_tl = vec3(0.0); vec3 colorSum_tl = vec3(0.0);
for (int i = -4; i <= 0; i++) { for (int i = -16; i <= 0; i++) {
for (int j = 0; j <= 4; j++) { for (int j = 0; j <= 16; j++) {
vec2 offset = vec2(float(i), float(j)) * texelSize; vec2 offset = vec2(float(i), float(j)) * texelSize;
vec3 neighborColor = texture(colortex0, texCoord + offset).rgb; vec3 neighborColor = texture(colortex0, texCoord + offset).rgb;
float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114)); float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114));
@@ -52,9 +52,9 @@ void main() {
lumaSquaredSum_tl += (luma * luma); lumaSquaredSum_tl += (luma * luma);
} }
} }
vec3 mean_tl = colorSum_tl / 25.0; vec3 mean_tl = colorSum_tl / 256.0;
float mean_luma_tl = lumaSum_tl / 25.0; float mean_luma_tl = lumaSum_tl / 256.0;
float variance_tl = (lumaSquaredSum_tl / 25.0) - (mean_luma_tl * mean_luma_tl); float variance_tl = (lumaSquaredSum_tl / 256.0) - (mean_luma_tl * mean_luma_tl);
// ========================================================================= // =========================================================================
// QUADRANT 3: Unten-Links (Bottom-Left) // QUADRANT 3: Unten-Links (Bottom-Left)
@@ -63,8 +63,8 @@ void main() {
float lumaSquaredSum_bl = 0.0; float lumaSquaredSum_bl = 0.0;
vec3 colorSum_bl = vec3(0.0); vec3 colorSum_bl = vec3(0.0);
for (int i = -4; i <= 0; i++) { for (int i = -16; i <= 0; i++) {
for (int j = -4; j <= 0; j++) { for (int j = -16; j <= 0; j++) {
vec2 offset = vec2(float(i), float(j)) * texelSize; vec2 offset = vec2(float(i), float(j)) * texelSize;
vec3 neighborColor = texture(colortex0, texCoord + offset).rgb; vec3 neighborColor = texture(colortex0, texCoord + offset).rgb;
float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114)); float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114));
@@ -74,9 +74,9 @@ void main() {
lumaSquaredSum_bl += (luma * luma); lumaSquaredSum_bl += (luma * luma);
} }
} }
vec3 mean_bl = colorSum_bl / 25.0; vec3 mean_bl = colorSum_bl / 256.0;
float mean_luma_bl = lumaSum_bl / 25.0; float mean_luma_bl = lumaSum_bl / 256.0;
float variance_bl = (lumaSquaredSum_bl / 25.0) - (mean_luma_bl * mean_luma_bl); float variance_bl = (lumaSquaredSum_bl / 256.0) - (mean_luma_bl * mean_luma_bl);
// ========================================================================= // =========================================================================
// QUADRANT 4: Unten-Rechts (Bottom-Right) // QUADRANT 4: Unten-Rechts (Bottom-Right)
@@ -85,8 +85,8 @@ void main() {
float lumaSquaredSum_br = 0.0; float lumaSquaredSum_br = 0.0;
vec3 colorSum_br = vec3(0.0); vec3 colorSum_br = vec3(0.0);
for (int i = 0; i <= 4; i++) { for (int i = 0; i <= 16; i++) {
for (int j = -4; j <= 0; j++) { for (int j = -16; j <= 0; j++) {
vec2 offset = vec2(float(i), float(j)) * texelSize; vec2 offset = vec2(float(i), float(j)) * texelSize;
vec3 neighborColor = texture(colortex0, texCoord + offset).rgb; vec3 neighborColor = texture(colortex0, texCoord + offset).rgb;
float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114)); float luma = dot(neighborColor, vec3(0.299, 0.587, 0.114));
@@ -96,9 +96,9 @@ void main() {
lumaSquaredSum_br += (luma * luma); lumaSquaredSum_br += (luma * luma);
} }
} }
vec3 mean_br = colorSum_br / 25.0; vec3 mean_br = colorSum_br / 256.0;
float mean_luma_br = lumaSum_br / 25.0; float mean_luma_br = lumaSum_br / 256.0;
float variance_br = (lumaSquaredSum_br / 25.0) - (mean_luma_br * mean_luma_br); float variance_br = (lumaSquaredSum_br / 256.0) - (mean_luma_br * mean_luma_br);
// ========================================================================= // =========================================================================
// FINALE AUSWAHL: Den Quadranten mit der NIEDRIGSTEN Varianz finden // FINALE AUSWAHL: Den Quadranten mit der NIEDRIGSTEN Varianz finden