palette textures! working with palettes will be a breezegit status!

This commit is contained in:
Haze Weathers 2024-03-08 20:20:09 -05:00
parent 7974ac26c4
commit f1ad9d5825
10 changed files with 65 additions and 8 deletions

View file

@ -2,5 +2,5 @@ extends HBoxContainer
func _ready() -> void:
var palette = load("res://graphics/player/palettes/%s.png" % Game.current_palette)
var palette = load("res://graphics/player/palettes/%s.tex" % Game.current_palette)
$Panel/TextureRect.material.set_shader_param("palette", palette)

View file

@ -1,5 +1,5 @@
extends TextureRect
func _ready():
var palette = load("res://graphics/player/palettes/%s.png" % Game.current_palette)
var palette = load("res://graphics/player/palettes/%s.tex" % Game.current_palette)
material.set_shader_param("palette", palette)

View file

@ -70,7 +70,7 @@ onready var hitbox: Area2D = $"%Hitbox"
# OVERRIDES #
func _ready() -> void:
#set palette
var palette = load("res://graphics/player/palettes/%s.png" % Game.current_palette)
var palette = load("res://graphics/player/palettes/%s.tex" % Game.current_palette)
sprite.material.set_shader_param("palette", palette)
$"%CFox".material.set_shader_param("palette", palette)
$"%DissolveParticles".material.set_shader_param("palette", palette)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=42 format=2]
[gd_scene load_steps=43 format=2]
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
[ext_resource path="res://graphics/player/palettes/default.png" type="Texture" id=2]
@ -11,6 +11,7 @@
[ext_resource path="res://addons/godot_state_charts/compound_state.gd" type="Script" id=9]
[ext_resource path="res://addons/godot_state_charts/transition.gd" type="Script" id=10]
[ext_resource path="res://addons/godot_state_charts/atomic_state.gd" type="Script" id=11]
[ext_resource path="res://graphics/player/palettes/default.tex" type="Texture" id=12]
[ext_resource path="res://graphics/player/sg.png" type="Texture" id=14]
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=18]
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=25]
@ -19,7 +20,7 @@
shader = ExtResource( 3 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = true
shader_param/palette = ExtResource( 2 )
shader_param/palette = ExtResource( 12 )
[sub_resource type="Shader" id=26]
code = "// Recolor