Don't include the shaderlib in the application anymore, instead distribute a zip file with each release
This commit is contained in:
parent
1ee3088cce
commit
da1bd6a58a
11 changed files with 21 additions and 24 deletions
14
dist.sh
14
dist.sh
|
@ -10,13 +10,19 @@ VERSION="$(godot --headless --no-header -s tools/get_version.gd)"
|
||||||
|
|
||||||
godot --headless --export-release "Linux/X11" "dist/Fragmented-${VERSION}.x86_64"
|
godot --headless --export-release "Linux/X11" "dist/Fragmented-${VERSION}.x86_64"
|
||||||
|
|
||||||
|
log Packing shaderlib
|
||||||
|
|
||||||
|
ZIP_PATH_SHADERLIB=$(realpath "dist/Fragmented-${VERSION}_shaderlib.zip")
|
||||||
|
|
||||||
|
zip -r "${ZIP_PATH_SHADERLIB}" shaderlib/
|
||||||
|
|
||||||
log Packing project template
|
log Packing project template
|
||||||
|
|
||||||
ZIP_PATH=$(realpath "dist/Fragmented-${VERSION}_project_template.zip")
|
ZIP_PATH_PROJECT_TEMPLATE=$(realpath "dist/Fragmented-${VERSION}_project_template.zip")
|
||||||
|
|
||||||
rm -f "${ZIP_PATH}"
|
rm -f "${ZIP_PATH_PROJECT_TEMPLATE}"
|
||||||
zip -r "${ZIP_PATH}" shaderlib/
|
|
||||||
(
|
(
|
||||||
cd examples/
|
cd examples/
|
||||||
zip -r "${ZIP_PATH}" *
|
mv project.godot_ project.godot && trap "mv project.godot project.godot_" EXIT
|
||||||
|
zip -r "${ZIP_PATH_PROJECT_TEMPLATE}" *
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
shader_type canvas_item;
|
shader_type canvas_item;
|
||||||
|
|
||||||
//!load ./images/swamp.jpg
|
//!load ./images/swamp.jpg
|
||||||
#include "res://shaderlib/blur.gdshaderinc"
|
#include "./shaderlib/blur.gdshaderinc"
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
COLOR = gaussian_blur(TEXTURE, UV, 48, 24.0);
|
COLOR = gaussian_blur(TEXTURE, UV, 48, 24.0);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
shader_type canvas_item;
|
shader_type canvas_item;
|
||||||
|
|
||||||
#include "res://shaderlib/hsv.gdshaderinc"
|
#include "./shaderlib/hsv.gdshaderinc"
|
||||||
#include "res://shaderlib/pixelate.gdshaderinc"
|
#include "./shaderlib/pixelate.gdshaderinc"
|
||||||
|
|
||||||
//!load ./images/swamp.jpg
|
//!load ./images/swamp.jpg
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ shader_type canvas_item;
|
||||||
|
|
||||||
//!load ./images/noisy.png
|
//!load ./images/noisy.png
|
||||||
|
|
||||||
#include "res://shaderlib/denoise.gdshaderinc"
|
#include "./shaderlib/denoise.gdshaderinc"
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
COLOR = smart_denoise(TEXTURE, UV, 12.0, 1.0, .12);
|
COLOR = smart_denoise(TEXTURE, UV, 12.0, 1.0, .12);
|
||||||
|
|
|
@ -2,8 +2,8 @@ shader_type canvas_item;
|
||||||
|
|
||||||
//!load ./images/mountain.jpg
|
//!load ./images/mountain.jpg
|
||||||
|
|
||||||
#include "res://shaderlib/kuwahara.gdshaderinc"
|
#include "./shaderlib/kuwahara.gdshaderinc"
|
||||||
#include "res://shaderlib/hsv.gdshaderinc"
|
#include "./shaderlib/hsv.gdshaderinc"
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
// Kuwahara
|
// Kuwahara
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
shader_type canvas_item;
|
shader_type canvas_item;
|
||||||
|
|
||||||
#include "res://shaderlib/oklab.gdshaderinc"
|
#include "./shaderlib/oklab.gdshaderinc"
|
||||||
|
|
||||||
//!load ./images/swamp.jpg
|
//!load ./images/swamp.jpg
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
shader_type canvas_item;
|
shader_type canvas_item;
|
||||||
|
|
||||||
#include "res://shaderlib/place_texture.gdshaderinc"
|
#include "./shaderlib/place_texture.gdshaderinc"
|
||||||
#include "res://shaderlib/common.gdshaderinc"
|
#include "./shaderlib/common.gdshaderinc"
|
||||||
|
|
||||||
//!load ./images/swamp.jpg
|
//!load ./images/swamp.jpg
|
||||||
//!load+ img2 ./images/grass.png
|
//!load+ img2 ./images/grass.png
|
||||||
|
|
1
examples/shaderlib
Symbolic link
1
examples/shaderlib
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../shaderlib
|
|
@ -8,7 +8,7 @@ dedicated_server=false
|
||||||
custom_features=""
|
custom_features=""
|
||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter="screenshot.png, examples/*, tools/*, build-template/*"
|
exclude_filter="screenshot.png, examples/*, shaderlib/*, tools/*, build-template/*"
|
||||||
export_path="dist/Fragmented.x86_64"
|
export_path="dist/Fragmented.x86_64"
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
If you find this inside the project template, editing these gdshaderinc files
|
|
||||||
does nothing. They are already packed with the application and are only here
|
|
||||||
for you and the Godot Editor to read (auto complete and so on).
|
|
||||||
|
|
||||||
If you want to change one of the files, copy it to another location,
|
|
||||||
edit it and #include it in your shader file.
|
|
||||||
|
|
||||||
If you have questions, don't be shy, open a issue :)
|
|
||||||
|
|
||||||
Have fun experimenting!
|
|
Loading…
Add table
Add a link
Reference in a new issue