123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658 |
- [gd_scene load_steps=31 format=2]
- [ext_resource path="res://screen_shaders.gd" type="Script" id=1]
- [ext_resource path="res://art/burano.jpg" type="Texture" id=2]
- [ext_resource path="res://art/platformer.jpg" type="Texture" id=3]
- [ext_resource path="res://art/mountains.jpg" type="Texture" id=4]
- [ext_resource path="res://art/forest.jpg" type="Texture" id=5]
- [ext_resource path="res://art/vignette.png" type="Texture" id=6]
- [ext_resource path="res://art/white.png" type="Texture" id=7]
- [ext_resource path="res://art/filmgrain.png" type="Texture" id=8]
- [sub_resource type="Shader" id=1]
- code = "shader_type canvas_item;
- uniform sampler2D vignette;
- void fragment() {
- vec3 vignette_color = texture(vignette,UV).rgb;
- //screen texture stores gaussian blurred copies on mipmaps
- COLOR.rgb = textureLod(SCREEN_TEXTURE,SCREEN_UV,(1.0-vignette_color.r)*4.0).rgb;
- COLOR.rgb*= texture(vignette,UV).rgb;
- }"
- [sub_resource type="ShaderMaterial" id=2]
- render_priority = 0
- shader = SubResource( 1 )
- shader_param/vignette = ExtResource( 6 )
- _sections_unfolded = [ "shader", "shader_param" ]
- [sub_resource type="Shader" id=3]
- code = "shader_type canvas_item;
- uniform float amount : hint_range(0,5);
- void fragment() {
- COLOR.rgb = textureLod(SCREEN_TEXTURE,SCREEN_UV,amount).rgb;
- }"
- [sub_resource type="ShaderMaterial" id=4]
- render_priority = 0
- shader = SubResource( 3 )
- shader_param/amount = 4.0
- _sections_unfolded = [ "shader", "shader_param" ]
- [sub_resource type="Shader" id=5]
- code = "shader_type canvas_item;
- uniform float size_x=0.008;
- uniform float size_y=0.008;
- void fragment() {
- vec2 uv = SCREEN_UV;
- uv-=mod(uv,vec2(size_x,size_y));
-
- COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
- }
- "
- [sub_resource type="ShaderMaterial" id=6]
- render_priority = 0
- shader = SubResource( 5 )
- shader_param/size_x = null
- shader_param/size_y = null
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=7]
- code = "shader_type canvas_item;
- uniform float rotation=3.0;
- void fragment() {
- vec2 uv = SCREEN_UV;
- vec2 rel = uv-vec2(0.5,0.5);
- float angle = length(rel)*rotation;
- mat2 rot = mat2(vec2(cos(angle),-sin(angle)),vec2(sin(angle),cos(angle)));
- rel = rot * rel;
- uv = clamp(rel + vec2(0.5,0.5),vec2(0,0),vec2(1,1));
- COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
- }
- "
- [sub_resource type="ShaderMaterial" id=8]
- render_priority = 0
- shader = SubResource( 7 )
- shader_param/rotation = null
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=9]
- code = "shader_type canvas_item;
- uniform vec4 base : hint_color;
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
-
- //float v = max(c.r,max(c.g,c.b));
- float v = dot(c,vec3(0.33333,0.33333,0.33333));
- v=sqrt(v);
- //v*=v;
- COLOR.rgb= base.rgb*v;
- }"
- [sub_resource type="ShaderMaterial" id=10]
- render_priority = 0
- shader = SubResource( 9 )
- shader_param/base = Color( 0.54451, 0.408353, 0.403137, 1 )
- _sections_unfolded = [ "shader", "shader_param" ]
- [sub_resource type="Shader" id=11]
- code = "shader_type canvas_item;
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
- c=vec3(1.0)-c;
- COLOR.rgb=c;
- }
- "
- [sub_resource type="ShaderMaterial" id=12]
- render_priority = 0
- shader = SubResource( 11 )
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=13]
- code = "shader_type canvas_item;
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
- c=mod(c+vec3(0.5),vec3(1.0));
- COLOR.rgb=c;
- }
- "
- [sub_resource type="ShaderMaterial" id=14]
- render_priority = 0
- shader = SubResource( 13 )
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=15]
- code = "shader_type canvas_item;
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
- COLOR.rgb=normalize(c);
- }
- "
- [sub_resource type="ShaderMaterial" id=16]
- render_priority = 0
- shader = SubResource( 15 )
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=17]
- code = "shader_type canvas_item;
- uniform float brightness=0.8;
- uniform float contrast=1.5;
- uniform float saturation=1.8;
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
-
- c.rgb = mix(vec3(0.0),c.rgb,brightness);
- c.rgb = mix(vec3(0.5),c.rgb,contrast);
- c.rgb = mix(vec3(dot(vec3(1.0),c.rgb)*0.33333),c.rgb,saturation);
-
- COLOR.rgb=c;
- }
- "
- [sub_resource type="ShaderMaterial" id=18]
- render_priority = 0
- shader = SubResource( 17 )
- shader_param/brightness = null
- shader_param/contrast = null
- shader_param/saturation = null
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=19]
- code = "shader_type canvas_item;
- uniform float frequency=60;
- uniform float depth = 0.005;
- void fragment() {
-
- vec2 uv = SCREEN_UV;
- uv.x += sin(uv.y*frequency+TIME)*depth;
- uv.x = clamp(uv.x,0,1);
- vec3 c = textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
-
-
- COLOR.rgb=c;
- }
- "
- [sub_resource type="ShaderMaterial" id=20]
- render_priority = 0
- shader = SubResource( 19 )
- shader_param/frequency = null
- shader_param/depth = null
- _sections_unfolded = [ "shader" ]
- [sub_resource type="Shader" id=21]
- code = "shader_type canvas_item;
- uniform vec4 base : hint_color;
- uniform sampler2D grain;
- uniform float grain_strength=0.3;
- uniform sampler2D vignette;
- uniform float fps=12;
- uniform float stretch = 0.5;
- uniform float flashing=0.01;
- float make_grain(float time,vec2 uv) {
- vec2 ofs = vec2(sin(41.0*time*sin(time*123.0)),sin(27.0*time*sin(time*312.0)));
- return texture(grain,(uv+mod(ofs,vec2(1,1)))*stretch).r;
- }
- void fragment() {
- vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
-
- //float v = max(c.r,max(c.g,c.b));
- float v = dot(c,vec3(0.33333,0.33333,0.33333));
- v=sqrt(v);
- //v*=v;
-
- float f = 1.0/fps;
- float g = make_grain(TIME-mod(TIME,f),UV);
- g=max(g,make_grain(TIME-mod(TIME,f)+f,UV)*0.5);
- g=max(g,make_grain(TIME-mod(TIME,f)+f*2.0,UV)*0.25);
-
-
- COLOR.rgb= base.rgb*v-vec3(g)*grain_strength;
- COLOR.rgb*=texture(vignette,UV).r;
- float ft = TIME * 0.002;
- COLOR.rgb+=vec3(sin(75.0*ft*sin(ft*123.0)))*flashing;
- }
- "
- [sub_resource type="ShaderMaterial" id=22]
- render_priority = 0
- shader = SubResource( 21 )
- shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 )
- shader_param/grain_strength = 0.3
- shader_param/fps = 12
- shader_param/stretch = 0.5
- shader_param/flashing = 0.01
- shader_param/grain = ExtResource( 8 )
- shader_param/vignette = ExtResource( 6 )
- _sections_unfolded = [ "shader", "shader_param" ]
- [node name="Control" type="Control"]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- script = ExtResource( 1 )
- _sections_unfolded = [ "Pause" ]
- [node name="pictures" type="Control" parent="."]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- [node name="burano" type="TextureRect" parent="pictures"]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_right = 40.0
- margin_bottom = 40.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 2 )
- stretch_mode = 0
- [node name="roby" type="TextureRect" parent="pictures"]
- visible = false
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_right = 40.0
- margin_bottom = 40.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 3 )
- stretch_mode = 0
- [node name="mountains" type="TextureRect" parent="pictures"]
- visible = false
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_right = 40.0
- margin_bottom = 40.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 4 )
- stretch_mode = 0
- [node name="forest" type="TextureRect" parent="pictures"]
- visible = false
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_right = 40.0
- margin_bottom = 40.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 5 )
- stretch_mode = 0
- [node name="effects" type="Control" parent="."]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- _sections_unfolded = [ "Rect" ]
- [node name="disabled" type="Control" parent="effects"]
- visible = false
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_right = 40.0
- margin_bottom = 40.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- [node name="vignette" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 2 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="blur" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 4 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="pixelize" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 6 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="whirl" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 8 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="sepia" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 10 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- margin_right = 14.0
- margin_bottom = -2.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material", "Visibility" ]
- [node name="negative" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 12 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="contrasted" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 14 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="normalized" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 16 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="BCS" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 18 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- margin_top = 3.0
- margin_bottom = -3.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="mirage" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 20 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="old_film" type="TextureRect" parent="effects"]
- visible = false
- material = SubResource( 22 )
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- margin_left = -3.0
- margin_right = 3.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 1
- size_flags_horizontal = 2
- size_flags_vertical = 2
- texture = ExtResource( 7 )
- expand = true
- stretch_mode = 0
- _sections_unfolded = [ "Material" ]
- [node name="picture" type="OptionButton" parent="."]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_left = 8.0
- margin_top = 7.0
- margin_right = 131.0
- margin_bottom = 28.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- toggle_mode = false
- enabled_focus_mode = 2
- shortcut = null
- group = null
- flat = false
- align = 0
- selected = -1
- items = [ ]
- [node name="effect" type="OptionButton" parent="."]
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_left = 137.0
- margin_top = 7.0
- margin_right = 260.0
- margin_bottom = 28.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 0
- size_flags_horizontal = 2
- size_flags_vertical = 2
- toggle_mode = false
- enabled_focus_mode = 2
- shortcut = null
- group = null
- flat = false
- align = 0
- selected = -1
- items = [ ]
- [connection signal="item_selected" from="picture" to="." method="_on_picture_item_selected"]
- [connection signal="item_selected" from="effect" to="." method="_on_effect_item_selected"]
|