summaryrefslogtreecommitdiff
path: root/demos/2d/texscreen/lens.tscn
blob: 7f449e46ae80fa7185255090e9f04d7bf515cb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 )