Make content use SWSL shaders.

This commit is contained in:
Pieter-Jan Briers
2019-03-18 23:54:58 +01:00
parent 33a915fc67
commit 5e7b03d251
5 changed files with 10 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
uniform float percentagedistanceshow = 0.1;
uniform float gradientfalloffwidth = 0.2;
void fragment() {
float dist = distance(UV, vec2(0.5, 0.5));
float fromdiskdist = dist - percentagedistanceshow;
COLOR.a = max(0, min(1.0, 2.0*dist/percentagedistanceshow - 2.0));
COLOR.rgb = vec3(1,1,1) - vec3(fromdiskdist,fromdiskdist,fromdiskdist)/gradientfalloffwidth;
}