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

@@ -131,7 +131,12 @@ namespace Content.Client.GameObjects
{ {
if (_currentEffect != ScreenEffects.None) if (_currentEffect != ScreenEffects.None)
{ {
_overlayManager.AddOverlay(EffectsDictionary[_currentEffect]); var overlay = EffectsDictionary[_currentEffect];
if (_overlayManager.HasOverlay(overlay.ID))
{
return;
}
_overlayManager.AddOverlay(overlay);
} }
} }

View File

@@ -1,9 +1,9 @@
- type: shader - type: shader
id: circlemask id: circlemask
kind: source kind: source
path: "/Shaders/circlemask.gdsl" path: "/Shaders/circlemask.swsl"
- type: shader - type: shader
id: gradientcirclemask id: gradientcirclemask
kind: source 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){ float circle(in vec2 _st, in float _radius){
vec2 dist = _st-vec2(0.5); vec2 dist = _st-vec2(0.5);
return smoothstep(_radius-(_radius*0.01), return smoothstep(_radius-(_radius*0.01),
@@ -10,7 +8,6 @@ float circle(in vec2 _st, in float _radius){
void fragment(){ void fragment(){
vec2 st = FRAGCOORD.xy*SCREEN_PIXEL_SIZE.xy; vec2 st = FRAGCOORD.xy*SCREEN_PIXEL_SIZE.xy;
COLOR = texture(TEXTURE, UV);
COLOR.rgb = vec3(0); COLOR.rgb = vec3(0);
COLOR.a = circle(st,0.05); COLOR.a = circle(st,0.05);
} }

View File

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

View File

@@ -7,4 +7,5 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RSI/@EntryIndexedValue">RSI</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RSI/@EntryIndexedValue">RSI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UV/@EntryIndexedValue">UV</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UV/@EntryIndexedValue">UV</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Noto/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> <s:Boolean x:Key="/Default/UserDictionary/Words/=Noto/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=swsl/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>