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

Passthrough Shader in example breaks IMDraw #36

Open
duysqubix opened this issue Oct 10, 2023 · 0 comments
Open

Passthrough Shader in example breaks IMDraw #36

duysqubix opened this issue Oct 10, 2023 · 0 comments

Comments

@duysqubix
Copy link
Contributor

I added shaders to my game recently and to ease in the new feature I decided to use your passthrough shader from the tutorial here. After adding it, I noticed anything being drawn by an IMDraw was black instead of the color it was supposed to be. Sprites and the Canvas clear color all show up as normal, but my IMDraw borders around buttons and simplistic progress bar appear as black.

Two causes come to mind.

  1. There is no "texture" for IMDraw things for the shader to reference.
  2. I'm drawing everything to a canvas, and then drawing the canvas to the window.

Number 1 makes a lot of sense if you look at the source, but I don't think I know enough about shaders yet to know what to do instead. Number 2 is something I read can enable a lot of advanced things but I'm still wrapping my head around the details so I admit this might be a side effect of that.

I don't think this is a bug in pixel, just in my understanding. How should I write my shaders to work with IMDraw?

Mac Big Sur x64
Pixel v0.10
Go 1.17.7

Original issue: faiface/pixel#305

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

No branches or pull requests

1 participant