Add geode

This commit is contained in:
Lncvrt committed 2025-01-05 13:56:22 -07:00
1 parent ceba3130ab
commit 9c61b0a7fd
421 files changed
+30990

No files matched your search

@@ -0,0 +1 @@
{"spritesheets":{},"fonts":{}}
@@ -0,0 +1,43 @@
# Menu Shaders
Replaces the background of the main menu with a customizable shader.
This is a port of mat's [Menu Shaders](https://github.com/matcool/small-gd-mods/blob/3e1783c7e281cbbccd53f9c4ceb697d5a6f839dd/src/menu-shaders.cpp) mod.
## Usage
To change the shader, create a texture pack with a file called menu-shader.fsh.
For a few already made shaders, check out this ~~Twitter~~ X [thread](https://twitter.com/mateus44_/status/1412108556921344006?s=20).
This mod also supports some Shadertoy shaders, to use them:
1. Find a shader you want to use on [Shadertoy](https://shadertoy.com)
2. Copy/paste the code on the right into your menu-shader.fsh
3. If you see the default GD background and errors from Menu Shaders in the console, that likely means that the shader you want to use is incompatible.
## Advanced Usage
### New shader locations
You can also replace shaders in `cgytrus.menu-shaders/any-frag.glsl` and `any-vert.glsl`
for the fragment and vertex shaders respectively,
where `any` can be replaced with either `main`, `level-select`, `creator`, `level-browser`,
`edit-level`, `play-level`, `search`, `garage`, `leaderboards`,
`gauntlets`, `gauntlet` or `treasure-room` to override the shader only for the respective menu.
Shadertoy compatibility is disabled in these shaders.
### Sprites
You can use sprites from resources (including custom ones) by adding a comment starting with `//@`
followed by sprite names separated by commas.
Each sprite in the list will add a `sampler2d` uniform called `sprite0`,
where `0` is the index of the sprite in the list.
### Nodes
You can get information about nodes in the scene by adding a comment starting with `//#`
followed by node IDs separated by commas.
Each node in the list will add a few uniforms, where `0` is the index of the sprite in the list:
- `vec2 node0Pos` - node position in cocos points in world space
- `float node0Rot` - node rotation in degrees in world space
- `vec2 node0Scale` - node scale in world space
- `vec2 node0Size` - node content size in cocos points in world space
- `bool node0Visible` - node visibility (whether it's drawn or not)
@@ -0,0 +1,36 @@
## v1.4.2
- updated to 2.2074
## v1.4.1
- fixed crash in menus without a background that normally have one
- potentially improved compatibility with other mods changing the main menu background
## v1.4.0
- made hiding corners, input backgrounds, etc. configurable
- tho it Will Not look good unless you use happy textures or smth to change the colors i guess
- added menu shaders to more layers
- only ones that had node ids tho, sorry
- updated mod description slightly
## v1.3.0
- improved logging
- added built-in shadertoy compatibility
- built-in fix for issue #5
- now recommends texture loader
- updated documentation (hoping to see shader devs make use of these features !!)
## v1.2.1
- updated to 2.206
## v1.2.0
- updated to 2.2 (rooot did a huge part in this thanks !!!)
- added android support
- probably some other fixes i forgot about
## v1.1.0
- fixed mac crash
- added ability to add menu shaders to other menus
- fixed compatibility issues with some shaders on amd gpus
## v1.0.0
- initial release
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@@ -0,0 +1,204 @@
{
"geode": "4.1.0",
"version": "v1.4.2",
"gd": {
"win": "2.2074",
"mac": "2.2074",
"android": "2.2074"
},
"id": "cgytrus.menu-shaders",
"name": "Menu Shaders",
"developers": [ "mat", "ConfiG", "rooot" ],
"description": "Replaces the background of the main menu with a customizable shader.",
"repository": "https://github.com/cgytrus/MenuShaders",
"issues": {
"info": "Report any issues you have on GitHub issues.",
"url": "https://github.com/cgytrus/MenuShaders/issues"
},
"tags": [ "offline", "interface", "customization" ],
"resources": {
"files": [
"resources/shaders/*.glsl"
]
},
"dependencies": [
{
"id": "geode.node-ids",
"version": ">=v1.18.0",
"importance": "required"
},
{
"id": "geode.texture-loader",
"version": "*",
"importance": "recommended"
}
],
"settings": {
"show-main": {
"name": "Show in main menu",
"description": "MenuLayer",
"type": "bool",
"default": true
},
"show-level-select": {
"name": "Show in level select menu",
"description": "LevelSelectLayer",
"type": "bool",
"default": false
},
"level-select-hide-corners": {
"name": "Hide corners in level select menu",
"description": "Also hides the bar at the top",
"type": "bool",
"default": true,
"enable-if": "show-level-select"
},
"level-select-hide-ground": {
"name": "Hide ground in level select menu",
"type": "bool",
"default": true,
"enable-if": "show-level-select"
},
"show-creator": {
"name": "Show in creator menu",
"description": "CreatorLayer",
"type": "bool",
"default": false
},
"creator-hide-corners": {
"name": "Hide corners in creator menu",
"type": "bool",
"default": true,
"enable-if": "show-creator"
},
"show-level-browser": {
"name": "Show in level lists",
"description": "Hall of Fame, Featured, Saved, etc. (LevelBrowserLayer)",
"type": "bool",
"default": false
},
"level-browser-hide-corners": {
"name": "Hide corners in level lists",
"type": "bool",
"default": true,
"enable-if": "show-level-browser"
},
"show-edit-level": {
"name": "Show in edit level menu",
"description": "EditLevelLayer",
"type": "bool",
"default": false
},
"edit-level-hide-corners": {
"name": "Hide corners in edit level menu",
"type": "bool",
"default": true,
"enable-if": "show-edit-level"
},
"edit-level-hide-backgrounds": {
"name": "Hide backgrounds in edit level menu",
"description": "Hides the backgrounds under level name and description inputs",
"type": "bool",
"default": true,
"enable-if": "show-edit-level"
},
"show-play-level": {
"name": "Show in play level menu",
"description": "LevelInfoLayer",
"type": "bool",
"default": false
},
"play-level-hide-corners": {
"name": "Hide corners in play level menu",
"type": "bool",
"default": true,
"enable-if": "show-play-level"
},
"show-search": {
"name": "Show in search menu",
"description": "LevelSearchLayer",
"type": "bool",
"default": false
},
"search-hide-corners": {
"name": "Hide corners in search menu",
"type": "bool",
"default": true,
"enable-if": "show-search"
},
"search-hide-backgrounds": {
"name": "Hide backgrounds in search menu",
"description": "Hides the backgrounds under query input, difficulty selector, etc.",
"type": "bool",
"default": true,
"enable-if": "show-search"
},
"show-garage": {
"name": "Show in garage (icon select) menu",
"description": "GJGarageLayer",
"type": "bool",
"default": false
},
"garage-hide-corners": {
"name": "Hide corners in garage menu",
"type": "bool",
"default": true,
"enable-if": "show-garage"
},
"garage-hide-backgrounds": {
"name": "Hide backgrounds in garage menu",
"description": "Hides the black background under the icon selector",
"type": "bool",
"default": false,
"enable-if": "show-garage"
},
"show-leaderboards": {
"name": "Show in leaderboards menu",
"description": "LeaderboardsLayer",
"type": "bool",
"default": false
},
"leaderboards-hide-corners": {
"name": "Hide corners in leaderboards menu",
"type": "bool",
"default": true,
"enable-if": "show-leaderboards"
},
"show-gauntlets": {
"name": "Show in gauntlet selection menu",
"description": "GauntletSelectLayer",
"type": "bool",
"default": false
},
"gauntlets-hide-corners": {
"name": "Hide corners in gauntlet selection menu",
"type": "bool",
"default": true,
"enable-if": "show-gauntlets"
},
"show-gauntlet": {
"name": "Show in gauntlet menus",
"description": "GauntletLayer",
"type": "bool",
"default": false
},
"show-treasure-room": {
"name": "Show in The Treasure Room",
"description": "SecretRewardsLayer",
"type": "bool",
"default": false
},
"treasure-room-hide-corners": {
"name": "Hide corners in The Treasure Room",
"type": "bool",
"default": true,
"enable-if": "show-treasure-room"
},
"treasure-room-hide-floor": {
"name": "Hide floor in The Treasure Room",
"type": "bool",
"default": true,
"enable-if": "show-treasure-room"
}
}
}
@@ -0,0 +1 @@
13380582550427
@@ -0,0 +1,64 @@
/*
Here's an extremely simple shader that just shows the uv,
while also showing all available uniforms
uniform vec2 resolution;
uniform float time;
uniform vec2 mouse;
uniform float pulse1; // i recommend this one
uniform float pulse2;
uniform float pulse3;
uniform float fft[744];
void main() {
vec2 uv = gl_FragCoord.xy / resolution;
uv.x *= resolution.x / resolution.y; // optional: fix aspect ratio
gl_FragColor = vec4(uv, 0.0, 1.0);
}
*/
// default shader is a blue swirly pattern
// which i made some time ago in shadertoy
// https://www.shadertoy.com/view/wdG3Wh
uniform vec2 resolution;
uniform float time;
uniform vec2 mouse; // not used here
vec2 hash(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * vec3(.1031, .1030, .0973));
p3 += dot(p3, p3.yzx+33.33);
return fract((p3.xx+p3.yz)*p3.zy) * 2.0 - vec2(1.0);
}
float noise(in vec2 p) {
const float K1 = 0.366025404; // (sqrt(3) - 1) / 2;
const float K2 = 0.211324865; // (3 - sqrt(3)) / 6;
vec2 i = floor(p + (p.x + p.y) * K1);
vec2 a = p - i + (i.x + i.y) * K2;
float m = step(a.y, a.x);
vec2 o = vec2(m, 1.0 - m);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0 * K2;
vec3 h = max(0.5 - vec3(dot(a, a), dot(b, b), dot(c, c)), 0.0);
vec3 n = h * h * h * h * vec3(dot(a, hash(i + 0.0)), dot(b, hash(i + o)), dot(c, hash(i + 1.0)));
return dot(n, vec3(70.0));
}
void main() {
vec2 uv = (gl_FragCoord.xy - 0.5 * resolution.xy) / resolution.y;
uv = vec2(noise(uv + time * 0.1), noise(uv + 10.0));
float d = uv.x - uv.y;
d *= 20.0;
d = sin(d);
d = d * 0.5 + 0.5;
d = 1.0 - d;
d = smoothstep(0.1, 0.1, d);
vec3 col = vec3(mix(vec3(0.1), vec3(0.2, 0.2, 0.6), d));
gl_FragColor = vec4(col, 1.0);
}
@@ -0,0 +1,5 @@
attribute vec4 aPosition;
void main() {
gl_Position = aPosition;
}