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

@@ -1,9 +1,9 @@
- type: shader
id: circlemask
kind: source
path: "/Shaders/circlemask.gdsl"
path: "/Shaders/circlemask.swsl"
- type: shader
id: gradientcirclemask
kind: source
path: "/Shaders/gradientcirclemask.gdsl"
path: "/Shaders/gradientcirclemask.swsl"

View File

@@ -1,5 +1,3 @@
shader_type canvas_item;
float circle(in vec2 _st, in float _radius){
vec2 dist = _st-vec2(0.5);
return smoothstep(_radius-(_radius*0.01),
@@ -10,7 +8,6 @@ float circle(in vec2 _st, in float _radius){
void fragment(){
vec2 st = FRAGCOORD.xy*SCREEN_PIXEL_SIZE.xy;
COLOR = texture(TEXTURE, UV);
COLOR.rgb = vec3(0);
COLOR.a = circle(st,0.05);
}

View File

@@ -1,4 +1,3 @@
shader_type canvas_item;
uniform float percentagedistanceshow = 0.1;
uniform float gradientfalloffwidth = 0.2;