Build script, improve some settings, refactor
This commit is contained in:
parent
8c778f7056
commit
778b7c56b9
@ -19,7 +19,7 @@ vec4 effect(vec2 screenSize, vec2 screen_coords) {
|
||||
float pixel_size = length(screenSize.xy) / PIXEL_FILTER;
|
||||
vec2 uv = (floor(screen_coords.xy*(1./pixel_size))*pixel_size - 0.5*screenSize.xy)/length(screenSize.xy) - OFFSET;
|
||||
float uv_len = length(uv);
|
||||
|
||||
|
||||
float speed = (SPIN_ROTATION*SPIN_EASE*0.2);
|
||||
if(IS_ROTATE){
|
||||
speed = TIME * speed;
|
||||
@ -28,17 +28,17 @@ vec4 effect(vec2 screenSize, vec2 screen_coords) {
|
||||
float new_pixel_angle = atan(uv.y, uv.x) + speed - SPIN_EASE*20.*(1.*SPIN_AMOUNT*uv_len + (1. - 1.*SPIN_AMOUNT));
|
||||
vec2 mid = (screenSize.xy/length(screenSize.xy))/2.;
|
||||
uv = (vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid);
|
||||
|
||||
|
||||
uv *= 30.;
|
||||
speed = TIME*(SPIN_SPEED);
|
||||
vec2 uv2 = vec2(uv.x+uv.y);
|
||||
|
||||
|
||||
for(int i=0; i < 5; i++) {
|
||||
uv2 += sin(max(uv.x, uv.y)) + uv;
|
||||
uv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121),sin(uv2.x - 0.113*speed));
|
||||
uv -= 1.0*cos(uv.x + uv.y) - 1.0*sin(uv.x*0.711 - uv.y);
|
||||
}
|
||||
|
||||
|
||||
float contrast_mod = (0.25*CONTRAST + 0.5*SPIN_AMOUNT + 1.2);
|
||||
float paint_res = min(2., max(0.,length(uv)*(0.035)*contrast_mod));
|
||||
float c1p = max(0.,1. - contrast_mod*abs(1.-paint_res));
|
14
deploy.sh
14
deploy.sh
@ -1,4 +1,18 @@
|
||||
|
||||
godot4 () {
|
||||
app_dir=$(ls /Applications | grep Godot | grep 4 | tail -n 1)
|
||||
"$(find "/Applications/$app_dir" | egrep "Godot$")" $*
|
||||
}
|
||||
|
||||
rm -rf "builds/web"
|
||||
mkdir -p "builds/web"
|
||||
|
||||
echo "Exporting..."
|
||||
echo
|
||||
|
||||
godot4 --headless --export-release "Web" "builds/web/index.html" || exit 1
|
||||
|
||||
echo
|
||||
echo "Deploying to games.vojtechstruhar.com"
|
||||
|
||||
rsync -avz \
|
||||
|
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://vkokd44wy82r"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crkipt37ukh8o" path="res://main.gd" id="1_0xm2m"]
|
||||
[ext_resource type="Shader" uid="uid://c2bxvd7878rqy" path="res://main.gdshader" id="1_ig7tw"]
|
||||
[ext_resource type="Shader" uid="uid://c2bxvd7878rqy" path="res://balatro.gdshader" id="1_ig7tw"]
|
||||
[ext_resource type="Theme" uid="uid://t07qph6qe3g7" path="res://inspector_theme.tres" id="3_h2yge"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7dm0k"]
|
||||
|
BIN
preview.png
Normal file
BIN
preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 MiB |
34
preview.png.import
Normal file
34
preview.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://wjlym804fw6f"
|
||||
path="res://.godot/imported/preview.png-b4838d23de224c84c7c9b5588b6708a6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://preview.png"
|
||||
dest_files=["res://.godot/imported/preview.png-b4838d23de224c84c7c9b5588b6708a6.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
|
@ -10,9 +10,13 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="balatro-shader"
|
||||
config/name="Balatro Shader"
|
||||
config/description="Recreation of the Balatro main menu background shader. Adapted to Godot from Shadertoy (https://www.shadertoy.com/view/XXtBRr)
|
||||
"
|
||||
config/version="1.0.0"
|
||||
run/main_scene="uid://vkokd44wy82r"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
run/max_fps=60
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
Loading…
Reference in New Issue
Block a user