릴리스 노트는 영어로 작성되어 있습니다.
WebGL 2
WebGL 2 is here. The newest versions of the most used 3D library dropped WebGL 1, so a page built on them showed nothing at all. Floati now has the whole WebGL 2 interface with its own shading-language compiler, and it passes more of the official conformance pages than the reference browser. WebGL also reaches the screen with no copy through the processor, so a large 3D scene at retina size runs at 120 frames a second instead of 40, in less memory. Canvases are sharp on retina screens, and a heavy 3D scene shows its first frame in a third of a second instead of 23.
WebGL 2




This one started with a blank page. The newest versions of the most used 3D library no longer support WebGL 1, so a 3D page built on them showed nothing at all here. We wrote WebGL 2 in six slices: the interface, a compiler for the newer shading language with real integers, textures, buffers, draw targets and transform feedback. Our software renderer stays the oracle, so every slice is checked on the GPU against it. Windows found a bug Mac hid, a 3D texture lookup that would not compile, and Mac found one of its own: its graphics driver divides integers wrongly next to some loops, so we write division out ourselves.
A scene from the 3D library with metal, a clearcoat, an environment map and shadows: Floati 0.1.406, Floati 0.1.407 and the reference browser.
Sharp canvases on retina screens




We found this in the first minute of running a real 3D page in the app: it looked soft. The page asked for the device pixel ratio and was always told 1, so it drew at half size and the window stretched it. Every canvas and chart that scales itself for retina was blurry. Pages now see the real scale.
A canvas chart drawn for the screen's pixel ratio: Floati before, after, and the reference browser, on a retina screen.
WebGL straight to the screen
With the scene sharp, it was slow: every frame was read back from the GPU, flipped by the processor and sent back up as tiles. Now the page and the compositor share one buffer on the GPU, and the compositor draws the canvas and whatever covers it with the same arithmetic in the same order, so the pixels are the same bytes as before. Rotated canvases, filters and blend modes over a canvas still take the old path.
A first frame in a third of a second
Comparing against the reference browser, our first frame took 23 seconds. A scene starts in software and moves to the GPU once it has drawn enough, and drawing enough was counted in vertices. A scene that builds its lighting first does little geometry and a lot of shading, so it stayed in software. Shading counts now. Fixing that showed two more: a scene that moved mid-frame could fall back to software for good, and a test page that compares two drawings could get one from each path. Both are fixed, each with a law that fails without it.
Found on our own page
The release check loads 14 sites, and one of them is ours. It showed an error: a script read the observer from its MutationObserver callback and found nothing, because we never passed it. Looking closer, our callbacks also ran at the wrong moment among promise jobs, and disconnecting kept records it should drop. All three are fixed.
바뀐 점
변경 36개- JavaScript와 JITNew: WebGL 2. getContext('webgl2') returns a full WebGL2RenderingContext with every method and constant, vertex arrays, instancing, range draws and every buffer target. Switch: FLOATI_NO_WEBGL2.
- 렌더링New: shaders written in GLSL ES 3.00 compile and run: in and out, layout locations, unsigned and exact integers, non-square matrices, switch, while and do, bit operations, flat inputs, texelFetch, textureLod, textureGrad, textureOffset, textureSize and the vertex and instance ids.
- 렌더링Speed: shaders in the older shading language take none of the new paths and run at their old speed.
- JavaScript와 JITNew: WebGL 2 textures: every sized format, texStorage, 3D and array textures, sampler objects, base and max level, integer and shadow samplers, and pixel buffers for upload and read.
- 렌더링New: depth textures and partial uploads run on the GPU, so changing part of a texture no longer sends all of it. WebGL 1 pages get the partial uploads too.
- 렌더링New: uniform blocks, buffer copies, getBufferSubData, sync objects and queries, including occlusion queries on the GPU.
- 렌더링Speed: a buffer filled again with the same size sends only the bytes that changed. 1024 draws from one uniform buffer went from 26 s and 680 MB to 4 s and 108 MB.
- 렌더링New: several draw targets at once, every renderbuffer format, multisampled renderbuffers, blitFramebuffer, clearBuffer, readBuffer and invalidateFramebuffer.
- 웹 API와 DOMSpeed: a multisampled image is resolved inside the pass that drew it, with no pass of its own, and invalidating it after a blit drops samples nobody needs: 2.9 against 4.2 ms a frame at 2048 by 2048 with four samples.
- 렌더링New: transform feedback, so a vertex shader can write its results back into buffers, on the GPU and in software.
- 렌더링New: compressed textures in the S3TC, RGTC, BPTC, ETC1, ETC2 and EAC formats, decoded by our own code. The GPU gets plain texels, so every machine draws the same pixels and offers the same formats.
- 렌더링New: drawingBufferStorage with sRGB and half float buffers, and per-target blending with OES_draw_buffers_indexed.
- 미디어New: every kind of image source reaches a texture: a playing video made by a script, an ImageBitmap, an OffscreenCanvas, an image from a blob, and an SVG image made by a script.
- 미디어FIX: a video frame uploaded to a texture costs one copy and no allocation, the same frame twice costs nothing, and a video turns the way its file says.
- 렌더링FIX: an ImageBitmap keeps the alpha it was asked for, and an OffscreenCanvas can be drawn into with WebGL.
- 렌더링FIX: a texture upload is never lost when the GPU is still reading the one before it.
- 탭과 인터페이스FIX: a 3D texture lookup with an offset compiles on Windows. It failed there and worked on Mac.
- JavaScript와 JITSafety: a WebGL draw is bounded in work and in vertices, a loop in a shader on the GPU always ends, a draw in software stops after 4 seconds, and a page cannot ask for a texture of 1 GB or more.
- JavaScript와 JITFIX: integer division in WebGL 2 shaders is exact on Mac. The graphics driver got it wrong next to some loops, in about one program in a hundred.
- 렌더링New: WebGL reaches the screen with no readback. The page's drawing buffer goes straight to the compositor on the GPU, with whatever is painted over it, byte for byte the same as before. Switch: FLOATI_NO_CANVAS_LAYER.
- 렌더링FIX: rounded corners and opacity on a WebGL canvas run on the GPU at full rate.
- 웹 API와 DOMFIX: opacity on an element that is only an image was ignored. A faded logo showed at full strength.
- 웹 API와 DOMSpeed: a WebGL canvas scrolled out of view sends no frames.
- 렌더링FIX: pages see the real device pixel ratio. It was always 1, so every canvas and 3D scene was drawn at half size and stretched on a retina screen.
- 탭과 인터페이스FIX: a page that sizes itself while it loads sees the window's height. It saw a height three times too tall.
- 웹 API와 DOMFIX: a heavy 3D scene shows its first frame in a third of a second. Shader work did not count toward moving a scene to the GPU, so a scene that built its lighting first ran its first 23 seconds in software.
- 웹 API와 DOMFIX: a WebGL scene that moves to the GPU in the middle of a frame stays there. A clear on a target holding depth from software sent it back to software for good, at 0.2 frames a second.
- 웹 API와 DOMFIX: a page that reads its own pixels is moved to the GPU only between frames, so a test that compares two drawings sees one path.
- JavaScript와 JITFIX: MutationObserver callbacks get their observer as the second argument, run in order among promise jobs, and lose nothing on disconnect. Our own browser page showed an error because of it.
- JavaScript와 JITSpeed: a loop with a return or break moves into compiled code and stays there. A first call over four million elements went from 379 ms to 3 ms.
- 렌더링FIX: modules with long import lists load. A library that imported more than about 30 names at once never started.
- JavaScript와 JITFIX: fn.apply with a typed array or an array-like passes its elements, a typed array made from another converts each element, and canvas width="64px" on WebGL means 64.
- 렌더링FIX: a backslash before a new line in a template literal is removed, and \0 is a NUL character.
- 렌더링Speed: the storage button keeps one database connection instead of opening the encrypted file on every refresh, which took 3.6% of a core.
- 탭과 인터페이스FIX: the dead Never suspend items are gone from the tab menu, and the tab's hover card reads Pages and engine.
- 렌더링Testing: new laws cover WebGL 2, the canvas layer and observers. The canvas layer laws were checked by changing the code one edit at a time: 21 of 23 edits were caught, and the 2 left change nothing.