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

Add post processing #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlexanderJCS
Copy link

I added a new package, engine.postprocesing. Inside, I added the PipelineItem and PostProcessing classes. I created two shaders which post processing depends on: 2d_do_nothing.vert and 2d_do_nothing.frag. I also modified Main to use a default post processing pipeline.

When you run the program, it should look the same, but you can add post processing shaders to change the look.

@jordan4ibanez
Copy link
Owner

Very nice work, but there is a strange side effect that I've noticed with this
image

@AlexanderJCS
Copy link
Author

Hi Jordan, after some digging I did last week I couldn't find a solution. But I can tell you some things I found:

  1. You can get this same effect without a frame buffer by disabling depth testing.
  2. In the direction where it is rendered incorrectly, objects farther away are drawn on top of objects that are closer.
  3. To render the frame buffer properly, you must disable then re-enable depth testing.
    a. If you do not disable and re-enable depth testing, the issue persists. To see if the issue persists, you need to open the application in RenderDoc since the frame buffer will not draw to the screen properly.
    b. In RenderDoc, it seems that depth testing is disabled and enabled correctly.

If I had to guess, this issue has something to do with the depth buffer. Rendering the quad with the frame buffer texture may be messing it up somehow.

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.

None yet

2 participants