Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render consecutive shaders to the fbo (opengl) #5037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

juliapaci
Copy link

@juliapaci juliapaci commented Jan 13, 2025

fixes #4729

allows the shaders to sample each other via the fbo texture.

also, a better example would use the full screen e.g.:
"behind.glsl"

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    fragColor = vec4(fragCoord/iResolution.xy, 0.0, 1.0);
}

"infront.glsl"

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    fragColor = texture(iChannel0, fragCoord/iResolution.xy);
}

ghostty --custom-shader=behind.glsl --custom-shader=infront.glsl

before after
image image

not that big. see comments
@juliapaci juliapaci changed the title render consecutive shaders to the fbo render consecutive shaders to the fbo (opengl) Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenGL: multiple custom shaders unsupported
1 participant