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

Default renderer resets blend mode between setup() and draw() #4376

Closed
jsundram opened this issue Mar 28, 2016 · 7 comments
Closed

Default renderer resets blend mode between setup() and draw() #4376

jsundram opened this issue Mar 28, 2016 · 7 comments

Comments

@jsundram
Copy link

blendMode(SUBTRACT) doesn't render the same results in P2D mode and default render mode. In fact, it looks like no subtraction is happening in the default renderer. Processing 3.0.2, OSX.

@codeanticode
Copy link
Member

@JakubValtar Any comments about this?

@JakubValtar
Copy link
Contributor

Hm. Could you post any code or screenshots for me, @jsundram? Are other blend modes ok?

@jsundram
Copy link
Author

jsundram commented Apr 2, 2016

@JakubValtar , here's code to repro: jsundram/issue_4376.pyde

You can see the results of the different renderers (4 is the blend mode for SUBTRACT, see PConstants.java#L260).

issue_4376_4xprocessing awt pgraphicsjava2d

issue_4376_4xprocessing opengl pgraphics2d

issue_4376_4xprocessing opengl pgraphics3d

@jsundram
Copy link
Author

jsundram commented Apr 2, 2016

@JakubValtar , I wrote jsundram/render_all_blend_modes.pyde to run through all the blend modes for all of the renderers, and make 3 different graphics, so you can see where they differ. There are a bunch of differences between P2D/P3D and Java2D, although P2D and P3D appear to be the same everywhere (I didn't do any pixel diffing, just eyeballing). Weirdly, the subtract issue that I raised above doesn't show up -- maybe you can look at my code and see why?

merged

@JakubValtar
Copy link
Contributor

This is a duplicate of #4019, blendMode is basically reset between setup() and draw(). For now, set it in draw() each frame. It should be fixed in #4341, which is waiting to be merged.

@JakubValtar JakubValtar changed the title blendMode operates differently in P2D vs default renderer Default renderer resets blend mode between setup() and draw() Apr 3, 2016
@JakubValtar
Copy link
Contributor

And btw, thanks for making the comparison. You see differences because DIFFERENCE, HARD_LIGHT, SOFT_LIGHT, OVERLAY, DODGE, and BURN modes are supported only in the default renderer (you are supposed to get an error message when you try to set unsupported mode). I revised and optimised all modes last year and I'm fairly confident they do what they should.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants