summaryrefslogtreecommitdiff
path: root/demos/2d/texscreen
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/texscreen')
-rw-r--r--demos/2d/texscreen/bubbles.gd2
-rw-r--r--demos/2d/texscreen/bubbles.scnbin2626 -> 0 bytes
-rw-r--r--demos/2d/texscreen/bubbles.tscn32
-rw-r--r--demos/2d/texscreen/engine.cfg2
-rw-r--r--demos/2d/texscreen/lens.scnbin1850 -> 0 bytes
-rw-r--r--demos/2d/texscreen/lens.tscn29
6 files changed, 63 insertions, 2 deletions
diff --git a/demos/2d/texscreen/bubbles.gd b/demos/2d/texscreen/bubbles.gd
index 400da1a205..c0c7d892e6 100644
--- a/demos/2d/texscreen/bubbles.gd
+++ b/demos/2d/texscreen/bubbles.gd
@@ -7,5 +7,5 @@ const MAX_BUBBLES = 10
func _ready():
for i in range(MAX_BUBBLES):
- var bubble = preload("res://lens.scn").instance()
+ var bubble = preload("res://lens.tscn").instance()
add_child(bubble)
diff --git a/demos/2d/texscreen/bubbles.scn b/demos/2d/texscreen/bubbles.scn
deleted file mode 100644
index 8509b3811c..0000000000
--- a/demos/2d/texscreen/bubbles.scn
+++ /dev/null
Binary files differ
diff --git a/demos/2d/texscreen/bubbles.tscn b/demos/2d/texscreen/bubbles.tscn
new file mode 100644
index 0000000000..72b7874b92
--- /dev/null
+++ b/demos/2d/texscreen/bubbles.tscn
@@ -0,0 +1,32 @@
+[gd_scene load_steps=3 format=1]
+
+[ext_resource path="res://bubbles.gd" type="Script" id=1]
+[ext_resource path="res://burano.png" type="Texture" id=2]
+
+[node name="texscreen_demo" type="Control"]
+
+anchor/right = 1
+anchor/bottom = 1
+focus/ignore_mouse = false
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 0.0
+margin/top = 0.0
+margin/right = 0.0
+margin/bottom = 0.0
+script/script = ExtResource( 1 )
+
+[node name="burano" type="TextureFrame" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+size_flags/vertical = 2
+margin/left = 0.0
+margin/top = 0.0
+margin/right = 800.0
+margin/bottom = 600.0
+texture = ExtResource( 2 )
+
+
diff --git a/demos/2d/texscreen/engine.cfg b/demos/2d/texscreen/engine.cfg
index 92d0e98d5b..0a3f084270 100644
--- a/demos/2d/texscreen/engine.cfg
+++ b/demos/2d/texscreen/engine.cfg
@@ -1,7 +1,7 @@
[application]
name="Glass Bubbles (Texscreen)"
-main_scene="res://bubbles.scn"
+main_scene="res://bubbles.tscn"
icon="res://icon.png"
[display]
diff --git a/demos/2d/texscreen/lens.scn b/demos/2d/texscreen/lens.scn
deleted file mode 100644
index 530a0b1eb0..0000000000
--- a/demos/2d/texscreen/lens.scn
+++ /dev/null
Binary files differ
diff --git a/demos/2d/texscreen/lens.tscn b/demos/2d/texscreen/lens.tscn
new file mode 100644
index 0000000000..7f449e46ae
--- /dev/null
+++ b/demos/2d/texscreen/lens.tscn
@@ -0,0 +1,29 @@
+[gd_scene load_steps=5 format=1]
+
+[ext_resource path="res://lens.gd" type="Script" id=1]
+[ext_resource path="res://bubble.png" type="Texture" id=2]
+
+[sub_resource type="CanvasItemShader" id=1]
+
+_code = { "fragment":"vec4 normal = tex(TEXTURE,UV);\nvec2 offset = normal.xy * 2.0 - vec2(1.0);\nCOLOR.rgb=texscreen(SCREEN_UV+offset*0.03);\nCOLOR.a=normal.a;\nCOLOR.rgb*=vec3(1.0,0.8,0.7);\n", "fragment_ofs":0, "light":"", "light_ofs":0, "vertex":"", "vertex_ofs":0 }
+
+[sub_resource type="CanvasItemMaterial" id=2]
+
+shader/shader = SubResource( 1 )
+shader/shading_mode = 0
+
+[node name="glass" type="BackBufferCopy"]
+
+transform/pos = Vector2( 482.908, 346.807 )
+transform/scale = Vector2( 1.31289, 1.34009 )
+copy_mode = 1
+rect = Rect2( -100, -100, 200, 200 )
+script/script = ExtResource( 1 )
+
+[node name="lens" type="Sprite" parent="."]
+
+material/material = SubResource( 2 )
+transform/pos = Vector2( 1.6427, -2.90363 )
+texture = ExtResource( 2 )
+
+