diff --git a/README.md b/README.md index 9022a7c..c264b64 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,16 @@ You can find the latest releases [here](https://github.com/ChaoticByte/Fragmente ## Usage -With Fragemented, you are editing images by writing GDShaders. This brings almost endless opportunities to create unique art. +With Fragemented, you are processing images with GDShaders. This brings almost endless opportunities to create unique art. If you want to learn GDShader, take a look at the [Godot docs](https://docs.godotengine.org/en/stable/tutorials/shaders/). -The repo also includes examples. You can use them as a starting-point to write your own filters. +**The builtin editor got removed** from Fragmented with version **v9.0**. I advise you to write your shaders directly in the Godot Editor. -Besides the regular GDShader stuff, Fragmented also has so-called directives. Those allow to further control the behaviour of the application. The most important directive is `//!load` to load an image. +**To get started, use the project template (see the Releases section of this repo) and open it in Godot.** + +The template includes many examples. You can use them as a starting-point to write your own stuff. + +Besides the regular GDShader stuff, Fragmented has so-called directives. Those allow to further control the behaviour of the application. **The most important directive is `//!load` to load an image.** ### Load TEXTURE using the `//!load` directive @@ -129,7 +133,6 @@ Commands: | Dumps the shaderlib into the current directory. - ``` ### Batch Mode diff --git a/build-template/build.sh b/build-template/build.sh index 5541b7c..5bedcca 100755 --- a/build-template/build.sh +++ b/build-template/build.sh @@ -3,7 +3,7 @@ set -e function log { - echo -e "\033[1;36m* $@\033[0m" + echo -e "\033[1;36m***** $@ *****\033[0m" } log diff --git a/dist.sh b/dist.sh new file mode 100755 index 0000000..6b0d0a4 --- /dev/null +++ b/dist.sh @@ -0,0 +1,22 @@ +set -e + +function log { + echo -e "\033[1;36m***** $@ *****\033[0m" +} + +log Building application + +VERSION="$(godot --headless --no-header -s tools/get_version.gd)" + +godot --headless --export-release "Linux/X11" "dist/Fragmented-${VERSION}.x86_64" + +log Packing project template + +ZIP_PATH=$(realpath "dist/Fragmented-${VERSION}_project_template.zip") + +rm -f "${ZIP_PATH}" +zip -r "${ZIP_PATH}" shaderlib/ +( + cd examples/ + zip -r "${ZIP_PATH}" * +) diff --git a/examples/project.godot b/examples/project.godot new file mode 100644 index 0000000..e96f598 --- /dev/null +++ b/examples/project.godot @@ -0,0 +1,16 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Fragmented Project" +config/features=PackedStringArray("4.3", "Forward Plus") +config/icon="" + diff --git a/export_presets.cfg b/export_presets.cfg index f4ce4eb..8b50959 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" -exclude_filter="screenshot.png, examples/*" +exclude_filter="screenshot.png, examples/*, tools/*, build-template/*" export_path="dist/Fragmented.x86_64" encryption_include_filters="" encryption_exclude_filters="" diff --git a/shaderlib/_DO_NOT_EDIT.txt b/shaderlib/_DO_NOT_EDIT.txt new file mode 100644 index 0000000..d7fcd79 --- /dev/null +++ b/shaderlib/_DO_NOT_EDIT.txt @@ -0,0 +1,10 @@ +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! \ No newline at end of file diff --git a/tools/get_version.gd b/tools/get_version.gd new file mode 100644 index 0000000..8384f1b --- /dev/null +++ b/tools/get_version.gd @@ -0,0 +1,7 @@ +extends SceneTree + +# godot --headless --no-header -s tools/get_version.gd + +func _init() -> void: + print(ProjectSettings.get_setting("application/config/version")) + quit(0)