Comments (7)
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.
from bracket-lib.
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.
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
fromversion 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 variousGL_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.
Hearing from friends with Macs that this didn't help.
from bracket-lib.
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.
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)
- Are we production yet?
- Fractal noise scaling
- Zero octave noise
- rltk not building for wasm
- no_std support?
- BTerm set() with float data point HOT 1
- Hello Minimal Terminal crashes with Wayland error HOT 1
- Noise subtract with overflow
- FastNoise::seeded() creates 0 noise
- Add Support for More Font Sizes
- `hello_minimal` exampe crashes with `cross_term` backend enabled (vscode integrated terminal)
- `hello_terminal` example renders incorrectly with `cross_term` enabled only in WSL2 environment
- BLACK must be defined only once in the value namespace of this module
- book unavailable HOT 4
- Possible issue with drawing cerrain wall glyph combinations HOT 4
- Error sending request: Resource temporarily unavailable (exit code 11) HOT 1
- Request: Move terminal init and update logic out of main_loop
- Request: disable RPG-style dice string parsing thingy for `bracket-noise`
- egl: failed to create dri2 screen HOT 4
- Input on wasm repeats inputs on losing focus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bracket-lib.