This commit is contained in:
Mari the Deer 2022-07-08 23:33:04 +02:00
commit b453560f59
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ void SetupMaterial( inout Material mat )
vec2 fcoord = fract(pos*size-vec2(.5));
vec2 coeff = fcoord*6.; // virtual upscale factor I guess?
float threshold = 0.; // this controls sharpness, kinda
coeff = (coeff-threshold)*1./(1.-2*threshold);
coeff = (coeff-threshold)*1./(1.-2.*threshold);
coeff = clamp(coeff,0.,1.);
mat.Base = texture(tex,pos+pxsize*(coeff-fcoord));
mat.Normal = ApplyNormalMap(vTexCoord.st);