Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates GLSL shader rendering in ComfyUI, supports advanced visual effects with dynamic configurations.
The glslViewer
node is designed to facilitate the rendering of GLSL (OpenGL Shading Language) shaders within the ComfyUI environment. This node allows you to create and manipulate complex visual effects by leveraging the power of GLSL. It supports the use of multiple buffers and double buffers, enabling advanced rendering techniques such as multi-pass rendering and feedback loops. The node is highly configurable, allowing you to set various uniforms and textures dynamically, making it a versatile tool for AI artists looking to integrate shader-based visual effects into their projects. By providing a structured way to manage and render GLSL shaders, glslViewer
enhances your ability to create intricate and visually stunning graphics.
The fragment_code
parameter is a dictionary containing the GLSL fragment shader code that defines the visual effect you want to render. This code is the core of your shader and dictates how each pixel on the screen is processed. The shader code can include various uniforms and textures that will be dynamically set during execution. There are no specific minimum or maximum values for this parameter, but it must be valid GLSL code.
The width
parameter specifies the width of the rendering canvas in pixels. This determines the horizontal resolution of the output image. The minimum value is 1, and there is no explicit maximum value, but it should be within the capabilities of your hardware. The default value is typically set based on the desired output resolution.
The height
parameter specifies the height of the rendering canvas in pixels. This determines the vertical resolution of the output image. The minimum value is 1, and there is no explicit maximum value, but it should be within the capabilities of your hardware. The default value is typically set based on the desired output resolution.
The frames
parameter indicates the number of frames to render. This is particularly useful for animations or time-based effects. The minimum value is 1, and there is no explicit maximum value, but it should be set according to the length of the animation you wish to create. The default value is usually set to the number of frames required for a complete animation cycle.
The fps
parameter stands for frames per second and determines the playback speed of the rendered frames. This affects the timing of animations and time-based effects in your shader. The minimum value is 1, and there is no explicit maximum value, but it should be set according to the desired smoothness of the animation. The default value is typically 30 or 60 fps.
The kwargs
parameter is a dictionary of optional keyword arguments that can include additional uniforms and textures. These are dynamically set and can be used to pass extra data to your shader, such as images or numerical values. The keys should start with uniforms
, u_tex
, or u_val
to be recognized correctly. There are no specific minimum or maximum values, but the data must be compatible with the shader code.
The images_out
parameter is a tensor containing the rendered images. Each frame of the animation or visual effect is stored as a separate image in this tensor. The images are in RGB format and can be used for further processing or saved as output files. This output is crucial for visualizing the results of your GLSL shader.
The masks_out
parameter is a tensor containing the alpha masks of the rendered images. Each frame's alpha channel is stored separately, allowing you to use these masks for compositing or other image processing tasks. This output is important for handling transparency and blending effects in your rendered images.
fragment_code
is valid GLSL and includes all necessary uniforms and textures to avoid runtime errors.width
and height
parameters to match the desired resolution of your output, keeping in mind the capabilities of your hardware.frames
and fps
parameters to control the length and smoothness of your animations, setting them according to the specific needs of your project.kwargs
parameter to pass additional data to your shader, such as images or numerical values, to create more dynamic and interactive visual effects.fragment_code
contains syntax errors or unsupported GLSL features.width
or height
parameters are set too high, exceeding the capabilities of your hardware.kwargs
parameter.kwargs
dictionary with the correct keys and values.frames
parameter is set too low, resulting in an incomplete animation.frames
parameter to cover the entire duration of the animation.fps
parameter is set too high, causing performance issues or dropped frames.fps
parameter to a value that ensures smooth playback without overloading your hardware.© Copyright 2024 RunComfy. All Rights Reserved.