From 7d7d531e2655b4e1bf8bb38f186748d795f278ba Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sat, 2 May 2020 19:09:15 +0200 Subject: [PATCH 01/15] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db09cdf..9c00785 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Yet Another Live Coding Tool +![Build](https://github.com/Calebsem/YALCT/workflows/Build%20codebase/badge.svg) + A glsl live coding tool strongly inspired by [Shadertoy](https://www.shadertoy.com/), but as a cross platform cross graphics API desktop application. Code in modern GLSL and view your shaders using the (almost) full power of your computer's graphics APIs. Why? Because I wanted to train on [Veldrid](https://veldrid.dev), I love live coding despite not contributing a lot to it, and Shadertoy is a really fun thing. There's also a part of me who wants to show that dotnet is fun, not only for Windows and for boring aspnet and big IT service companies. Veldrid helps a lot in this sense. @@ -20,6 +22,12 @@ Credits in this hectic gif: ## Usage +### Download release + +Requires [.Net Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) runtime for running. Extract files to whatever folder you wish and launch YALCT executable through your file explorer or via CLI [for backend switching](#running-different-graphics-apis). + +Currently only the Windows prebuilt version are available, check out [the latest release page](https://github.com/Calebsem/YALCT/releases/latest) to download it. CI building and other platforms are in the works. + ### Building **This repository uses git lfs.** @@ -111,4 +119,4 @@ Trying to use some semblance of git flow, but not the tool. Main branch is `deve Fonts: - [Open Sans](https://github.com/googlefonts/opensans) as main UI font -- [Fira Code](https://github.com/tonsky/FiraCode) as editor UI font \ No newline at end of file +- [Fira Code](https://github.com/tonsky/FiraCode) as editor UI font From 55a1ced4d3cebc6ba0df47663448b0753f920102 Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sat, 2 May 2020 23:54:18 +0200 Subject: [PATCH 02/15] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9fa3746 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at jnoble@voidwork.space. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq From 7c991414db312a16026c19a721fa7bff927852d3 Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 13:45:31 +0200 Subject: [PATCH 03/15] added vsync option and enabled by default --- YALCT/ImGuiController.cs | 5 +++++ YALCT/RuntimeContext.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/YALCT/ImGuiController.cs b/YALCT/ImGuiController.cs index 83d949c..bba6dab 100644 --- a/YALCT/ImGuiController.cs +++ b/YALCT/ImGuiController.cs @@ -26,6 +26,7 @@ public class ImGuiController #else private bool fullscreen = true; #endif + private bool vsync = true; private float uiAlpha = 0.75f; public RuntimeContext Context => context; @@ -128,6 +129,10 @@ private void SubmitOptions(InputSnapshot inputSnapshot) { Context.Window.WindowState = fullscreen ? WindowState.BorderlessFullScreen : WindowState.Maximized; } + if (ImGui.Checkbox("VSync", ref vsync)) + { + Context.GraphicsDevice.SyncToVerticalBlank = vsync; + } ImGui.Text("UI Opacity"); ImGui.SetNextItemWidth(OPTIONSHEIGHT - 15); if (ImGui.SliderFloat("", ref uiAlpha, 0.2f, 1)) diff --git a/YALCT/RuntimeContext.cs b/YALCT/RuntimeContext.cs index 6d460ba..2dccdd2 100644 --- a/YALCT/RuntimeContext.cs +++ b/YALCT/RuntimeContext.cs @@ -89,7 +89,7 @@ public void Initialize() GraphicsDeviceOptions options = new GraphicsDeviceOptions( debug: false, swapchainDepthFormat: PixelFormat.R32_Float, - syncToVerticalBlank: false, + syncToVerticalBlank: true, resourceBindingModel: ResourceBindingModel.Improved, preferDepthRangeZeroToOne: true, preferStandardClipSpaceYDirection: true); From 1876a7f963d823d85e05b7372db2a2f010f9bfbb Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sun, 3 May 2020 13:54:53 +0200 Subject: [PATCH 04/15] Create dotnetcore-upload.yml --- .github/workflows/dotnetcore-upload.yml | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/dotnetcore-upload.yml diff --git a/.github/workflows/dotnetcore-upload.yml b/.github/workflows/dotnetcore-upload.yml new file mode 100644 index 0000000..ee87b2a --- /dev/null +++ b/.github/workflows/dotnetcore-upload.yml @@ -0,0 +1,26 @@ +name: Upload build + +on: + push: + branches: [ master ] + +jobs: + build-ubuntu: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: YALCT-ubuntu + path: YALCT/YALCT/bin/Release/netcoreapp3.1/ From e8f3cf438c28f9e5b4ae191d7c9353de5738d43f Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sun, 3 May 2020 13:58:11 +0200 Subject: [PATCH 05/15] Update dotnetcore-upload.yml --- .github/workflows/dotnetcore-upload.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dotnetcore-upload.yml b/.github/workflows/dotnetcore-upload.yml index ee87b2a..e8b88b3 100644 --- a/.github/workflows/dotnetcore-upload.yml +++ b/.github/workflows/dotnetcore-upload.yml @@ -3,6 +3,8 @@ name: Upload build on: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: build-ubuntu: From f63a58d9a579513bacde06fd73cad49f4a07755d Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sun, 3 May 2020 14:01:20 +0200 Subject: [PATCH 06/15] Update dotnetcore-upload.yml --- .github/workflows/dotnetcore-upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore-upload.yml b/.github/workflows/dotnetcore-upload.yml index e8b88b3..f26dfd8 100644 --- a/.github/workflows/dotnetcore-upload.yml +++ b/.github/workflows/dotnetcore-upload.yml @@ -25,4 +25,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: YALCT-ubuntu - path: YALCT/YALCT/bin/Release/netcoreapp3.1/ + path: YALCT/bin/Release/netcoreapp3.1/ From 675641e62468e7db9b73ac2f0b6c0ac862dba02e Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sun, 3 May 2020 14:06:04 +0200 Subject: [PATCH 07/15] Update dotnetcore-upload.yml --- .github/workflows/dotnetcore-upload.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/dotnetcore-upload.yml b/.github/workflows/dotnetcore-upload.yml index f26dfd8..b431d51 100644 --- a/.github/workflows/dotnetcore-upload.yml +++ b/.github/workflows/dotnetcore-upload.yml @@ -7,6 +7,26 @@ on: branches: [ master ] jobs: + build-windows: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: YALCT-win64 + path: YALCT/bin/Release/netcoreapp3.1/ + build-ubuntu: runs-on: ubuntu-latest @@ -26,3 +46,23 @@ jobs: with: name: YALCT-ubuntu path: YALCT/bin/Release/netcoreapp3.1/ + + build-macos: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: YALCT-macos + path: YALCT/bin/Release/netcoreapp3.1/ From f96f25ca30c36413c93988ff50c0c291a7102720 Mon Sep 17 00:00:00 2001 From: Tuxic Date: Sun, 3 May 2020 14:24:52 +0200 Subject: [PATCH 08/15] Delete dotnetcore-upload.yml github action artifacts are buggy as hell.... --- .github/workflows/dotnetcore-upload.yml | 68 ------------------------- 1 file changed, 68 deletions(-) delete mode 100644 .github/workflows/dotnetcore-upload.yml diff --git a/.github/workflows/dotnetcore-upload.yml b/.github/workflows/dotnetcore-upload.yml deleted file mode 100644 index b431d51..0000000 --- a/.github/workflows/dotnetcore-upload.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Upload build - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build-windows: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: YALCT-win64 - path: YALCT/bin/Release/netcoreapp3.1/ - - build-ubuntu: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: YALCT-ubuntu - path: YALCT/bin/Release/netcoreapp3.1/ - - build-macos: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: YALCT-macos - path: YALCT/bin/Release/netcoreapp3.1/ From efcbe0453219ab787af11fbf17ff5b86b2309c29 Mon Sep 17 00:00:00 2001 From: JulienNoble Date: Sun, 3 May 2020 16:10:49 +0200 Subject: [PATCH 09/15] fixed unix file picker list building --- YALCT/FilePicker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YALCT/FilePicker.cs b/YALCT/FilePicker.cs index 6f91884..55212cd 100644 --- a/YALCT/FilePicker.cs +++ b/YALCT/FilePicker.cs @@ -60,7 +60,7 @@ public void Initialize() private string RemoveItemPathMarkup(string item) { - return item.Replace(path, "").Replace(@"\", ""); + return item.Replace(path, "").Replace(@"\", "").Replace(@"/", ""); } private void SetPath(string newPath) From 2c5a6adc17a4c897f51a2a640f89067d7860dc1c Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 16:49:10 +0200 Subject: [PATCH 10/15] fixed non gl fragcoords and added invert mouse y option to be coherent with shadertoy mouse movement --- YALCT/ImGuiController.cs | 5 ++++- YALCT/RuntimeContext.cs | 13 +++++++++++-- YALCT/YALCTRuntimeData.cs | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/YALCT/ImGuiController.cs b/YALCT/ImGuiController.cs index bba6dab..81f0d3a 100644 --- a/YALCT/ImGuiController.cs +++ b/YALCT/ImGuiController.cs @@ -10,7 +10,7 @@ namespace YALCT public class ImGuiController { private const int OPTIONSWIDTH = 150; - private const int OPTIONSHEIGHT = 150; + private const int OPTIONSHEIGHT = 170; private readonly RuntimeContext context; private readonly ImFontPtr mainFont; @@ -27,12 +27,14 @@ public class ImGuiController private bool fullscreen = true; #endif private bool vsync = true; + private bool invertMouseY = false; private float uiAlpha = 0.75f; public RuntimeContext Context => context; public ImFontPtr MainFont => mainFont; public ImFontPtr EditorFont => editorFont; public bool ShowOptions { get => showOptions; set => showOptions = value; } + public bool InvertMouseY => invertMouseY; public float UiAlpha { get => uiAlpha; set => uiAlpha = value; } public UIState State => state; @@ -133,6 +135,7 @@ private void SubmitOptions(InputSnapshot inputSnapshot) { Context.GraphicsDevice.SyncToVerticalBlank = vsync; } + ImGui.Checkbox("Invert Mouse Y", ref invertMouseY); ImGui.Text("UI Opacity"); ImGui.SetNextItemWidth(OPTIONSHEIGHT - 15); if (ImGui.SliderFloat("", ref uiAlpha, 0.2f, 1)) diff --git a/YALCT/RuntimeContext.cs b/YALCT/RuntimeContext.cs index 2dccdd2..e9197f9 100644 --- a/YALCT/RuntimeContext.cs +++ b/YALCT/RuntimeContext.cs @@ -144,7 +144,11 @@ private void CreateRenderQuad() public void CreateDynamicResources(string fragmentCode) { // shaders - string newFragmentShader = fragmentHeaderCode + fragmentCode; + string newFragmentShader; + if (backend == GraphicsBackend.OpenGL) + newFragmentShader = fragmentHeaderCode + fragmentCode; + else + newFragmentShader = fragmentHeaderCode + fragmentHeaderNonGLCode + fragmentCode; if (currentFragmentShader != null && currentFragmentShader.Equals(newFragmentShader)) { uiController.SetError(null); @@ -261,7 +265,7 @@ public void Run() private void Update(float deltaTime) { InputSnapshot inputSnapshot = window.PumpEvents(); - runtimeData.Update(window, inputSnapshot, deltaTime); + runtimeData.Update(window, inputSnapshot, deltaTime, uiController.InvertMouseY); imGuiRenderer.Update(deltaTime, inputSnapshot); SubmitImGui(deltaTime, inputSnapshot); @@ -372,5 +376,10 @@ void main() int frame; }; layout(location = 0) out vec4 out_Color;"; + + // considering shadertoy is truth on this + public const string fragmentHeaderNonGLCode = @" +#define gl_FragCoord vec4(gl_FragCoord.x, resolution.y - gl_FragCoord.y, gl_FragCoord.zw) +"; } } \ No newline at end of file diff --git a/YALCT/YALCTRuntimeData.cs b/YALCT/YALCTRuntimeData.cs index 193a4f2..4691c85 100644 --- a/YALCT/YALCTRuntimeData.cs +++ b/YALCT/YALCTRuntimeData.cs @@ -19,9 +19,9 @@ public struct YALCTRuntimeData public float deltaTime; public int frame; - public void Update(Sdl2Window window, InputSnapshot input, float newDeltaTime) + public void Update(Sdl2Window window, InputSnapshot input, float newDeltaTime, bool invertMouseY) { - mouse = new Vector4(input.MousePosition, + mouse = new Vector4(invertMouseY ? input.MousePosition : new Vector2(input.MousePosition.X, window.Height - input.MousePosition.Y), input.IsMouseDown(MouseButton.Left) ? 1 : 0, input.IsMouseDown(MouseButton.Right) ? 1 : 0); resolution = new Vector2(window.Width, window.Height); From f296b813815322e73d94901c681f40f01bc53945 Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 16:50:18 +0200 Subject: [PATCH 11/15] updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c00785..9be857e 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ As you can guess, MacOS doesn't get a choice. ## Known issues -- OpenGL switches y coordinates compared to the other APIs so things will be vertically switched - Vulkan doesn't like some shaders and can freeze the app on load ## Roadmap and contribution @@ -97,6 +96,7 @@ As you can guess, MacOS doesn't get a choice. Contributions are welcome, feel free to fork and open PRs. Here are some features that I wish to implement in the future: - editor with syntax highlight? Might be hard in the current state +- actual working CI ? Github actions artifacts produce bugged executables - input textures - input audio - more exotic inputs : game controllers, midi, OSC, why not some interaction with [OSSIA Score](https://ossia.io/) From df4aafb305ebb99845ed722a9134a16ee04cc14b Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 17:18:54 +0200 Subject: [PATCH 12/15] fixed file picker going up on unix systems --- YALCT/FilePicker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YALCT/FilePicker.cs b/YALCT/FilePicker.cs index 55212cd..4a0407c 100644 --- a/YALCT/FilePicker.cs +++ b/YALCT/FilePicker.cs @@ -175,7 +175,7 @@ private void HandleSelection(FilePickerItem item) { if (item.IsUpper) { - SetPath(Path.Combine(path, @"..\")); + SetPath(Path.Combine(path, @"../")); return; } string itemPath = Path.Combine(path, item.Name); From 2601447dbffcefcc7cc8ef2f45bace58bf3959a9 Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 17:49:50 +0200 Subject: [PATCH 13/15] added powershell build script for self-contained builds for all x64 platforms --- publish-all.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 publish-all.ps1 diff --git a/publish-all.ps1 b/publish-all.ps1 new file mode 100644 index 0000000..d539dca --- /dev/null +++ b/publish-all.ps1 @@ -0,0 +1,21 @@ +# requires 7zip or unix systems get all bad with subfolders +$7zipPath = "$env:ProgramFiles\7-Zip\7z.exe" + +if (-not (Test-Path -Path $7zipPath -PathType Leaf)) { + throw "7 zip file '$7zipPath' not found" +} + +Set-Alias 7zip $7zipPath + +New-Item -ItemType Directory -Force -Path .\build +cd YALCT +# Windows 64 +dotnet publish -r win-x64 -c Release --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true +7zip a -tzip -mx=9 ..\build\YALCT-win64.zip .\bin\Release\netcoreapp3.1\win-x64\publish\* +# OSX 64 +dotnet publish -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true +7zip a -tzip -mx=9 ..\build\YALCT-osx64.zip .\bin\Release\netcoreapp3.1\osx-x64\publish\* +# Linux 64 +dotnet publish -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true +7zip a -tzip -mx=9 ..\build\YALCT-linux64.zip .\bin\Release\netcoreapp3.1\linux-x64\publish\* +cd .. \ No newline at end of file From 3e042b28677485b2d8c1a6f931d6b44b08398d99 Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 17:54:14 +0200 Subject: [PATCH 14/15] added version property to csproj --- YALCT/YALCT.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/YALCT/YALCT.csproj b/YALCT/YALCT.csproj index b35bd6b..0441fab 100644 --- a/YALCT/YALCT.csproj +++ b/YALCT/YALCT.csproj @@ -4,6 +4,7 @@ Exe netcoreapp3.1 true + 0.1.1 From c9420409f7e543fbe03f297f3d14a4d6fd616fe1 Mon Sep 17 00:00:00 2001 From: Julien Noble Date: Sun, 3 May 2020 18:09:40 +0200 Subject: [PATCH 15/15] updated README --- README.md | 81 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9be857e..ce60408 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,22 @@ Credits in this hectic gif: - ["Protean Clouds" by nimitz](https://www.shadertoy.com/view/3l23Rh) - ["[TWITCH] Isometric Cages" by Flopine](https://www.shadertoy.com/view/WdXfW7) +## Table of content + +- [Features](#features) +- [Usage](#usage) + - [Download release](#download-release) + - [Making shaders](#making-shaders) + - [Shader parameters](#shader-parameters) + - [API Support](#api-support) + - [Running different graphics APIs](#running-different-graphics-apis) + - [Building](#building) + - [Publishing releases](#publishing-releases) +- [Known issues](#known-issues) +- [Roadmap and contribution](#roadmap-and-contribution) +- [License](#license) +- [Credits](#credits) + ## Features - full GLSL v450 fragment shader support @@ -24,21 +40,18 @@ Credits in this hectic gif: ### Download release -Requires [.Net Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) runtime for running. Extract files to whatever folder you wish and launch YALCT executable through your file explorer or via CLI [for backend switching](#running-different-graphics-apis). +Self-contained releases are provided for the following systems : -Currently only the Windows prebuilt version are available, check out [the latest release page](https://github.com/Calebsem/YALCT/releases/latest) to download it. CI building and other platforms are in the works. +- Windows 64bit : Minimum OS version is Windows 7 +- Linux 64bit : Most desktop distributions like CentOS, Debian, Fedora, Ubuntu, and derivatives +- MacOS 64bit : Minimum OS version is macOS 10.12 Sierra -### Building +Check out [the latest release page](https://github.com/Calebsem/YALCT/releases/latest) to download it. CI building and other platforms are in the works. -**This repository uses git lfs.** +Builds are self-contained and don't require the .Net Core runtime to be installed. Extract files to whatever folder you wish and launch YALCT executable through your file explorer or via CLI [for backend switching](#running-different-graphics-apis). -Requires [.Net Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) SDK for building. Nothing particular about the building process, just go inside the project folder and build/run/publish it how you wish. +MacOS will require you to allow the app in your system preferences to able to launch directly from the finder. Unless you have a nice graphics card on your mac, don't expect wonderful performances. -Quickstart : -``` -cd YALCT -dotnet run -c Release -``` ### Making shaders Wether you create or load a shader, the entry point is the `main()` function. Regarding the rest, you are free to declare as many functions as you need, the entire Vulkan flavor GLSL specs should be supported. @@ -56,24 +69,24 @@ void main() ### Shader parameters -| Name | Type | Description | -| --- | --- | --- | -| `mouse` | `vec4` | `xy` for mouse, `z` for mouse 1 click, `w` for mouse 2 click | -| `resolution` | `vec2` | screen resolution in pixels | -| `time` | `float` | global time in seconds | -| `deltaTime` | `float` | time since last frame in seconds | -| `frame` | `int` | frame number | +| Name | Type | Description | +| ------------ | ------- | ------------------------------------------------------------ | +| `mouse` | `vec4` | `xy` for mouse, `z` for mouse 1 click, `w` for mouse 2 click | +| `resolution` | `vec2` | screen resolution in pixels | +| `time` | `float` | global time in seconds | +| `deltaTime` | `float` | time since last frame in seconds | +| `frame` | `int` | frame number | ### API Support This has mostly been tested on Windows 10, but it does run on MacOS High Sierra and Ubuntu 19.10 in Virtualbox. Some more testing is required. -| API | Windows | Linux | MacOS | -|---|---|---|---| -| OpenGL (default) |:white_check_mark:|:white_check_mark:| (deprecated) | -| Vulkan|:white_check_mark:|:white_check_mark:| | -| Direct3D11 |:white_check_mark: | | | -| Metal| | | :white_check_mark:| +| API | Windows | Linux | MacOS | +| --------------------- | ------------------ | ------------------ | ------------------ | +| OpenGL 3.0+ (default) | :white_check_mark: | :white_check_mark: | (deprecated) | +| Vulkan | :white_check_mark: | :white_check_mark: | | +| Direct3D11 | :white_check_mark: | | | +| Metal | | | :white_check_mark: | ### Running different graphics APIs @@ -87,6 +100,28 @@ YALCT direct3d11 As you can guess, MacOS doesn't get a choice. +### Building + +**This repository uses git lfs.** + +Requires [.Net Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) SDK for building. Nothing particular about the building process, just go inside the project folder and build/run/publish it how you wish. + +Quickstart : +``` +cd YALCT +dotnet run -c Release +``` + +### Publishing releases + +Windows only for now. A powershell script is provided to build all supported x64 platforms in self-contained zip files. You still need the .Net Core SDK as specified in [Building](#building). You also need a globally installed [7-zip](https://www.7-zip.org/download.html) because the default Windows compression util breaks folder hierarchy on unix systems. + +``` +.\publish-all.ps1 +``` + +You will find all the zip archives in the `build/` folder. + ## Known issues - Vulkan doesn't like some shaders and can freeze the app on load