Code Monkey home page Code Monkey logo

Comments (9)

charlieroberts avatar charlieroberts commented on July 19, 2024

Thanks for the bug report! I will dig in and get back to you on this.

from gibber.

xinaesthete avatar xinaesthete commented on July 19, 2024

I've just realised that 3) may be similar to another issue I just created (#12).... although funnily enough I was having trouble getting the simpler mapping as mentioned by @RnbWd to work even after multiple executions a moment ago, whereas the more complex loop example manages to assign one new mapping per execution of the loop (presumably as each invocation stops when it gets to an exception, but leaves a functional mapping in place at the same time as throwing the exception).

I also have the same problem with the Film shader, and have indeed had similar problems with some of the Three.js post-processing examples in the past in my own private project; work on that has been on hold for a little while, but I have been meaning to look back into it and contribute back up to Three if I make progress.

(also thanks for the nice software etc...)

from gibber.

charlieroberts avatar charlieroberts commented on July 19, 2024

Just a note that I did look into this issue a while back... but I was never able to figure out what was wrong with the Film shader specifically. My only thought is that it might take advantage of a particular feature on graphics cards that isn't always available.

Graphics.init('3d') works fine for me now... let me know if it's not still working for anyone.

from gibber.

xinaesthete avatar xinaesthete commented on July 19, 2024

I've just tried running on my Windows machine with an nVidia 560ti and found that the Film shader does work, but Graphics.init('3d') complains (with an inappropriate message) if it's already been drawing 3d. Let me know if you'd like any more details. I was running on an iMac before.

from gibber.

xinaesthete avatar xinaesthete commented on July 19, 2024

Actually, I'm getting seemingly inconsistent results here. After refreshing the page, I found that Film() was not working but Graphics.init('3d') was. After another refresh, they both were.

I had thought that I might have seen Graphics.init('3d') run quietly after doing some 3d, but I can't reproduce that now.

If I do

Cube()
Graphics.init("3d") //error dialog pops up
Film()

Then I get a blank screen, but if I then call Torus() I get a torus with a Film effect.
If I call Cube, then init, then Torus (at this point I see both a cube and a torus), then Film (at this point I see a torus with a film effect, but no cube)... at some point I noticed that I could layer on different effects, but none of the geometry was working...

I remember being slightly confused by the logic of how buffers are used in the EffectProcessor, as I mentioned, at some time I mean to make somewhat better sense of it.

I don't know to what extent the graphics card itself is important vs ANGLE implementation details / browser versions... FWIW I've done some work on an installation using WebGL with some very particular shaders and we use NodeWebkit partly for stability against those kinds of changes (which can lead to showstopping bugs when the browser updates) and partly for its other features.

from gibber.

charlieroberts avatar charlieroberts commented on July 19, 2024

Sorry for the delayed response... I've been traveling (and performing with Gibber!).

Some of the problems with the Graphics initialization stem from 2D vs 3D modes in Gibber. In 2D, I don't use WebGL, as WebGL requires a great deal more CPU than simply using canvas. However, I really like the idea of being able to combine shaders with 2D drawing, so, 2D mode effectively turns into a WebGL textured fullscreen quad as soon as a user instantiates a shader ( assuming webgl is available ). Basically, 2D mode becomes 3D mode as soon as a shader is employed.

This whole process is a mess right now. I need to completely refactor it. Hopefully some of these issues will go away after I sink some time into it. I plan to do so in the very near future... it's near the top of my list. Will keep this issue updated accordingly.

from gibber.

xinaesthete avatar xinaesthete commented on July 19, 2024

No worries re. delay; hope your travels have been good (NIME / LiveCoding and the Body in Brighton I guess, and maybe more).

All seems to make sense, good luck with your refactor.

from gibber.

charlieroberts avatar charlieroberts commented on July 19, 2024

So much for "Will keep this issue updated accordingly". This should be much improved now, although it's still messy even after I tried to refactor it. But it seems like you can switch between the demos (which alternate between 2d and 3d modes) and everything mostly works. Let me know if there are still big problems.

from gibber.

xinaesthete avatar xinaesthete commented on July 19, 2024

Seems much improved at a glance. Nice to have Gibber brought back into my radar; must have more of a play at some point.

from gibber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.