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

use main buffer and copy data to fbo texture (opengl) #5294

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

juliapaci
Copy link
Contributor

@juliapaci juliapaci commented Jan 22, 2025

NEEDS REVIEW

continuation of #5037
resolves #4729

renders all shaders to the default buffer and then copies it to the designated custom shader texture.

this is a draft pr because:

  • it introduces a new shader "pipeline" which doesnt fit in with how the system was designed to work (which is only rendering to the fbo)
  • im not sure if this is the best way to achieve shaders being able to sample their output while also drawing to the screen. the cusom fbo (previous implementation) was useful in that it modularized the custom shader stage in rendering

@Talljoe
Copy link

Talljoe commented Jan 23, 2025

The latest change has a problem:
image

By getting rid of the fbo it looks like the shaders don't pick up the terminal text and just rewrite over themselves, hall-of-mirrors style.

This is what the previous commit looks like:
image

@juliapaci
Copy link
Contributor Author

The latest change has a problem...

sorry about that. i happened to test on shaders that filled the entire screen so i didnt catch it.

@juliapaci juliapaci marked this pull request as ready for review January 23, 2025 09:28
juliapaci and others added 5 commits January 23, 2025 12:43
rely on a backbuffer copy to sample from while we draw everything to the default framebuffer
@mitchellh mitchellh force-pushed the both-buffer-shaders branch from d482286 to 480489b Compare January 23, 2025 20:44
@mitchellh mitchellh enabled auto-merge (squash) January 23, 2025 20:45
@mitchellh mitchellh merged commit 9c8c53b into ghostty-org:main Jan 23, 2025
30 checks passed
@github-actions github-actions bot added this to the 1.1.0 milestone Jan 23, 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
3 participants