Code Monkey home page Code Monkey logo

Comments (7)

thebracket avatar thebracket commented on May 13, 2024 2

It's not committed or working for all the examples yet, but I've made some pretty significant progress. This ended up expanding into "this really could be better code".

So the new pipeline:

  • Uses a single shader to render consoles.
  • Each console is one draw call of a single quad covering the whole screen.
  • Each console also updates a couple of textures containing character number, and colors (tiny dynamic textures, 80x50)
  • The shader now calculates the console position, samples the console buffer and font buffers and renders the console in a single pass.

I've got to get background colors, offsets and the post-processing in there - but so far, so good.

The following should give you example 1, including on a Mac (it works on my VirtualBox version):

http://bfnightly.bracketproductions.com/wasmtest-old2/ex01/

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024 2

I believe it is working! :-)
image

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024 1

Well, I've fixed a bunch of OTHER little bugs in the WebGL pipeline, and got it down to 1 pass with no framebuffer. Finally got a VM Mac working (slowly), so I can now see/replicate the error. Will keep hacking.

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024

I did a bunch of reading, and found that lots of people have problems with WebGL2 on OS X - including quite a few Unity users hitting the exact same bug (black screen). See the branch, webgl2-osx for work on this.

Based on my reading, the patch ( c3d1481 ):

  • Downgrades shaders to version 100 from version 300 es.
  • Removes the need for all extensions.
  • Tweaks the framebuffer creation (WASM only to avoid problems with AMD on Glutin) to use a GL_UNSIGNED_BYTE backing buffer.
  • Tweaks the framebuffer mode to use GL_NEAREST and not the various GL_LINEAR modes.

Downgrading to version 100 and tweaking the shaders to use the old syntax still ran on Windows, but the console gave a "GL invalid format" error, which looked like a big clue. So I performed the other steps, and now it runs well on my phone (Android, both Firefox and Chrome) and laptop (Windows 10, Chrome and Firefox).

I'll test as soon as I get access to a Mac. If anyone reading this has a Mac available, could you give these a go, please?

http://bfnightly.bracketproductions.com/wasmtest-old2/ex10/

http://bfnightly.bracketproductions.com/wasmtest-old2/ex01/

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024

Hearing from friends with Macs that this didn't help.

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024

image

Woot! I still have to figure out the mipmap warning, but all the demos are now working on my virtual Mac.

http://bfnightly.bracketproductions.com/wasmtest-old2/ex01/
(replace the 01 with 01 - 17 to see them all)

from bracket-lib.

thebracket avatar thebracket commented on May 13, 2024

Merged branch to master. Going to pull it into the roguelike tutorial and rebuild to test there also, so far so good.

from bracket-lib.

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.