diwi/PixelFlow

Reaction diffusion not working on Processing 3.5.3

micuat opened this issue · 8 comments

I found that reaction diffusion does not work on Processing 3.5.3 (does not give errors in console, but it only shows blank white screen).

I recently updated Processing - when I open 3.3.7, reaction diffusion works fine - but with 3.5.3, it doesn't give any output. I guess any of

    // init
    tex_render = (PGraphics2D) createGraphics(width, height, P2D);
    tex_render.smooth(0);
    tex_render.beginDraw();
    tex_render.textureSampling(2);
    tex_render.blendMode(REPLACE);
    tex_render.clear();
    tex_render.noStroke();
    tex_render.background(0xFFFFFFFF);
    tex_render.fill      (0x0000FF00);
    tex_render.noStroke();
    tex_render.rectMode(CENTER);
    tex_render.rect(width/2, height/2, 20, 20);
    tex_render.endDraw();

this is not applied to the buffer at all.

hype commented

@micuat I would also have you try this in 3.4 as this is the release that caused the problems for me. which may shed light on where/which build the "not" expected results occured.

@hype I tested it and it runs on 3.4 - so it's not related to the wrapping problem, sorry for the confusion. But reaction diffusion still doesn't run on 3.5.3.

@micuat I can confirm same for me, I believe this is an issue with jogl jars included with processing, that are somewhat hacked (ie do not exactly correspond to jogl-2.3.2) and this all a bit opaque to all but processing developers.

@monkstone Do you have any info about those changes?

Here are the changes https://github.com/gohai/jogl/tree/processing, however I know think its not the jars in this case, but the vanilla processing itself (substituting jogl jars does not fix).

@micuat I know it's not a fix, but recently I contributed an example how to use Reaction Diffusion in pure Processing:

https://github.com/SableRaf/Shadertoy2Processing/tree/master/examples/reactionDiffusion2Pass

so I guess it's not really a problem with PixelFlow but because of changes in processing... should we open a separate issue on processing/processing as well??

@morisil cool, I'm just curious if you are using original pgraphics (unsigned char) or you somehow make a buffer with floats.

@micuat Yes, the original PGraphics. Apparently 8bit color is good enough for this particular reaction diffusion. But the lack of floating point textures is the reason I am switching in many cases from Processing to OPENRNDR:

https://medium.com/@kazikpogoda/the-limits-of-processing-and-how-i-transcend-them-with-openrndr-e6a63c5924fd

See also my contribution here for comparison:
https://github.com/openrndr/openrndr-tutorials/blob/master/shader-shadertoy-002/src/main/kotlin/Example.kt