markusfisch / ShaderEditor

Android app to create GLSL shaders and use them as live wallpaper
https://play.google.com/store/apps/details?id=de.markusfisch.android.shadereditor
MIT License
924 stars 137 forks source link

Feature request: #define flag #124

Closed toombs-caeman closed 1 year ago

toombs-caeman commented 1 year ago

If you define a flag as a generic part of the header, then shaders can use that to smoothly make use of ShaderEditor's uniforms when they are available, but still run for demonstration purposes elsewhere. Something like #define SHADER_EDITOR

In particular I was looking at this shader. There are two versions: one for the app which makes use of the battery uniform, and one for shadertoy which fakes it with the mouse. It would be really hard or impossible to auto-magically convert code like this, but having a flag would make it straightforward.

Incidentally a comment on that shader led me to your app.

markusfisch commented 1 year ago

Good idea! And makes totally sense. I will add this for this next version.

And thanks for the link to the Retro Sun shader! I really like it! 👍

markusfisch commented 1 year ago

Implemented in https://github.com/markusfisch/ShaderEditor/commit/c86d28a20eeeade8683cc1fb10be76fa1cde54ce

A new version, 2.27.0, will become available in the next hours on Google Play.

If you don't want to wait, you can also get it from GitHub: https://github.com/markusfisch/ShaderEditor/releases/tag/2.27.0

toombs-caeman commented 1 year ago

So fast! Awesome :+1: