feat: Add GLSL shader definitions and adjust gradient title drawing order to render as a background layer.

This commit is contained in:
Æmotion Studio
2026-03-24 16:10:10 -07:00
parent 59128d1549
commit ddf0fc0f83
5 changed files with 1085 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "comfyui-shadernoiseksampler-web",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"description": "TypeScript frontend for ComfyUI ShaderNoiseKSampler custom nodes",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-shadernoiseksampler"
description = "Transform AI image generation from random exploration into deliberate artistic navigation. This advanced KSampler replacement blends traditional noise with shader noise. Navigate latent space with intention using adjustable noise parameters, shape masks, and colors transformations."
version = "1.3.1"
version = "1.3.2"
license = {file = "LICENSE"}
[project.urls]
+1076
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -19,12 +19,12 @@ const extension = {
const origOnDrawForeground = nodeType.prototype.onDrawForeground;
// Add our own onDrawForeground function
nodeType.prototype.onDrawForeground = function (ctx) {
// Call the original onDrawForeground if it exists
// Draw gradient title FIRST so it acts as background layer
drawGradientTitle(this, ctx);
// Call the original onDrawForeground after, so shader renders on top
if (origOnDrawForeground) {
origOnDrawForeground.call(this, ctx);
}
// Draw a custom gradient title
drawGradientTitle(this, ctx);
};
// Clean up resources when node is removed
const origOnRemoved = nodeType.prototype.onRemoved;
+4 -4
View File
@@ -57,13 +57,13 @@ const extension: ComfyExtension = {
this: ShaderNode,
ctx: CanvasRenderingContext2D
): void {
// Call the original onDrawForeground if it exists
// Draw gradient title FIRST so it acts as background layer
drawGradientTitle(this, ctx);
// Call the original onDrawForeground after, so shader renders on top
if (origOnDrawForeground) {
origOnDrawForeground.call(this, ctx);
}
// Draw a custom gradient title
drawGradientTitle(this, ctx);
};
// Clean up resources when node is removed