-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure and force shader compilation
- Loading branch information
1 parent
0f622bb
commit 5e69113
Showing
29 changed files
with
400 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
magecity.png : https://opengameart.org/content/mage-city-arcanos | ||
pisilohepunane3.png : https://opengameart.org/content/dragons | ||
earthbound shader : https://godotshaders.com/shader/earthbound-like-battle-background-shader-w-scroll-effect-and-palette-cycling/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extends Resource | ||
class_name ShaderMaterialList | ||
|
||
@export var shader_material_list:Array[ShaderMaterial] |
340 changes: 170 additions & 170 deletions
340
...est/resources/graveyard_mesh_library.tres → .../mesh_library/graveyard_mesh_library.tres
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dxai4ao6ii8wf"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/aura.gdshader" id="1_hrccy"] | ||
|
||
[resource] | ||
shader = ExtResource("1_hrccy") | ||
shader_parameter/aura_width = 1.0 | ||
shader_parameter/aura_color = Color(0, 0.403922, 0.498039, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bw2yfhvbtkp0q"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/blur.gdshader" id="1_fn2h6"] | ||
|
||
[resource] | ||
shader = ExtResource("1_fn2h6") | ||
shader_parameter/radius = 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://lhbk085f0i6x"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/dissintegrate.gdshader" id="1_glt7d"] | ||
|
||
[resource] | ||
shader = ExtResource("1_glt7d") | ||
shader_parameter/amount = 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bw5h4v21esbek"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/dropshadow.gdshader" id="1_yw8ir"] | ||
|
||
[resource] | ||
shader = ExtResource("1_yw8ir") | ||
shader_parameter/radius = 2.0 | ||
shader_parameter/modulate = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://ti3igq5o2705"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/fatty.gdshader" id="1_rxmlq"] | ||
|
||
[resource] | ||
shader = ExtResource("1_rxmlq") | ||
shader_parameter/fattyness = 1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://drhlyq8y68814"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/glow.gdshader" id="1_6g01n"] | ||
|
||
[resource] | ||
shader = ExtResource("1_6g01n") | ||
shader_parameter/radius = 2.0 | ||
shader_parameter/amount = 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://b2hdibmewsoqj"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/offsetshadow.gdshader" id="1_fldde"] | ||
|
||
[resource] | ||
shader = ExtResource("1_fldde") | ||
shader_parameter/offset = Vector2(4, 4) | ||
shader_parameter/modulate = Color(0.2, 0, 0.188235, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://vkjycfa1xrqh"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/outline.gdshader" id="1_1cr6o"] | ||
|
||
[resource] | ||
shader = ExtResource("1_1cr6o") | ||
shader_parameter/outline_width = 1.0 | ||
shader_parameter/outline_color = Color(0.270588, 0.631373, 0, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://w5i2mafmyay2"] | ||
|
||
[ext_resource type="Shader" path="res://shaders/silouette.gdshader" id="1_lywpw"] | ||
|
||
[resource] | ||
shader = ExtResource("1_lywpw") | ||
shader_parameter/modulate = Color(1, 1, 1, 1) | ||
shader_parameter/active = true |
16 changes: 16 additions & 0 deletions
16
WebTest/resources/shader_material_list/shader_material_list.tres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[gd_resource type="Resource" script_class="ShaderMaterialList" load_steps=11 format=3 uid="uid://vmr45pmdlpyc"] | ||
|
||
[ext_resource type="Script" path="res://resources/class/shader_material_list.gd" id="1_0cae1"] | ||
[ext_resource type="Material" uid="uid://dxai4ao6ii8wf" path="res://resources/shader_material/aura.tres" id="2_yktj6"] | ||
[ext_resource type="Material" uid="uid://bw2yfhvbtkp0q" path="res://resources/shader_material/blur.tres" id="3_qja05"] | ||
[ext_resource type="Material" uid="uid://lhbk085f0i6x" path="res://resources/shader_material/dissintegrate.tres" id="4_uecgu"] | ||
[ext_resource type="Material" uid="uid://bw5h4v21esbek" path="res://resources/shader_material/drop_shadow.tres" id="5_vpow5"] | ||
[ext_resource type="Material" uid="uid://ti3igq5o2705" path="res://resources/shader_material/fisheye.tres" id="6_5iywh"] | ||
[ext_resource type="Material" uid="uid://drhlyq8y68814" path="res://resources/shader_material/glow.tres" id="7_3wqie"] | ||
[ext_resource type="Material" uid="uid://b2hdibmewsoqj" path="res://resources/shader_material/offset_shadow.tres" id="8_g47sg"] | ||
[ext_resource type="Material" uid="uid://vkjycfa1xrqh" path="res://resources/shader_material/outline.tres" id="9_xxseo"] | ||
[ext_resource type="Material" uid="uid://w5i2mafmyay2" path="res://resources/shader_material/silouette.tres" id="10_2lvyf"] | ||
|
||
[resource] | ||
script = ExtResource("1_0cae1") | ||
shader_material_list = Array[ShaderMaterial]([ExtResource("2_yktj6"), ExtResource("3_qja05"), ExtResource("4_uecgu"), ExtResource("5_vpow5"), ExtResource("6_5iywh"), ExtResource("7_3wqie"), ExtResource("8_g47sg"), ExtResource("9_xxseo"), ExtResource("10_2lvyf")]) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
WebTest/resources/theme.tres → WebTest/resources/theme/theme.tres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,42 @@ | ||
extends Control | ||
|
||
var scene_main = load("res://scenes/main/main.tscn") as PackedScene | ||
var shaders_loaded:bool = false | ||
|
||
@export var shader_material_list:ShaderMaterialList | ||
|
||
@onready var shader_progress_bar = %ShaderProgressBar | ||
@onready var shader_loading = %ShaderLoading | ||
@onready var shaders = %Shaders | ||
@onready var loaded_shaders = %LoadedShaders | ||
|
||
func _ready(): | ||
if shader_material_list: | ||
var steps = shader_material_list.shader_material_list.size() | ||
print(steps) | ||
var step = 100.0 / steps | ||
print(step) | ||
for shader_material in shader_material_list.shader_material_list: | ||
print("Compiling shader " + shader_material.resource_name) | ||
await load_shader(shader_material) | ||
await get_tree().create_timer(0.01).timeout | ||
print("Done") | ||
shader_progress_bar.value += step | ||
print(shader_progress_bar.value + " %") | ||
|
||
|
||
func load_shader(shader_material:ShaderMaterial): | ||
var color_rect = ColorRect.new() | ||
color_rect.material = shader_material | ||
color_rect.custom_minimum_size = Vector2(20, 20) | ||
color_rect.size_flags_horizontal = Control.SIZE_SHRINK_CENTER | ||
loaded_shaders.add_child(color_rect) | ||
|
||
func _on_back_pressed(): | ||
get_tree().change_scene_to_packed(scene_main) | ||
|
||
|
||
func _on_shader_progress_bar_value_changed(value): | ||
if value > 99.0: | ||
shader_loading.visible = false | ||
shaders.visible = true |
Oops, something went wrong.