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 · 6 comments

Comments

Projects
None yet
3 participants
@jsundram

jsundram commented Mar 28, 2016

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

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Mar 30, 2016

Member

@JakubValtar Any comments about this?

Member

codeanticode commented Mar 30, 2016

@JakubValtar Any comments about this?

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Mar 30, 2016

Contributor

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

Contributor

JakubValtar commented Mar 30, 2016

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

@jsundram

This comment has been minimized.

Show comment
Hide comment
@jsundram

jsundram 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 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

This comment has been minimized.

Show comment
Hide comment
@jsundram

jsundram 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

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

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 3, 2016

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.

Contributor

JakubValtar commented Apr 3, 2016

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 closed this Apr 3, 2016

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

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 3, 2016

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.

Contributor

JakubValtar commented Apr 3, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment