diff options
26 files changed, 375 insertions, 923 deletions
@@ -1,3 +1,5 @@ +# Godot 4+ specific ignores +.godot/ # Godot-specific ignores .import/ diff --git a/Character.gd b/Character.gd index ecd2314..ab22574 100644 --- a/Character.gd +++ b/Character.gd @@ -1,9 +1,9 @@ -extends AnimatedSprite +extends AnimatedSprite2D var moving = 0 func _ready(): - playing = true + play() animation = "idle" func _process(delta): @@ -7,17 +7,15 @@ A simple Godot shader that simulates CRT Displays. ![Without Shader](sample.png) ![With Shader](withshader.png) -## How to install +## How to install (Godot 4.x) -You can copy simply copy the CRTShader.shader +You can copy simply copy the CRTShader.shader to any ColorRect. -A tutorial on how to install the Shader on Godot 2.x (YouTube): [https://www.youtube.com/watch?v=ydrC-3Uy-aY&feature=youtu.be](https://www.youtube.com/watch?v=ydrC-3Uy-aY&feature=youtu.be) +You can also just add the `CRTScreen` node to your project (a node that sets some of the shader parameters automatically). -## For Godot 3.x +### For Godot 2.x and 3.x -You can simply copy the CRTShader.shader code to use on your project; to set it up, just use it in a an TextureRect with a white texture. Your game must be running 'under' the node for the CRT Shader to have any effect. - -You can modify the values of the Shader using the Uniform Variables. +There are separate branches for Godot 2.x and 3.x versions. ## How the Shader works This Shader is made of 3 main components: diff --git a/ShaderTestScreen.tscn b/ShaderTestScreen.tscn index 4b4ab74..639e091 100644 --- a/ShaderTestScreen.tscn +++ b/ShaderTestScreen.tscn @@ -1,249 +1,161 @@ -[gd_scene load_steps=28 format=2] - -[ext_resource path="res://sample.png" type="Texture" id=1] -[ext_resource path="res://white.png" type="Texture" id=2] -[ext_resource path="res://addons/crt_shader/CRTFrame.png" type="Texture" id=3] -[ext_resource path="res://character.png" type="Texture" id=4] -[ext_resource path="res://Character.gd" type="Script" id=5] -[ext_resource path="res://addons/crt_shader/ShaderScreen.material" type="Material" id=6] - -[sub_resource type="AtlasTexture" id=9] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 120, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=10] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 140, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=11] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 160, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=12] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 180, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=13] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 200, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=14] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 220, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=15] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 240, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=16] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 260, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=17] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 0, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=18] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 20, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=19] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 40, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=20] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 60, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=21] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 80, 0, 20, 24 ) - -[sub_resource type="AtlasTexture" id=22] -flags = 4 -atlas = ExtResource( 4 ) -region = Rect2( 100, 0, 20, 24 ) - -[sub_resource type="SpriteFrames" id=23] -animations = [ { -"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ) ], +[gd_scene load_steps=22 format=3 uid="uid://d3q6ao60jioly"] + +[ext_resource type="Texture2D" uid="uid://6qyj7vxdxs7h" path="res://samples/sample.png" id="1"] +[ext_resource type="Texture2D" uid="uid://b7rrbl58e5lm6" path="res://addons/crt_shader/CRTFrame.png" id="3"] +[ext_resource type="Texture2D" uid="uid://hbmkqqavbg6" path="res://character.png" id="4"] +[ext_resource type="Script" path="res://Character.gd" id="5"] +[ext_resource type="Script" path="res://addons/crt_shader/crt_screen.gd" id="5_ks51q"] +[ext_resource type="Material" uid="uid://cxr7ihe8nn4hv" path="res://addons/crt_shader/ShaderScreen.material" id="6"] + +[sub_resource type="AtlasTexture" id="9"] +atlas = ExtResource("4") +region = Rect2(120, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="10"] +atlas = ExtResource("4") +region = Rect2(140, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="11"] +atlas = ExtResource("4") +region = Rect2(160, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="12"] +atlas = ExtResource("4") +region = Rect2(180, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="13"] +atlas = ExtResource("4") +region = Rect2(200, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="14"] +atlas = ExtResource("4") +region = Rect2(220, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="15"] +atlas = ExtResource("4") +region = Rect2(240, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="16"] +atlas = ExtResource("4") +region = Rect2(260, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="17"] +atlas = ExtResource("4") +region = Rect2(0, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="18"] +atlas = ExtResource("4") +region = Rect2(20, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="19"] +atlas = ExtResource("4") +region = Rect2(40, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="20"] +atlas = ExtResource("4") +region = Rect2(60, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="21"] +atlas = ExtResource("4") +region = Rect2(80, 0, 20, 24) + +[sub_resource type="AtlasTexture" id="22"] +atlas = ExtResource("4") +region = Rect2(100, 0, 20, 24) + +[sub_resource type="SpriteFrames" id="23"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("9") +}, { +"duration": 1.0, +"texture": SubResource("10") +}, { +"duration": 1.0, +"texture": SubResource("11") +}, { +"duration": 1.0, +"texture": SubResource("12") +}, { +"duration": 1.0, +"texture": SubResource("13") +}, { +"duration": 1.0, +"texture": SubResource("14") +}, { +"duration": 1.0, +"texture": SubResource("15") +}, { +"duration": 1.0, +"texture": SubResource("16") +}], "loop": true, -"name": "idle", +"name": &"idle", "speed": 5.0 }, { -"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ) ], +"frames": [{ +"duration": 1.0, +"texture": SubResource("17") +}, { +"duration": 1.0, +"texture": SubResource("18") +}, { +"duration": 1.0, +"texture": SubResource("19") +}, { +"duration": 1.0, +"texture": SubResource("20") +}, { +"duration": 1.0, +"texture": SubResource("21") +}, { +"duration": 1.0, +"texture": SubResource("22") +}], "loop": true, -"name": "run", +"name": &"run", "speed": 5.0 -} ] - -[sub_resource type="Shader" id=1] -code = "shader_type canvas_item; - -uniform float BarrelPower =1.1; - -vec2 distort(vec2 p) -{ - - float angle = p.y / p.x; - float theta = atan(p.y,p.x); - float radius = pow(length(p), BarrelPower); - - p.x = radius * cos(theta); - p.y = radius * sin(theta); - - return 0.5 * (p + vec2(1.0,1.0)); -} -void fragment() -{ - -vec2 xy = SCREEN_UV * 2.0; -xy.x -= 1.0; -xy.y -= 1.0; - -float d = length(xy); -if(d < 1.5){ - xy = distort(xy); -} -else{ - xy = SCREEN_UV; -} -COLOR = texture(SCREEN_TEXTURE,xy); -} - - - -" - -[sub_resource type="ShaderMaterial" id=2] -shader = SubResource( 1 ) -shader_param/BarrelPower = 1.1 - -[sub_resource type="Shader" id=3] -code = "shader_type canvas_item; - -uniform float color_bleeding = 0.9; -uniform float bleeding_range = 2; -uniform float screen_width = 1024; -void fragment() -{ - float pixel_size = 1.0/screen_width*bleeding_range; - vec4 color_left = texture(SCREEN_TEXTURE,SCREEN_UV - vec2(pixel_size, 0)); - vec4 current_color = texture(SCREEN_TEXTURE,SCREEN_UV); - current_color = current_color*vec4(color_bleeding,0.5,0.25,1); - color_left = color_left*vec4(0.25,0.5,color_bleeding,1); - COLOR.rgba = (current_color + color_left); -}" - -[sub_resource type="ShaderMaterial" id=4] -shader = SubResource( 3 ) -shader_param/color_bleeding = 0.9 -shader_param/bleeding_range = 2.0 -shader_param/screen_width = 1024.0 - -[sub_resource type="Shader" id=5] -code = "shader_type canvas_item; - -uniform float lines_distance = 4.0; -uniform float pixel_size = 2.0; -uniform float size_screen = 600; -uniform float scanline_alpha = 0.9; -uniform float lines_velocity = 30.0; - -void fragment() -{ - float line_row = floor((SCREEN_UV.y * size_screen/pixel_size) + mod(TIME*lines_velocity, lines_distance)); - - float n = 1.0 - ceil((mod(line_row,lines_distance)/lines_distance)); - -vec4 c = texture(SCREEN_TEXTURE,SCREEN_UV); -c = c - n*c*(1.0 - scanline_alpha); -c.a = 1.0; -COLOR = c; -}" - -[sub_resource type="ShaderMaterial" id=6] -shader = SubResource( 5 ) -shader_param/lines_distance = 4.0 -shader_param/pixel_size = 2.0 -shader_param/size_screen = 600.0 -shader_param/scanline_alpha = 0.9 -shader_param/lines_velocity = 30.0 +}] [node name="Control" type="Control"] -margin_right = 40.0 -margin_bottom = 40.0 - -[node name="Sprite" type="Sprite" parent="."] -texture = ExtResource( 1 ) +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1") centered = false -[node name="Character" type="AnimatedSprite" parent="."] -position = Vector2( 95.038, 473.203 ) -scale = Vector2( 3.77667, 3.77667 ) -frames = SubResource( 23 ) -animation = "idle" -script = ExtResource( 5 ) - -[node name="Shaders" type="Control" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Curvature" type="TextureRect" parent="Shaders"] -visible = false -material = SubResource( 2 ) -margin_right = 1024.0 -margin_bottom = 600.0 -texture = ExtResource( 2 ) -expand = true - -[node name="ColorBleeding" type="TextureRect" parent="Shaders"] -visible = false -material = SubResource( 4 ) -margin_right = 1024.0 -margin_bottom = 600.0 -texture = ExtResource( 2 ) -expand = true - -[node name="ScanLine" type="TextureRect" parent="Shaders"] -visible = false -material = SubResource( 6 ) -margin_right = 1024.0 -margin_bottom = 600.0 -texture = ExtResource( 2 ) -expand = true - -[node name="CRT" type="TextureRect" parent="Shaders"] -material = ExtResource( 6 ) -margin_right = 1024.0 -margin_bottom = 600.0 -texture = ExtResource( 2 ) -expand = true -__meta__ = { -"_edit_use_anchors_": false -} +[node name="Character" type="AnimatedSprite2D" parent="."] +position = Vector2(95.038, 473.203) +scale = Vector2(3.77667, 3.77667) +sprite_frames = SubResource("23") +animation = &"idle" +frame_progress = 0.646237 +script = ExtResource("5") + +[node name="CRTScreen" type="ColorRect" parent="."] +material = ExtResource("6") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("5_ks51q") [node name="CRTFrame" type="TextureRect" parent="."] -margin_right = 1082.0 -margin_bottom = 812.0 -rect_scale = Vector2( 0.946396, 0.738916 ) -texture = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_right = 58.0 +offset_bottom = 212.0 +grow_horizontal = 2 +grow_vertical = 2 +scale = Vector2(0.946396, 0.738916) +texture = ExtResource("3") diff --git a/addons/crt_shader/CRTCanvasLayer.tscn b/addons/crt_shader/CRTCanvasLayer.tscn deleted file mode 100644 index 7292765..0000000 --- a/addons/crt_shader/CRTCanvasLayer.tscn +++ /dev/null @@ -1,442 +0,0 @@ -[gd_scene load_steps=8 format=2] - -[ext_resource path="res://addons/crt_shader/CRTShader.gd" type="Script" id=1] -[ext_resource path="res://addons/crt_shader/ShaderScreen.material" type="Material" id=2] -[ext_resource path="res://addons/crt_shader/CRTFrame.png" type="Texture" id=3] - -[sub_resource type="Animation" id=4] -resource_name = "Glitch" -length = 0.4 -step = 0.02 -tracks/0/type = "value" -tracks/0/path = NodePath(".:material:shader_param/BarrelPower") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 0.18, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 1.1, 1.1, 1.15, 1.1 ] -} -tracks/1/type = "value" -tracks/1/path = NodePath(".:material:shader_param/color_bleeding") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 2.0, 5.0, 5.0, 2.0 ] -} -tracks/2/type = "value" -tracks/2/path = NodePath(".:material:shader_param/bleeding_range_x") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 1.5, -4.0, -4.0, 1.5 ] -} -tracks/3/type = "value" -tracks/3/path = NodePath(".:material:shader_param/bleeding_range_y") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 1.5, -1.0, -1.0, 1.5 ] -} -tracks/4/type = "value" -tracks/4/path = NodePath(".:material:shader_param/lines_distance") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 3.0, 0.0, 0.0, 3.0 ] -} -tracks/5/type = "value" -tracks/5/path = NodePath(".:material:shader_param/scan_size") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 2.0, 1.0, 1.0, 2.0 ] -} -tracks/6/type = "value" -tracks/6/path = NodePath(".:material:shader_param/scanline_alpha") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 0.9, 0.0, 0.0, 0.9 ] -} -tracks/7/type = "value" -tracks/7/path = NodePath(".:material:shader_param/lines_velocity") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/keys = { -"times": PoolRealArray( 0, 0.16, 0.2, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ 40.0, 0.0, 0.0, 40.0 ] -} -tracks/8/type = "method" -tracks/8/path = NodePath(".") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/keys = { -"times": PoolRealArray( 0.18 ), -"transitions": PoolRealArray( 1 ), -"values": [ { -"args": [ ], -"method": "call_funcref" -} ] -} - -[sub_resource type="Animation" id=6] -resource_name = "GlitchLoop" -length = 0.6 -loop = true -step = 0.02 -tracks/0/type = "value" -tracks/0/path = NodePath(".:material:shader_param/BarrelPower") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 1.1 ] -} -tracks/1/type = "value" -tracks/1/path = NodePath(".:material:shader_param/color_bleeding") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0, 0.3, 0.34 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 2.0, 3.0, 3.0 ] -} -tracks/2/type = "value" -tracks/2/path = NodePath(".:material:shader_param/bleeding_range_x") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0, 0.3, 0.34 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 2.0, -4.0, -4.0 ] -} -tracks/3/type = "value" -tracks/3/path = NodePath(".:material:shader_param/bleeding_range_y") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"times": PoolRealArray( 0, 0.3, 0.34 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 2.0, -2.0, -2.0 ] -} -tracks/4/type = "value" -tracks/4/path = NodePath(".:material:shader_param/lines_distance") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 3.0 ] -} -tracks/5/type = "value" -tracks/5/path = NodePath(".:material:shader_param/scan_size") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/keys = { -"times": PoolRealArray( 0, 0.3, 0.34 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 3.0, 1.0, 1.0 ] -} -tracks/6/type = "value" -tracks/6/path = NodePath(".:material:shader_param/scanline_alpha") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 0.8 ] -} -tracks/7/type = "value" -tracks/7/path = NodePath(".:material:shader_param/lines_velocity") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/keys = { -"times": PoolRealArray( 0, 0.3, 0.34 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 20.0, 0.0, 0.0 ] -} - -[sub_resource type="Animation" id=7] -resource_name = "Glitch_Start" -length = 0.22 -step = 0.02 -tracks/0/type = "value" -tracks/0/path = NodePath(".:material:shader_param/BarrelPower") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 1.1, 1.15, 1.1 ] -} -tracks/1/type = "value" -tracks/1/path = NodePath(".:material:shader_param/color_bleeding") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 5.0, 5.0, 2.0 ] -} -tracks/2/type = "value" -tracks/2/path = NodePath(".:material:shader_param/bleeding_range_x") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ -4.0, -4.0, 1.5 ] -} -tracks/3/type = "value" -tracks/3/path = NodePath(".:material:shader_param/bleeding_range_y") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ -1.0, -1.0, 1.5 ] -} -tracks/4/type = "value" -tracks/4/path = NodePath(".:material:shader_param/lines_distance") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 0.0, 0.0, 3.0 ] -} -tracks/5/type = "value" -tracks/5/path = NodePath(".:material:shader_param/scan_size") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 1.0, 1.0, 2.0 ] -} -tracks/6/type = "value" -tracks/6/path = NodePath(".:material:shader_param/scanline_alpha") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 0.0, 0.0, 0.9 ] -} -tracks/7/type = "value" -tracks/7/path = NodePath(".:material:shader_param/lines_velocity") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/keys = { -"times": PoolRealArray( 0, 0.02, 0.22 ), -"transitions": PoolRealArray( 1, 1, 1 ), -"update": 0, -"values": [ 0.0, 0.0, 40.0 ] -} - -[sub_resource type="Animation" id=5] -length = 0.001 -tracks/0/type = "value" -tracks/0/path = NodePath(".:material:shader_param/BarrelPower") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 1.1 ] -} -tracks/1/type = "value" -tracks/1/path = NodePath(".:material:shader_param/color_bleeding") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 2.0 ] -} -tracks/2/type = "value" -tracks/2/path = NodePath(".:material:shader_param/bleeding_range_x") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 1.5 ] -} -tracks/3/type = "value" -tracks/3/path = NodePath(".:material:shader_param/bleeding_range_y") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 1.5 ] -} -tracks/4/type = "value" -tracks/4/path = NodePath(".:material:shader_param/lines_distance") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 3.0 ] -} -tracks/5/type = "value" -tracks/5/path = NodePath(".:material:shader_param/scan_size") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 2.0 ] -} -tracks/6/type = "value" -tracks/6/path = NodePath(".:material:shader_param/scanline_alpha") -tracks/6/interp = 1 -tracks/6/loop_wrap = true -tracks/6/imported = false -tracks/6/enabled = true -tracks/6/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 0.9 ] -} -tracks/7/type = "value" -tracks/7/path = NodePath(".:material:shader_param/lines_velocity") -tracks/7/interp = 1 -tracks/7/loop_wrap = true -tracks/7/imported = false -tracks/7/enabled = true -tracks/7/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 40.0 ] -} - -[node name="CRTCanvasLayer" type="CanvasLayer"] - -[node name="CRTShader" type="ColorRect" parent="."] -material = ExtResource( 2 ) -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 1 ) - -[node name="GlitchAnimation" type="AnimationPlayer" parent="CRTShader"] -anims/Glitch = SubResource( 4 ) -anims/GlitchLoop = SubResource( 6 ) -anims/Glitch_Start = SubResource( 7 ) -anims/RESET = SubResource( 5 ) - -[node name="FrameTexture" type="TextureRect" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -texture = ExtResource( 3 ) -expand = true diff --git a/addons/crt_shader/CRTFrame.png.import b/addons/crt_shader/CRTFrame.png.import index 0ecb5d8..8a3d11d 100644 --- a/addons/crt_shader/CRTFrame.png.import +++ b/addons/crt_shader/CRTFrame.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/CRTFrame.png-872eedb156a5c6ffe1f1a64a1e49445b.stex" +type="CompressedTexture2D" +uid="uid://b7rrbl58e5lm6" +path="res://.godot/imported/CRTFrame.png-872eedb156a5c6ffe1f1a64a1e49445b.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://addons/crt_shader/CRTFrame.png" -dest_files=[ "res://.import/CRTFrame.png-872eedb156a5c6ffe1f1a64a1e49445b.stex" ] +dest_files=["res://.godot/imported/CRTFrame.png-872eedb156a5c6ffe1f1a64a1e49445b.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/crt_shader/CRTShader.gd b/addons/crt_shader/CRTShader.gd deleted file mode 100644 index 464b275..0000000 --- a/addons/crt_shader/CRTShader.gd +++ /dev/null @@ -1,23 +0,0 @@ -extends ColorRect - -onready var glitch_loop = false -onready var fun = null - -func _ready(): - $GlitchAnimation.connect("animation_finished", self, "_on_animation_finished") - -func _on_animation_finished(anim): - if anim == "Glitch" and glitch_loop: - $GlitchAnimation.play("GlitchLoop") - -func start_glitch_loop(): - $GlitchAnimation.play("GlitchLoop") - glitch_loop = true - -func tween(fun : FuncRef, force = false): - if not force and $GlitchAnimation.is_playing() and $GlitchAnimation.current_animation == "Glitch": return - $GlitchAnimation.play("Glitch") - self.fun = fun - -func call_funcref(): - if fun: fun.call_func() diff --git a/addons/crt_shader/CRTShader.shader b/addons/crt_shader/CRTShader.gdshader index d7e8afd..d7ca24f 100644 --- a/addons/crt_shader/CRTShader.shader +++ b/addons/crt_shader/CRTShader.gdshader @@ -1,5 +1,6 @@ shader_type canvas_item; +uniform sampler2D screen_texture : hint_screen_texture; uniform float screen_width = 1024; uniform float screen_height = 600; @@ -15,27 +16,27 @@ uniform float scan_size = 2.0; uniform float scanline_alpha = 0.9; uniform float lines_velocity = 30.0; -vec2 distort(vec2 p) +vec2 distort(vec2 p) { float angle = p.y / p.x; float theta = atan(p.y,p.x); float radius = pow(length(p), BarrelPower); - + p.x = radius * cos(theta); p.y = radius * sin(theta); - - return 0.5 * (p + vec2(1.0,1.0)); + + return 0.5 * (p + vec2(1.0, 1.0)); } void get_color_bleeding(inout vec4 current_color,inout vec4 color_left){ - current_color = current_color*vec4(color_bleeding,0.5,1.0-color_bleeding,1); - color_left = color_left*vec4(1.0-color_bleeding,0.5,color_bleeding,1); + current_color = current_color * vec4(color_bleeding, 0.5, 1.0 - color_bleeding, 1); + color_left = color_left * vec4(1.0 - color_bleeding, 0.5, color_bleeding, 1); } -void get_color_scanline(vec2 uv,inout vec4 c,float time){ - float line_row = floor((uv.y * screen_height/scan_size) + mod(time*lines_velocity, lines_distance)); - float n = 1.0 - ceil((mod(line_row,lines_distance)/lines_distance)); - c = c - n*c*(1.0 - scanline_alpha); +void get_color_scanline(vec2 uv, inout vec4 c, float time){ + float line_row = floor((uv.y * screen_height/scan_size) + mod(time * lines_velocity, lines_distance)); + float n = 1.0 - ceil( (mod(line_row,lines_distance) / lines_distance)); + c = c - n * c * (1.0 - scanline_alpha); c.a = 1.0; } @@ -44,7 +45,7 @@ void fragment() vec2 xy = SCREEN_UV * 2.0; xy.x -= 1.0; xy.y -= 1.0; - + float d = length(xy); if(d < 1.5){ xy = distort(xy); @@ -52,14 +53,13 @@ void fragment() else{ xy = SCREEN_UV; } - - float pixel_size_x = 1.0/screen_width*bleeding_range_x; - float pixel_size_y = 1.0/screen_height*bleeding_range_y; - vec4 color_left = texture(SCREEN_TEXTURE,xy - vec2(pixel_size_x, pixel_size_y)); - vec4 current_color = texture(SCREEN_TEXTURE,xy); - get_color_bleeding(current_color,color_left); - vec4 c = current_color+color_left; + + float pixel_size_x = 1.0/screen_width * bleeding_range_x; + float pixel_size_y = 1.0/screen_height * bleeding_range_y; + vec4 color_left = texture(screen_texture, xy - vec2(pixel_size_x, pixel_size_y)); + vec4 current_color = texture(screen_texture, xy); + get_color_bleeding(current_color, color_left); + vec4 c = current_color + color_left; get_color_scanline(xy,c,TIME); COLOR = c; - } diff --git a/addons/crt_shader/ShaderScreen.material b/addons/crt_shader/ShaderScreen.material Binary files differindex b7432da..03171f3 100644 --- a/addons/crt_shader/ShaderScreen.material +++ b/addons/crt_shader/ShaderScreen.material diff --git a/addons/crt_shader/crt_screen.gd b/addons/crt_shader/crt_screen.gd new file mode 100644 index 0000000..5674626 --- /dev/null +++ b/addons/crt_shader/crt_screen.gd @@ -0,0 +1,18 @@ +@tool +extends ColorRect + +const ShaderScreenMaterial: ShaderMaterial = preload("res://addons/crt_shader/ShaderScreen.material") + + +func _ready() -> void: + if material == null: + material = ShaderScreenMaterial + + item_rect_changed.connect(_update_screen_parameters) + _update_screen_parameters() + + +func _update_screen_parameters(): + var shader_material : ShaderMaterial = material + shader_material.set_shader_parameter("screen_width", size.x) + shader_material.set_shader_parameter("screen_height", size.y) diff --git a/addons/crt_shader/crt_shader.gd b/addons/crt_shader/crt_shader.gd index 49e712e..50053a9 100644 --- a/addons/crt_shader/crt_shader.gd +++ b/addons/crt_shader/crt_shader.gd @@ -1,10 +1,10 @@ -tool +@tool extends EditorPlugin func _enter_tree(): - pass + add_custom_type("CRTScreen", "ColorRect", preload("res://addons/crt_shader/crt_screen.gd"), preload("res://addons/crt_shader/icon.png")) func _exit_tree(): - pass + remove_custom_type("CRTScreen") diff --git a/addons/crt_shader/icon.png b/addons/crt_shader/icon.png Binary files differnew file mode 100644 index 0000000..a39bb38 --- /dev/null +++ b/addons/crt_shader/icon.png diff --git a/addons/crt_shader/icon.png.import b/addons/crt_shader/icon.png.import new file mode 100644 index 0000000..853d9fd --- /dev/null +++ b/addons/crt_shader/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7pxefljbvdfo" +path="res://.godot/imported/icon.png-258ab7dc402d28bf674efd9b9f590b1f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/crt_shader/icon.png" +dest_files=["res://.godot/imported/icon.png-258ab7dc402d28bf674efd9b9f590b1f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/character.png.import b/character.png.import index 0457bcc..c020b69 100644 --- a/character.png.import +++ b/character.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/character.png-7a996d3b758d22c506b76a7c15391284.stex" +type="CompressedTexture2D" +uid="uid://hbmkqqavbg6" +path="res://.godot/imported/character.png-7a996d3b758d22c506b76a7c15391284.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://character.png" -dest_files=[ "res://.import/character.png-7a996d3b758d22c506b76a7c15391284.stex" ] +dest_files=["res://.godot/imported/character.png-7a996d3b758d22c506b76a7c15391284.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/default_env.tres b/default_env.tres index 0f8c712..1431a6c 100644 --- a/default_env.tres +++ b/default_env.tres @@ -1,18 +1,8 @@ -[gd_resource type="Environment" load_steps=2 format=2] +[gd_resource type="Environment" load_steps=2 format=3 uid="uid://yp8b17yv18u7"] -[sub_resource type="ProceduralSky" id=1] +[sub_resource type="Sky" id="1"] radiance_size = 4 -sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 ) -sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 ) -sky_curve = 0.25 -ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 ) -ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 ) -ground_curve = 0.01 -sun_energy = 16.0 [resource] background_mode = 2 -background_sky = SubResource( 1 ) -fog_height_min = 0.0 -fog_height_max = 100.0 -ssao_quality = 0 +sky = SubResource("1") diff --git a/icon.png b/icon.png Binary files differdeleted file mode 100644 index a0b64ee..0000000 --- a/icon.png +++ /dev/null diff --git a/icon.png.import b/icon.png.import deleted file mode 100644 index a4c02e6..0000000 --- a/icon.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icon.png" -dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/project.godot b/project.godot index 3c6c16f..552adb6 100644 --- a/project.godot +++ b/project.godot @@ -6,22 +6,26 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=4 - -_global_script_classes=[ ] -_global_script_class_icons={ -} +config_version=5 [application] config/name="CRTShader" run/main_scene="res://ShaderTestScreen.tscn" +config/features=PackedStringArray("4.3") config/icon="res://shaderIcon.png" +[display] + +window/size/viewport_width=1024 +window/size/viewport_height=600 + [editor_plugins] -enabled=PoolStringArray( "res://addons/crt_shader/plugin.cfg" ) +enabled=PackedStringArray("res://addons/crt_shader/plugin.cfg") [rendering] -environment/default_environment="res://default_env.tres" +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility" +environment/defaults/default_environment="res://default_env.tres" diff --git a/sample.png.import b/sample.png.import deleted file mode 100644 index 420e285..0000000 --- a/sample.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/sample.png-e83d904df67be35a3470a03c20e2b3c2.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://sample.png" -dest_files=[ "res://.import/sample.png-e83d904df67be35a3470a03c20e2b3c2.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/sample.png b/samples/sample.png Binary files differindex 200fbf8..200fbf8 100644 --- a/sample.png +++ b/samples/sample.png diff --git a/samples/sample.png.import b/samples/sample.png.import new file mode 100644 index 0000000..3a64a34 --- /dev/null +++ b/samples/sample.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6qyj7vxdxs7h" +path="res://.godot/imported/sample.png-5162ca4c1ddacc3a969ea951d5350b9e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://samples/sample.png" +dest_files=["res://.godot/imported/sample.png-5162ca4c1ddacc3a969ea951d5350b9e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/withshader.png b/samples/withshader.png Binary files differindex cf0a0f3..cf0a0f3 100644 --- a/withshader.png +++ b/samples/withshader.png diff --git a/samples/withshader.png.import b/samples/withshader.png.import new file mode 100644 index 0000000..5c9b6b9 --- /dev/null +++ b/samples/withshader.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dttkw4nwc8wfd" +path="res://.godot/imported/withshader.png-39d39fb67f50d4b71819013a22806182.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://samples/withshader.png" +dest_files=["res://.godot/imported/withshader.png-39d39fb67f50d4b71819013a22806182.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/shaderIcon.png.import b/shaderIcon.png.import index 6ce0fdd..4538f8e 100644 --- a/shaderIcon.png.import +++ b/shaderIcon.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/shaderIcon.png-500a326ecb6c030754b5302e60a07b3b.stex" +type="CompressedTexture2D" +uid="uid://bae85ghwasra8" +path="res://.godot/imported/shaderIcon.png-500a326ecb6c030754b5302e60a07b3b.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://shaderIcon.png" -dest_files=[ "res://.import/shaderIcon.png-500a326ecb6c030754b5302e60a07b3b.stex" ] +dest_files=["res://.godot/imported/shaderIcon.png-500a326ecb6c030754b5302e60a07b3b.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/white.png.import b/white.png.import index bb87421..32b8781 100644 --- a/white.png.import +++ b/white.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/white.png-d8533361663a5f8fe5200e5b5262a62d.stex" +type="CompressedTexture2D" +uid="uid://dsdnl531wrdv8" +path="res://.godot/imported/white.png-d8533361663a5f8fe5200e5b5262a62d.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://white.png" -dest_files=[ "res://.import/white.png-d8533361663a5f8fe5200e5b5262a62d.stex" ] +dest_files=["res://.godot/imported/white.png-d8533361663a5f8fe5200e5b5262a62d.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/withshader.png.import b/withshader.png.import deleted file mode 100644 index 9a98bbb..0000000 --- a/withshader.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/withshader.png-9db2b2214c4e6972799a91a8b684c9db.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://withshader.png" -dest_files=[ "res://.import/withshader.png-9db2b2214c4e6972799a91a8b684c9db.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 |