Move towards pixel upscaling filter

This commit is contained in:
2025-11-25 11:04:06 +00:00
parent f5a972d9e2
commit c0cfadbdd3
13 changed files with 107 additions and 49 deletions
+12 -3
View File
@@ -13,13 +13,22 @@ void main() {
// if (dist > rad) {
// discard;
// }
float t = texture(normals, vTexPos).w;
vec3 norm = texture(normals, vTexPos).xyz;
float y1 = dot(norm, distVec);
float y1 = dot(normalize(norm), normalize(distVec));
float y2 = float(y1 > 0 ? 1 : 0);
float x = 1 - (pow(dist / rad,4));
//float y2x = y2;
float y4 = float(y1 > 0 && y1 < 0.5 ? 0.5 : y2);
float y5 = max(0,y1);
//float y4 = smoothstep(-1,1,y1);
//float y4 = 0.25*pow(y1+1,2);
float y3 = float(t > 0
? y2
: (t == 0 ? y4 : y4));
//float x = 1 - (dist / rad);
//float x = 1;
//float x = (dist > rad ? 0 : 1);
vec3 c = y2* x * lumRad.rgb;
float x = 1 - (pow(dist / rad,4));
vec3 c = y3* x * lumRad.rgb;
fColor = vec4(c, 0);
}