started adding some cool effects
This commit is contained in:
1 parent
77c8195ba9
commit
e0c93f0e19
57 files changed
+351
-159
No files matched your search
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Shadow 2D.
|
||||
* License: CC0
|
||||
* https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform vec2 deform = vec2(2.0, 2.0);
|
||||
uniform vec2 offset = vec2(0.0, 0.0);
|
||||
uniform vec4 modulate : source_color;
|
||||
|
||||
|
||||
//uniform vec2 texture_size; //uncomment for GLES2
|
||||
|
||||
void fragment() {
|
||||
vec2 ps = TEXTURE_PIXEL_SIZE;
|
||||
vec2 uv = UV;
|
||||
float sizex = float(textureSize(TEXTURE,int(ps.x)).x); //comment for GLES2
|
||||
float sizey = float(textureSize(TEXTURE,int(ps.y)).y); //comment for GLES2
|
||||
//float sizex = texture_size.x; //uncomment for GLES2
|
||||
//float sizey = texture_size.y; //uncomment for GLES2
|
||||
uv.y+=offset.y*ps.y;
|
||||
uv.x+=offset.x*ps.x;
|
||||
float decalx=((uv.y-ps.x*sizex)*deform.x);
|
||||
float decaly=((uv.y-ps.y*sizey)*deform.y);
|
||||
uv.x += decalx;
|
||||
uv.y += decaly;
|
||||
vec4 shadow = vec4(modulate.rgb, texture(TEXTURE, uv).a * modulate.a);
|
||||
vec4 col = texture(TEXTURE, UV);
|
||||
COLOR = mix(shadow, col, col.a);
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://c7o14m3k38ifi
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="SpriteFrames" format=3 uid="uid://c34ha4ekm1xor"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_0qj0m"]
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/sprites/symphonyguys.png" id="1_0qj0m"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lswn8"]
|
||||
atlas = ExtResource("1_0qj0m")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="SpriteFrames" format=3 uid="uid://bpfq0ubeyinny"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_6cuj6"]
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/sprites/symphonyguys.png" id="1_6cuj6"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kek77"]
|
||||
atlas = ExtResource("1_6cuj6")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="SpriteFrames" format=3 uid="uid://brmhup007maeh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_t5mbj"]
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/sprites/symphonyguys.png" id="1_t5mbj"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lquwl"]
|
||||
atlas = ExtResource("1_t5mbj")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="SpriteFrames" format=3 uid="uid://bkq7b1w5jh1ec"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_yt1t7"]
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/sprites/symphonyguys.png" id="1_yt1t7"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w48qg"]
|
||||
atlas = ExtResource("1_yt1t7")
|
||||
|
||||
Reference in new issue
Block a user