diff --git a/site/blog/index.html b/site/blog/index.html index 5e5420e4..33a773bc 100644 --- a/site/blog/index.html +++ b/site/blog/index.html @@ -52,11 +52,11 @@

Notes from the metal.

- three.js objects on a Sony PS3, under a PocketJS overlay + Three.js r187 on a PlayStation 3: a gold torus knot over a mirrored floor, under a PocketJS HUD - December 3, 2026 · 14 min - three.js on a Sony PS3 - A WebGL developer’s tour of the RSX: two memories, a command FIFO you write yourself, fragment uniforms that live inside the program, and how a three.js r187 scene reached it at 1920 × 1080. + December 3, 2026 · 20 min + Running Vanilla Three.js r187 at 1080p on a 2006 PlayStation 3 + A WebGL developer’s tour of the PS3 RSX GPU, raw NV40 shader assembly, hardware-stenciled planar reflections, and why ThreeRT is a runtime—not just a renderer. Read the post → diff --git a/site/blog/ps3/index.html b/site/blog/ps3/index.html index 08fd5af7..594fbbdd 100644 --- a/site/blog/ps3/index.html +++ b/site/blog/ps3/index.html @@ -3,14 +3,14 @@ -three.js on a Sony PS3 — ThreeRT Blog - +Running Vanilla Three.js r187 at 1080p on a 2006 PlayStation 3 — ThreeRT Blog + - - + + @@ -38,10 +38,33 @@ .prose li b { color: var(--bone); } .prose .code { margin-top: 12px; font-size: 12px; line-height: 1.7; overflow-x: auto; } .prose .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; } - .fig { margin-top: 24px; } + .fig { margin: 24px 0 0; } .fig img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #000; } .fig figcaption, .dg figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--mute); max-width: 80ch; } - .post-head h1 { max-width: 18ch; } + .post-head h1 { max-width: 21ch; font-size: clamp(34px, 4.3vw, 60px); line-height: 1.02; } + .post-head .lede { max-width: 64ch; } + .intro .beat { font: 620 clamp(22px, 2.2vw, 28px)/1.2 var(--font-sans); letter-spacing: -0.03em; color: var(--bone); margin-top: 22px; } + .prose ol:not(.steps2) { margin: 16px 0 0; padding-left: 22px; color: var(--bone-2); display: grid; gap: 10px; max-width: 70ch; line-height: 1.6; } + .prose ol li::marker { color: var(--mute); font-family: var(--font-mono); font-size: 13px; } + .prose ol b { color: var(--bone); } + .prose em { color: var(--bone); } + .prose p.fine { font-size: 14px; color: var(--mute); } + + /* Comparison tables. */ + .tbl { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-1); } + .tbl table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.45; min-width: 620px; } + .tbl th, .tbl td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--bone-2); } + .tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; } + .tbl thead th { font: 500 11.5px/1.4 var(--font-mono); color: var(--mute); background: #0e1016; } + .tbl tbody th { font-weight: 600; color: var(--bone); white-space: nowrap; } + .tbl td.hot, .tbl tr.hot td, .tbl tr.hot th { background: color-mix(in srgb, var(--c-ps) 9%, transparent); color: var(--bone); } + .tbl b { color: var(--bone); } + .tbl small { display: block; margin-top: 2px; font: 500 11px var(--font-mono); color: var(--mute); } + .tbl code { font-size: .92em; } + + /* An aside that names the idea. */ + .aha { margin-top: 20px; padding: 16px 18px 16px 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ember) 45%, transparent); background: color-mix(in srgb, var(--ember) 8%, var(--ink-1)); color: var(--bone-2); font-size: 15px; line-height: 1.6; max-width: 76ch; box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ember) 80%, transparent); } + .aha b { color: var(--bone); } .intro { margin-top: 36px; } .intro p { font-size: 17.5px; line-height: 1.6; color: var(--bone); max-width: 66ch; } .intro p + p { color: var(--bone-2); font-size: 16px; } @@ -107,7 +130,8 @@ .steps2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; } .steps2 li { counter-increment: s; position: relative; padding: 10px 12px 10px 40px; border-radius: 10px; border: 1px solid var(--line); background: #10131a; display: grid; gap: 4px; font-size: 13.5px; color: var(--bone); } .steps2 li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--font-mono); color: #111; background: var(--tungsten); } - .steps2 code { font-size: 11px; color: var(--bone-2); background: none; padding: 0; overflow-wrap: anywhere; } + .steps2 li > * { min-width: 0; } + .steps2 code { font-size: 11px; color: var(--bone-2); background: none; border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; } /* One frame, lane by lane. */ .lanes { display: grid; gap: 10px; } @@ -149,90 +173,57 @@
Blog · December 3, 2026 -

three.js on a Sony PS3.
A WebGL developer’s tour of the RSX.

-

three.js now draws on a 2006 Sony PlayStation 3: a scene written against the three package from npm, lit with physically based materials and a planar mirror, at 1920 × 1080, with a PocketJS interface in the same frame. The PS3 has no WebGPU and no JIT, and three.js has never had a renderer for its GPU.

+

Running Vanilla Three.js r187 at 1080p on a 2006 PlayStation 3

+

A WebGL developer’s tour of the PS3 RSX GPU, raw NV40 shader assembly, hardware-stenciled planar reflections, and why ThreeRT is a runtime—not just a renderer.

-
- A Sony PS3 frame at 1920 by 1080: a gold torus knot, PBR satellites and a mirrored floor, under a PocketJS overlay reading 20 fps, 25,990 triangles and 26 draws -
Read from the RSX’s front buffer over the network at 1920 × 1080: a TorusKnotGeometry in a MeshPhysicalMaterial, three coloured PointLights, an environment map, 260 additive embers, a planar mirror drawn with the stencil buffer, and the PocketJS overlay.
-
- -
-

Running JavaScript on old consoles is not new, and neither is three.js outside a browser tab: desktop apps have shipped it for years, with a browser inside them. What we believe is new is three.js itself on hardware where it could not run at all: the scene code you already write, unchanged, drawn by a GPU from 2006, with a small native runtime in place of a browser.

-

This post is how we got there: what three.js needs from a machine, how the PS3 draws when you look at it from WebGL, what we built in between, the five bugs that cost us the most, and what it measured. The work is part of ThreeRT, the native runtime for three.js.

+
+

If you write WebGL or Three.js for fun, you live inside a remarkably polite abstraction. You call new THREE.TorusKnotGeometry(), hand it a MeshPhysicalMaterial, drop three PointLights into a Scene, and call renderer.render(scene, camera). Beneath that line sits an entire civilization of software: a JIT-compiled JavaScript engine, a browser compositor, ANGLE, OpenGL or Metal or Vulkan, and a multi-hundred-megabyte GPU driver quietly managing memory, compiling GLSL, and hiding hardware weirdness.

+

Now take all of that away.

+

No Chrome. No Electron. No WebGL, no OpenGL, no Vulkan, no Metal, no wgpu, and no JavaScript JIT. Just a 2006 PlayStation 3—a 3.2 GHz big-endian PowerPC Cell with 256 MiB of main memory, paired with NVIDIA’s RSX “Reality Synthesizer” and its own 256 MiB of GDDR3—running vanilla three@0.187.0 (import * as THREE from "three") at native 1920 × 1080, with a PocketJS (SolidJS + Tailwind) HUD composited on top at 3× density.

-
- 01 -

The premise

-

three.js has always come with a browser, and it is easy to think it needs one. It does not. Its scene graph, math, geometry generators, materials, lights and cameras are plain JavaScript with no DOM in them. Two things need the browser: the renderer, which speaks WebGL or WebGPU, and the JIT that keeps the renderer’s per-frame JavaScript fast.

-
-
Until now

three.js ran where a browser ran. Outside the web you shipped one with it: Electron, a WebView. On a machine with no WebGL or WebGPU and no JIT, three.js did not run at all.

-
Now

three@0.187.0, imported as it is, builds the scene on the PS3’s Cell; a renderer we wrote draws it on the RSX at 1920 × 1080; PocketJS draws the interface into the same frame. Four demos run at 16 to 30 fps.

-
-

So we split the two. We kept everything of three.js that is plain JavaScript and replaced one thing, the renderer: once a frame, RSXRenderer walks the three.js scene and hands it to C code that draws on the RSX. The JavaScript runs on QuickJS, an interpreter with no JIT, on the Cell’s PowerPC core.

-

The console is a PlayStation 3 Slim (CECH-2500) on system software 4.81 with custom firmware, which homebrew needs. What carries over, and what does not yet:

-
keeps
the scene: Mesh, InstancedMesh, Points, Line; standard, physical, Phong, Lambert, basic and normal materials; ambient, hemisphere, directional and point lights; fog
replaces
WebGLRenderer, with RSXRenderer and native code
not yet
what lives inside three.js’s renderer: shadows, ShaderMaterial and TSL, three.js’s post-processing
-
+
+ A PlayStation 3 frame at 1920 by 1080: a gold torus knot, PBR satellites and a mirrored floor, under a PocketJS HUD reading 20 fps, 25,990 triangles and 26 draws +
Captured straight from a PlayStation 3 Slim’s RSX front buffer over TCP: a liquid-gold TorusKnotGeometry, three orbiting coloured PointLights, studio reflections, 260 additive embers, a hardware-stenciled real-time mirror floor, and a translucent SolidJS HUD—all driven by real three@0.187.0.
+
-
- 02 -

The PS3, seen from WebGL

-

If you know WebGL, you know how the PS3 rasterizes: vertex and index buffers, depth testing, fragment programs, blending. What changes is everything around them. In a browser, a driver places your memory, compiles your shaders and synchronizes with the GPU. On a PS3 there is no driver: that is your code.

+

This post is the engineering story behind that screenshot: what makes the PS3’s graphics architecture genuinely strange if you come from WebGL, how we bridged unmodified Three.js r187 onto raw RSX command buffers and hand-written NV40 assembly shaders, five wild bugs we caught by disassembling the console toolchain, and what this means for ThreeRT—the native runtime for Three.js.

-
- Drawing a three.js scene, in a browser and on a PS3 -
-
-

In a browserWebGL

-
Your three.js scene
-
three.js WebGLRenderer
-
JavaScript, JIT-compiledV8 or JavaScriptCore
-
WebGL → GPU process → ANGLE
-
The OS drivercompiles GLSL, places memory, synchronizes
-
A unified-shader GPU
-
The compositor → a window
-
-
-

On a Sony PS3RSX

-
Your three.js scenethree@0.187.0, as it is
-
RSXRendererwalks the scene, packs typed arrays
-
JavaScript, interpretedQuickJS on the Cell PPU, big-endian
-
A C host writes the command FIFOPSL1GHT, packets of 32-bit words
-
Your code is the driverallocates VRAM, fences, flips
-
The RSXseparate vertex and fragment units
-
HDMI scanout, no compositor
-
-
-

the same on bothwhat we wrotethe driver’s job in a browser, ours on a PS3

-
+
+ 01 +

What makes the PS3 GPU weird (through WebGL eyes)

+

If you know WebGLRenderingContext, you already have the right mental model for rasterization: vertex buffers, index buffers, depth testing, fragment shaders and blending all exist on the PS3. What changes is everything around them.

-

Two memories, and you manage both

-

Memory is split in two: 256 MiB of XDR for the Cell, where QuickJS, three.js and PocketJS live, and 256 MiB of GDDR3 for the RSX. You allocate GPU memory yourself (rsxMemalign), turn CPU pointers into the offsets the RSX understands (rsxAddressToOffset), order your writes with a PowerPC barrier (eieio) and invalidate the RSX’s vertex and texture caches when you change what is in them. Two 1080p colour buffers and a depth-and-stencil buffer take about 25 MB; the rest is for meshes, textures and glyph atlases.

+

Split memory, zero driver hand-holding

+

In WebGL, gl.bufferData() and gl.texImage2D() hand bytes to a driver that decides where they live, migrates them on demand, and cleans up after you. On a PlayStation 3, memory is physically split in two:

+
    +
  • 256 MiB of XDR for the Cell, where QuickJS, Three.js and PocketJS live
  • +
  • 256 MiB of GDDR3 for the RSX (500 MHz core, 24 pixel pipelines, 8 vertex units)
  • +
+

You allocate VRAM yourself with rsxMemalign(64, bytes), translate raw pointers into the offsets the RSX understands (rsxAddressToOffset), order your writes with a PowerPC barrier (eieio), and explicitly invalidate the vertex and texture caches whenever you upload new data. Two 1920 × 1080 A8R8G8B8 colour buffers cost about 16.6 MB; a full 1080p Z24S8 depth-and-stencil buffer costs another 8.3 MB. That still leaves more than 200 MiB of VRAM for meshes, textures and glyph atlases.

The two memories, and the command FIFO between them - + Cell PPU · 3.2 GHz - 256 MiB XDR · QuickJS · three.js · PocketJS + 256 MiB XDR · QuickJS · Three.js · PocketJS command FIFO · 2 MiB @@ -251,19 +242,32 @@

Two memories, and you manage both

fragment programs 2 × 1080p colour · Z24S8 -
Done words are grey, words the RSX has not reached yet are lit. The fragment programs live in GPU memory, which matters below.
+
Words the RSX has already read are grey; words it has not reached yet are lit. Note where the fragment programs live—in GPU memory. That matters in a minute.
-

No driver: you write the command stream

-

There is no gl.drawElements() on PS3 homebrew. The CPU and the RSX share a ring of 32-bit words, the command FIFO: every graphics call writes a method header and its arguments at put, and the RSX’s get chases it. Two things follow.

-
    -
  • You own synchronization. Overwrite a buffer the RSX has not read yet, or rewind the ring while get is behind put, and it reads garbage and locks the console. You fence with rsxFinish and an increasing reference, and present with gcmSetFlip.
  • -
  • You own the ring’s end. Write more in one frame than the segment holds without jumping back to its start (rsxSetJumpCommand) and you run off its end. An InstancedMesh taught us this; see bug 5.
  • -
- -

Two shader units, and fragment constants live inside the program

-

The RSX comes from NVIDIA’s G70, the GeForce 7800 generation, and PSL1GHT drives it with NV40-class registers and assembly. It is the last generation before unified shaders: vertex programs (!!VP2.0) and fragment programs (!!FP2.0) run on different units with different rules. Vertex programs read constants from a bank of vec4 registers, c[…], loaded through the FIFO. Fragment programs have no such bank.

-

A fragment “uniform” is a 16-byte slot in the program’s own machine code. The assembler leaves the slot and records where it is. To set it, you write the value into the program in GPU memory, with a DMA write ordered with your other commands (rsxInlineTransfer), and every 32-bit float has its two 16-bit halves swapped, because that is the order in which the fragment unit fetches words. Then you point the RSX at the program again so it does not run a stale copy.

+

No OpenGL—you speak the raw command FIFO

+

There is no gl.drawElements() driver layer in PS3 homebrew (PSL1GHT, the open-source take on libgcm). Instead, the CPU and GPU talk through a DMA ring buffer—the command FIFO—in shared memory. Every “graphics call” simply writes 32-bit method headers and payload words at ctx->current, then rings the doorbell (rsxFlushBuffer) so the RSX’s get pointer chases your put pointer.

+

That has two huge consequences for a WebGL developer:

+
    +
  1. You own synchronization. Overwrite a vertex buffer, or rewind the ring, while the RSX’s get is still behind your put, and it reads garbage and hard-locks the console. You fence with rsxFinish(ctx, ++ref) and pace display flips with gcmSetFlip and gcmSetWaitFlip.
  2. +
  3. You own the ring’s end. Push too many commands in one frame without jumping back to the start with rsxSetJumpCommand, and you run straight off the end of the segment. (How THREE.InstancedMesh taught us this the hard way is bug 5.)
  4. +
+ +

Pre-unified shaders—and the wildest uniform mechanism you’ve ever seen

+

The RSX descends from NVIDIA’s G70, the GeForce 7800 GTX generation, and PSL1GHT drives it with NV40-class registers and assembly. That is the last generation before unified shader cores: vertex programs (!!VP2.0) and fragment programs (!!FP2.0) run on completely different processors with completely different rules.

+
+ + + + + + + + +
WebGL (GLSL)RSX vertex !!VP2.0RSX fragment !!FP2.0
Uniform storageuniforms, UBOsa bank of vec4 registers, c[…]none!
Setting onegl.uniform4f(…)a block load through the FIFOpatched into the program’s microcode, in VRAM
Constants per instructionas many as you likeat most one c[k]at most one c[k]
Interpolatorsvaryingso[COL0..1], o[TEX0..7]f[COL0..1], f[TEX0..7]
+
+

Read that second row again. The RSX fragment processor has no uniform registers.

+

When you declare a fragment uniform like uCamPos or uDirCol, the assembler (cgcomp) leaves a 16-byte hole right inside the fragment program’s machine code and records its byte offset in a constant table. Setting a fragment uniform literally means issuing a GPU-ordered DMA write (rsxInlineTransfer) that self-modifies the fragment program in VRAM—with every 32-bit float halfword-swapped, (bits >> 16) | (bits << 16), because that is the order the fragment unit fetches words in—and then pointing the RSX at the program again so it doesn’t run a stale copy.

Setting uTint = (1.0, 0.85, 0.4, 1.0) in a fragment program @@ -281,73 +285,125 @@

Two shader units, and fragment constants live inside the program

  • Point the RSX at the program againrsxLoadFragmentProgramLocation(…)
  • -
    The instruction words are illustrative; the slot’s bytes are the real swapped values. In a browser the same thing is gl.uniform4f(loc, 1, 0.85, 0.4, 1).
    +
    The instruction words are illustrative; the slot’s bytes are the real swapped values. In a browser, all of this is gl.uniform4f(loc, 1, 0.85, 0.4, 1).
    -

    Big-endian on both sides

    -

    The Cell is big-endian, and so is the RSX. QuickJS keeps a Float32Array in the CPU’s byte order, which is the order the RSX reads vertices and indices in. So when three.js fills a BufferGeometry or an InstancedMesh’s matrices, our bridge takes the array’s memory and copies it to the GPU as it is: no per-element conversion, no byte swapping.

    +

    The big-endian silver lining

    +

    The Cell is big-endian PowerPC. In WebGL on x86 or ARM you almost never think about byte order. On the PS3, QuickJS stores Float32Array, Uint16Array and Uint32Array in the CPU’s native order—which is also the order the RSX reads vertices and indices in.

    +

    So when Three.js builds a BufferGeometry or updates InstancedMesh.instanceMatrix.array, our C bridge grabs the array’s memory with JS_GetTypedArrayBuffer and copies it straight into VRAM, with no per-element boxing and no byte swapping.

    + +

    Two completely different worlds

    +

    Before looking at code, here is the gap between drawing in a browser and drawing on PS3 bare metal:

    +
    + Drawing a Three.js scene, in a browser and on a PS3 +
    +
    +

    In a browserWebGL · managed and unified

    +
    Your Three.js scene
    +
    Three.js WebGLRenderer
    +
    JavaScript, JIT-compiledV8 or JavaScriptCore
    +
    WebGL → GPU process → ANGLE
    +
    The OS drivercompiles GLSL, places memory, synchronizes
    +
    A unified-shader GPUshared register file, uniform buffers
    +
    The compositor → a window
    +
    +
    +

    On a PlayStation 3RSX · explicit and pre-unified

    +
    Your Three.js scenethree@0.187.0, as it is
    +
    RSXRendererwalks the scene, packs typed arrays
    +
    JavaScript, interpretedQuickJS on the big-endian Cell PPU
    +
    A thin C bridge writes the 2 MiB FIFOPSL1GHT, packets of 32-bit words
    +
    Your code is the driverallocates VRAM, fences, flips
    +
    The RSXVP2.0 → FP2.0, constants patched into VRAM
    +
    HDMI scanout at 1920 × 1080, no compositor
    +
    +
    +

    the same on bothwhat we wrotethe driver’s job in a browser, ours on a PS3

    +
    +

    Notice how many layers disappear on the right—and how much responsibility moves straight into your own C code.

    - 03 -

    One triangle, five stages

    -

    The same coloured triangle, drawn both ways. Every design choice in the three.js renderer comes out of these five differences.

    + 02 +

    Side by side: drawing one triangle in WebGL vs. the RSX

    +

    Every graphics programmer learns by drawing a single coloured triangle. Walking through the five stages of that one triangle side by side makes the PS3 click—and explains every optimization we had to build for Three.js later.

    -

    1 · Upload the vertices

    +

    Stage 1 · Uploading vertex data

    +

    In WebGL you hand a Float32Array to the driver and forget where it lives. On the RSX you carve aligned bytes out of GDDR3 yourself, enforce a PowerPC memory barrier, convert the CPU pointer into an RSX offset, and flush the GPU’s vertex cache:

    -
    WebGL
    // The driver places and caches it.
    +        
    WebGL
    // The driver allocates, aligns,
    +// migrates and caches it for you.
     const vbo = gl.createBuffer();
     gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
     gl.bufferData(gl.ARRAY_BUFFER, verts,
                   gl.STATIC_DRAW);
    -
    PS3
    // Aligned GPU memory, a barrier, an offset, a cache flush.
    +        
    PS3 RSX
    // Explicit VRAM, a barrier, an offset, a cache flush.
     TriVert *vb = rsxMemalign(64, 3 * sizeof(TriVert));
     memcpy(vb, triangle, 3 * sizeof(TriVert));
    -__asm__ volatile("eieio" ::: "memory");
    -u32 vb_off; rsxAddressToOffset(vb, &vb_off);
    -rsxInvalidateVertexCache(ctx);
    +__asm__ volatile("eieio" ::: "memory"); // reach GDDR3 +u32 vb_off; +rsxAddressToOffset(vb, &vb_off); // offsets, never pointers +rsxInvalidateVertexCache(ctx); // old vertices are stale
    -

    2 · Load the shaders

    -

    GLSL compiles on the user’s machine. RSX programs are assembled before the build (cgcomp -a); the vertex program is sent through the FIFO, and the fragment program is copied into GPU memory, because the RSX fetches fragment instructions from there.

    +

    Stage 2 · Writing and loading shaders

    +

    In WebGL, GLSL strings compile on the user’s machine at run time. On the RSX, shaders are assembled offline into separate !!VP2.0 and !!FP2.0 microcode (cgcomp -a). Vertex microcode goes inline over the FIFO, but fragment microcode has to be copied into 64-byte-aligned VRAM, because the RSX fetches pixel instructions straight from GDDR3:

    WebGL
    // GLSL, compiled at run time.
     gl_Position = uMVP * vec4(aPos, 1.0);
     vColor = aColor;
     // …
     gl_FragColor = vColor * uTint;
    -
    PS3
    # !!VP2.0: c[0..3] are the rows of uMVP
    +        
    PS3 RSX
    # !!VP2.0: c[0..3] are the rows of uMVP
     DP4 R0.x, v[0], c[0];   DP4 R0.y, v[0], c[1];
     DP4 R0.z, v[0], c[2];   DP4 R0.w, v[0], c[3];
     MOV o[HPOS], R0;        MOV o[COL0], v[3];
    -# !!FP2.0: c[0] is the uTint slot
    +# !!FP2.0: uTint is a 16-byte hole in the ucode
     MOV R1, c[0];
    -MULR o[COLR], f[COL0], R1;
    +MULR o[COLR], f[COL0], R1; + +// C: the fragment program goes into VRAM +void *fp_vram = rsxMemalign(64, fp_size); +memcpy(fp_vram, fp_src, fp_size); +rsxAddressToOffset(fp_vram, &fp_off);
    -

    3 · Set the uniforms

    -

    Here the two worlds part. A vertex constant is a block load through the FIFO, cheap enough for every draw. A fragment constant is a write into the program and a reload of it.

    +

    Stage 3 · Updating uniforms (the biggest mental shift)

    +

    In WebGL, vertex and fragment uniforms look identical. On the RSX they are two completely different hardware mechanisms:

    -
    WebGL
    gl.uniformMatrix4fv(locMVP, false, mvp);
    +        
    WebGL
    // Symmetric across stages.
    +gl.useProgram(program);
    +gl.uniformMatrix4fv(locMVP, false, mvp);
     gl.uniform4f(locTint, 1.0, 0.85, 0.4, 1.0);
    -
    PS3
    // Vertex: four rows into c[0..3].
    +        
    PS3 RSX
    // 1. Vertex: a FIFO block load into c[0..3]
    +//    (Three.js is column-major; DP4 wants rows)
     rsxLoadVertexProgramParameterBlock(ctx, 0, 4, mvp_rows);
    -// Fragment: into the program itself, halves swapped.
    +
    +// 2. Fragment: self-modify the program in VRAM,
    +//    each float's 16-bit halves swapped
     for (u32 i = 0; i < tab->num; i++)
       rsxInlineTransfer(ctx, fp_off + tab->offset[i],
                         swapped, 4, GCM_LOCATION_RSX);
    +// Point the RSX at the program again
     rsxLoadFragmentProgramLocation(ctx, fp, fp_off,
                                    GCM_LOCATION_RSX);
    + -

    4 · Draw

    -

    WebGL’s clip space has +Y up and the screen comes out right. The RSX scans out top-down with depth from 0 to 1, so a viewport with a negative Y scale maps three.js’s clip space onto it; attributes are bound by GPU offset.

    +

    Stage 4 · Binding attributes, viewport and the draw

    +

    In WebGL, OpenGL’s convention (+Y up, depth from −1 to 1) is automatic. On the RSX you bind the colour + Z24S8 surface yourself, set a negative-Y viewport scale so Three.js’s +Y-up clip space lands right side up on the PS3’s top-down scanout, bind attributes by VRAM offset, and emit the draw packet into the FIFO:

    WebGL
    gl.viewport(0, 0, 1920, 1080);
    +gl.clear(gl.COLOR_BUFFER_BIT |
    +         gl.DEPTH_BUFFER_BIT);
     gl.vertexAttribPointer(0, 3, gl.FLOAT,
                            false, 28, 0);
     gl.drawArrays(gl.TRIANGLES, 0, 3);
    -
    PS3
    f32 scale[4]  = { 960, -540, 0.5f, 0 };
    +        
    PS3 RSX
    rsxSetSurface(ctx, &surface);  // A8R8G8B8 + Z24S8
    +rsxClearSurface(ctx, GCM_CLEAR_R | GCM_CLEAR_G |
    +  GCM_CLEAR_B | GCM_CLEAR_A | GCM_CLEAR_Z | GCM_CLEAR_S);
    +// NDC (+Y up, z in [-1, 1]) -> top-down, z in [0, 1]
    +f32 scale[4]  = { 960, -540, 0.5f, 0 };
     f32 offset[4] = { 960,  540, 0.5f, 0 };
     rsxSetViewport(ctx, 0, 0, 1920, 1080, 0, 1, scale, offset);
     rsxBindVertexArrayAttrib(ctx, GCM_VERTEX_ATTRIB_POS, 0,
    @@ -356,106 +412,188 @@ 

    4 · Draw

    rsxDrawVertexArray(ctx, GCM_TYPE_TRIANGLES, 0, 3);
    -

    5 · Present

    -

    In a browser you return from requestAnimationFrame. On a PS3 nothing reaches the TV until you flush the FIFO, fence the RSX, rewind the ring, wait for the last flip and queue the next.

    +

    Stage 5 · Presenting the frame (sync, rewind, flip)

    +

    In WebGL, presentation is invisible—you just return from requestAnimationFrame. On the RSX, nothing reaches your TV until you flush the FIFO, fence the GPU, rewind the ring so it never overflows, wait for the previous flip, and queue the next scanout buffer:

    -
    WebGL
    requestAnimationFrame(loop);
    -
    PS3
    rsxFlushBuffer(ctx);
    +        
    WebGL
    // The browser flushes, waits for
    +// vsync and composites for you.
    +function loop() {
    +  drawTriangle();
    +  requestAnimationFrame(loop);
    +}
    +
    PS3 RSX
    rsxFlushBuffer(ctx);
     rsxFinish(ctx, ++ref);              // the RSX is done
     rsxSetJumpCommand(ctx, begin_off);  // rewind the ring
    +ctx->current = ctx->begin;
     while (gcmGetFlipStatus() != 0) usleep(200);
     gcmResetFlipStatus();
     while (gcmSetFlip(ctx, fb) != 0) usleep(200);
     rsxFlushBuffer(ctx);
     gcmSetWaitFlip(ctx);
    -fb ^= 1;
    +fb ^= 1; // swap front and back
    +

    Once you’ve seen those five stages side by side, nothing about PS3 graphics feels mysterious anymore—and every design decision in our Three.js adapter follows straight from them.

    - 04 -

    From three.js to the RSX

    -

    The showcase starts with import * as THREE from "three". RSXRenderer (platforms/ps3/three-rsx-renderer.ts) walks that scene and talks to the C engine (platforms/ps3/rsx3d.c) through one global object, globalThis.__rsx3d, whose arguments are typed arrays.

    + 03 +

    Bridging vanilla Three.js r187 to the RSX + PocketJS

    +

    Here’s the secret that makes real three@0.187.0 possible on a 2006 console: Three.js’s scene graph, math library, geometry generators, materials, lights and cameras are plain ES-module JavaScript with no DOM dependencies. Only the renderer touches a <canvas>.

    +

    So we didn’t fork Three.js, and we didn’t write a toy “Three-like” clone. The showcase app literally starts with:

    +
    import * as THREE from "three";
    +

    …and our own RSXRenderer (platforms/ps3/three-rsx-renderer.ts) walks the real THREE.Scene and drives a native C engine (platforms/ps3/rsx3d.c) through one thin typed-array bridge, globalThis.__rsx3d:

    - One frame, from the three.js scene to the TV + One frame, from the Three.js scene to the TV
    QuickJS · Cell PPU -
    three.js sceneScene · Mesh · InstancedMesh · Points · lights
    →
    RSXRendererwalk · sort · pack Float32Array
    +
    PocketJSSolid JSX + Tailwind, 3× density
    +
    Three.js r187Scene · Mesh · InstancedMesh · Points · lights
    →
    RSXRendererwalk · sort · pack Float32Array
    +
    PocketJSSolidJS + Tailwind, 3× density
    C host · PSL1GHT -
    __rsx3dtyped arrays, read where they are
    →
    rsx3dGPU memory pools · constants · mirror
    →
    rsx_driverZ24S8 surface · FIFO rewind · flip
    +
    __rsx3dtyped arrays, read where they are
    →
    rsx3dVRAM pools · constants · mirror
    →
    rsx_driverZ24S8 surface · FIFO rewind · flip
    RSX · 1920 × 1080 -
    Pass 1 · 3Dsky · mirror · PBR · points
    →
    Pass 2 · UIover the 3D, no clear
    →
    Front bufferto HDMI, and over TCP :8623
    +
    Pass 1 · 3Dsky · stencil mirror · PBR · points
    →
    Pass 2 · UIalpha-blended over the 3D, no clear
    →
    Front bufferto HDMI, and over TCP :8623
    -
    three.js and PocketJS share the CPU; one surface takes both passes, so there is no offscreen target and no extra full-screen copy.
    +
    Three.js and PocketJS share the CPU; one surface takes both passes, so there is no offscreen target and no extra full-screen copy.
    -

    Scene-wide values once a pass, per-object values per draw

    -

    A fragment constant costs a write into the program and a reload, so the renderer splits uniforms along that line. Values that are the same for the whole scene (the camera position and exposure, the directional light, three point lights, the hemisphere light, fog) are written into the PBR fragment program once a pass. Everything per object (its matrices, colour, emissive, roughness, metalness, UV transform) goes into vertex constants and reaches the fragment unit through interpolators. No fragment program is reloaded per mesh.

    - -

    One call for an InstancedMesh, and what it still costs

    -

    QuickJS has no JIT, and calling into C once per instance with loose numbers would spend the frame on an in-order core. So for an InstancedMesh the renderer passes three.js’s own instanceMatrix.array and instanceColor.array to C in one call; C loads the shared material constants once and loops over the instances on the PPU.

    -

    That keeps JavaScript out of the loop, but the RSX has no hardware instancing: every instance is still a draw with its own constants. With 196 instances, writing those commands takes 28.9 ms of the PPU’s time a frame, and that demo is the slowest, at 16 fps. The Cell has six SPUs doing nothing; this loop is the first thing to move onto them.

    +

    Vanilla means the package is untouched—what we replace is the renderer. What carries over, and what doesn’t yet:

    +
    keeps
    the scene: Mesh, InstancedMesh, Points, Line; standard, physical, Phong, Lambert, basic and normal materials; ambient, hemisphere, directional and point lights; fog
    replaces
    WebGLRenderer, with RSXRenderer and native code
    not yet
    what lives inside Three.js’s own renderer: shadows, ShaderMaterial and TSL, its post-processing
    -

    Two passes into one frame

    -

    rsx_driver.c binds one 1920 × 1080 colour surface with a 24-bit depth and 8-bit stencil buffer and calls the scene first. Pass 1 clears colour, depth and stencil and draws the 3D scene. Pass 2 clears nothing, resets the depth, stencil and cull state, and draws the PocketJS interface over it with alpha blending. PocketJS apps that draw no 3D do not change.

    +

    Design trick #1: a zero-stall uniform split

    +

    Patching fragment microcode stalls the fragment pipeline if you do it per mesh, so we split uniforms strictly along the NV40’s hardware grain:

    + +

    Result: no fragment program reloads per mesh, even across hundreds of draws.

    + +

    Design trick #2: one native call per InstancedMesh

    +

    QuickJS is an interpreter—no V8, no JSC JIT. Calling into C 200 times a frame with loose floats would burn precious cycles on an in-order PowerPC core. So for a THREE.InstancedMesh, RSXRenderer hands Three.js’s own instanceMatrix.array and instanceColor.array to C in one native call:

    +
    native.drawInstanced(geoId, texId, mats, cols, im.count, this.instBuf, flags);
    +

    Inside rsx3d.c, C uploads the shared material constants once, then loops on the 3.2 GHz PPU computing MVP = VP × M and the normal matrix for each instance, uploading its constants and issuing rsxDrawIndexArray back to back—no vertex buffer or texture rebinds.

    +

    The honest cost: the RSX has no hardware instancing, so every instance is still its own draw. With 196 instances, writing those commands takes 28.9 ms of PPU time a frame, and that demo is our slowest at 16 fps. The Cell’s SPUs are the obvious next home for that loop.

    + +

    Design trick #3: 3D and the PocketJS UI in one backbuffer

    +

    Rather than rendering the 3D scene into an offscreen target and blitting it, rsx_driver.c calls the scene right after binding the 1920 × 1080 A8R8G8B8 + Z24S8 surface:

    +
      +
    1. Pass 1 (3D): clear colour, depth and stencil, set the negative-Y viewport so Three.js’s right-handed clip space (+Y up, z from −1 to 1) works unmodified, and draw the scene.
    2. +
    3. Pass 2 (PocketJS UI): skip the colour clear, reset depth, stencil, culling and polygon mode, switch to ui.vp / ui.fp with SRC_ALPHA, ONE_MINUS_SRC_ALPHA, and paint the SolidJS + Tailwind HUD straight over the 3D pixels at crisp 3× density.
    4. +
    +

    No extra full-screen pass, no extra render targets—and existing 2D-only PocketJS apps don’t change at all when no 3D scene is submitted.

    - 05 -

    Shaders for a 2006 GPU

    -

    What makes a 2006 GPU look current is less how many triangles it draws than how materials answer light. Three things do most of that here.

    + 04 +

    Pushing NV40 shaders: PBR, trig-free IBL and stenciled reflections

    +

    On a 2006 console, the trick to making 3D look genuinely modern isn’t brute-forcing polygon counts—it’s material response: specular sheen, Fresnel rims, a studio to reflect, and reflections that ground objects on the floor.

    + +

    Per-pixel PBR + ACES filmic tone mapping in !!FP2.0

    +

    pbr3d.fp shades every one of the 1920 × 1080 pixels with metalness and roughness:

    + +

    Trig-free 360° studio IBL

    +

    Shiny gold and chrome look dead without something to reflect, and NV40 fragment programs hate atan2 and asin. So we generate a 256 × 128 procedural studio panorama (a warm overhead softbox, a cool cyan rim strip, a zenith ring light, a glow along the horizon) and sample it along R = 2(N·V)N − V with a trig-free, continuous 360° projection:

    +
    t = R.x / (|R.x| + |R.z| + 0.0001)
    +u = (R.z < 0) ? (0.75 - 0.25 * t) : (0.25 + 0.25 * t)
    +v = 0.5 - 0.48 * R.y
    +

    At +X (t = +1) both branches meet at u = 0.5; at −X (t = −1) they meet at 0 and 1 under GCM_TEXTURE_REPEAT. Zero trig instructions, zero seams—and the reflection fades with roughness, so mirror chrome reads as liquid metal while matte ceramic stays soft.

    + +

    Real-time planar mirrors with the 8-bit stencil

    +

    That crisp upside-down golden torus knot in the marble floor isn’t screen-space trickery—it’s a classic hardware stencil pass using our Z24S8 buffer:

    +
      +
    1. Mask: draw the floor with colour and depth writes off, stamping stencil = 1.
    2. +
    3. Reflect: where stencil == 1, mirror the scene across y = planeY (scale(1, −1, 1)), mirror the lights’ Y, flip the front-face winding (GCM_FRONTFACE_CW), and draw every reflectable opaque mesh upside down below the floor.
    4. +
    5. Composite: clear only depth (GCM_CLEAR_Z), turn the stencil off, and draw the glossy floor over it with alpha 1 − reflectivity, then the upright scene.
    6. +
    - 06 -

    Five bugs

    -

    The toolchain ran on an Apple-silicon Mac (PSL1GHT in a Docker image, Rust for powerpc64), and every one of these happened on the console. If you write for the RSX, they may save you some days.

    - -

    1 · Every fragment uniform was zero

    -

    The first three.js frame showed a sharp PocketJS overlay over a black screen. Disassembling PSL1GHT’s prebuilt rsxSetFragmentProgramParameter in librsx.a showed the value argument copied into a register that is overwritten before it is used, and a zeroed 16-byte stack buffer passed to rsxInlineTransfer instead: every fragment uniform, exposure and every light included, was uploaded as zeros. Our reading is that GCC 13 optimized the copy away under strict aliasing. A twelve-line replacement that copies with memcpy and calls rsxInlineTransfer itself fixed it.

    -
      48: mr   r28, r6        # r28 = the value
    -  d0: mr   r28, r3        # overwritten before it is read
    - 104: addi r5, r1, 112    # the zeroed stack buffer
    +      05
    +      

    Five wild hardware and toolchain bugs

    +

    Getting pixels onto a 20-year-old console from an Apple-silicon Mac (PSL1GHT in the hldtux/ps3dev Docker image, plus Rust nightly for powerpc64-sony-ps3) was half graphics programming and half detective work. Every one of these happened on real hardware—and if you ever hack on the RSX, this list may save you days.

    + +

    1 · The GCC 13 strict-aliasing ghost in librsx.a

    +

    On the very first Three.js boot, the PocketJS HUD rendered razor-sharp—and the 3D background was pure #000000. We disassembled PSL1GHT’s prebuilt rsxSetFragmentProgramParameter inside librsx.a with ppu-objdump -dr and stared in disbelief:

    +
      18: std  r11, 112(r1)   # zero-init 16 bytes on the stack
    +  20: std  r10, 120(r1)
    +  48: mr   r28, r6        # r28 = the value (never read!)
    +  d0: mr   r28, r3        # overwritten before it is copied
    + 104: addi r5, r1, 112    # passes the zeroed buffer
      110: bl   rsxInlineTransfer
    +

    Every fragment uniform we set was uploading (0, 0, 0, 0) into VRAM—exposure, sky colours, every light intensity. Our best reading: ppu-gcc 13.2.0 optimized the copy away under strict aliasing. Replacing it with our own 12-line memcpy-based set_fp_vec4() over rsxInlineTransfer fixed it immediately.

    + +

    2 · cgcomp -a -v ignores write masks on o[HPOS]

    +

    With fragment uniforms fixed, the sky lit up—and zero 3D triangles appeared. Dumping the compiled vertex microcode of pbr3d.vp found the culprit in two seconds:

    +
    DP4 o[HPOS].x, v[0], c[0];   -> 6041ff80  (mask = XYZW!)
    +DP4 o[HPOS].y, v[0], c[1];   -> 6041ff80  (mask = XYZW!)
    +DP4 o[HPOS].z, v[0], c[2];   -> 6041ff80  (mask = XYZW!)
    +DP4 o[HPOS].w, v[0], c[3];   -> 6041ff80  (mask = XYZW!)
    +

    The vertex assembler ignores component write masks on output registers! All four DP4s wrote the full .xyzw, so every vertex in the universe collapsed to (w, w, w, w). Computing into R0.x … R0.w first and finishing with MOV o[HPOS], R0 produced distinct write masks—and the golden torus knot exploded onto the 1080p screen on the next deploy.

    + +

    3 · cgcomp -a -f drops SUB, ABS and inline literals

    +

    We wrote raw !!FP2.0 for cgcomp -a -f (NVIDIA’s Cg compiler doesn’t run on ARM64 Linux), and inspecting the compiled .fpo binaries turned up four undocumented traps:

    + -

    2 · Every vertex landed on one point

    -

    With uniforms fixed the sky appeared, and no triangle did. The vertex assembler (cgcomp -a -v) ignores write masks on output registers: four DP4 o[HPOS].x/.y/.z/.w each assembled to a full .xyzw write, so every vertex became (w, w, w, w). Computing into R0.x to R0.w and ending with MOV o[HPOS], R0 fixed it.

    - -

    3 · The fragment assembler drops what it does not know

    -

    cgcomp -a -f, used because NVIDIA’s Cg compiler does not run on ARM64 Linux, turned SUB into a 16-byte no-op (write ADD R0, R1, -R2), dropped ABS (write MOV R0, |R1|), read inline literals such as {14.0}.x as R0 (put every number in a named constant), and crashed on a blank line.

    - -

    4 · The camera that never moved

    -

    camera.updateMatrixWorld() does not update camera.matrixWorldInverse; WebGLRenderer.render() does, with matrixWorldInverse.copy(matrixWorld).invert(). A custom renderer that skips that line draws from the origin, looking down −Z, wherever the camera is.

    +

    4 · The classic custom-renderer trap: camera.matrixWorldInverse

    +

    In Three.js, camera.updateMatrixWorld() updates camera.matrixWorld, not camera.matrixWorldInverse. WebGLRenderer.render() is the one that calls:

    +
    camera.matrixWorldInverse.copy(camera.matrixWorld).invert();
    +

    Forget that one line in a custom renderer and your camera stays stuck at the origin looking down −Z, no matter where you orbit it.

    -

    5 · Off the end of the ring

    -

    The instanced demo with 400 instances locked the RSX on its first frame. Each instance writes about 58 words (its constants and a draw), and 400 of them are about 92 KB, past the end of the FIFO segment. Two fixes: the driver rewinds the ring after every frame, and rsx3d.c checks for space before a batch and rewinds in the middle of a frame when it must. The demo also went to 196 instances (14 × 14), and the point lights’ POW became repeated squaring, which freed three registers in the PBR program.

    +

    5 · The FIFO wall, and tuning for the NV40

    +

    Switching to the instanced demo—then 400 instances in one InstancedMesh—froze the RSX on frame one. Why? Each instance emits about 58 FIFO words (a constant-block load of 12 vec4s plus a draw), so 400 × 58 = 23,200 words, about 92 KB, blew straight past the end of PSL1GHT’s command segment mid-frame. We fixed it on both ends:

    +
    -
    - 07 -

    What it measured

    -

    Each frame below was read at 1920 × 1080 from the RSX’s front buffer over the DevShell, a TCP service on port 8623 that also reloads the app’s bundle in place and injects controller input, so we never went back to the console’s menu while working.

    +
    + 06 +

    Live 1080p results on real PS3 hardware

    +

    Every frame below was captured natively at 1920 × 1080 from the RSX front buffer over our closed-loop DevShell on TCP :8623—which also hot-reloads app bundles in place without ever exiting to the XMB, and injects DualShock 3 input from the terminal.

    -
    The showroom: a gold torus knot over a mirrored floor
    Showroom 25,990 triangles · 26 draws · planar mirror · 20 fps
    -
    The instanced wave: 196 metallic pillars in a grid
    Instanced wave 196 instances · 199 draws · 28.9 ms to write them · 16 fps
    -
    A planet with rings in front of a spiral galaxy of 2,400 points
    Galaxy 5,678 triangles · 2,400 point sprites · 7 draws · 30 fps
    -
    Twenty spheres from smooth to rough and from dielectric to metal
    Material grid 58,886 triangles · 43 draws · mirror · 26 fps
    +
    The chrome and gold PBR showroom: a gold torus knot over a mirrored floor
    Chrome & gold PBR showroom 25,990 triangles · 26 draws · stencil mirror · 20 fps
    +
    The instanced kinetic wave: 196 metallic pillars in a grid
    Instanced kinetic wave 196 InstancedMesh pillars · per-instance colour · LineLoop · 16 fps
    +
    A ringed planet in front of a spiral galaxy of 2,400 points
    Exoplanet & 2,400-star galaxy DataTexture planet and rings · point sprites · 30 fps
    +
    Twenty spheres from smooth to rough and from dielectric to metal
    PBR material matrix 58,886 triangles · 5 × 4 roughness × metalness · mirror · 26 fps
    -

    None of them reaches 60. In three of the four, writing the 3D commands takes 0.1 ms, so most of the frame goes somewhere we have not measured yet: QuickJS walking the scene on the PPU, the RSX shading two million pixels of PBR (twice, where there is a mirror), or waiting for vsync. That profile is the next piece of work, and then the SPUs.

    -

    With a DualShock 3: L1 and R1 change the scene, the sticks orbit and zoom, △ shows wireframe, ○ turns the mirror off and on, □ stops the orbit, SELECT hides the overlay.

    +

    With a DualShock 3 in hand: L1 / R1 switch scenes, the sticks orbit and zoom, △ toggles hardware wireframe, ○ toggles the mirror, □ pauses the orbit, and SELECT hides the HUD for a clean full-screen 1080p view.

    +

    None of these hits 60 fps yet. In three of the four, writing the 3D commands takes about 0.1 ms, so most of each frame goes somewhere we haven’t measured yet: QuickJS walking the scene on the PPU, the RSX shading two million PBR pixels (twice where there’s a mirror), or waiting on vsync. Profiling that is next.

    +

    And the work hasn’t stopped at these captures: the Cell’s six SPUs now run marching cubes and particles, and a second app flies through ThreeRT’s own Bistro and Zero-Day—baked offline into a PS3 scene format, rendered at 720p and scaled to 1080p—at 29–30 fps. That code is in pocket-nexus/pocketjs#786.

    - 08 -

    What it means for ThreeRT

    -

    ThreeRT is a native runtime for three.js: no browser between your scene and the GPU. How much of three.js stays depends on the machine. On macOS and Linux, webgpu keeps all of it, three.js and its own WebGPURenderer, and replaces only the browser: a 9.9 MB app where Electron takes 445 MB. On GPUs with ray-tracing hardware, path replaces the renderer with a path tracer at 60 fps. The PS3 is the third case. It has no WebGPU and no JIT, so three.js keeps its scene graph and a native renderer draws it.

    -

    The PS3 port is experimental, and it is built in PocketJS (platforms/ps3), not by ThreeRT’s tools. What it shows is how little a three.js scene needs from a machine once the browser is gone. How the three ways differ is in RENDERING-METHODS.md.

    + 07 +

    Why this matters for ThreeRT: RT means runtime

    +

    At first glance, running Three.js r187 on a 2006 PlayStation 3 sounds like a fun weekend stunt. In the context of ThreeRT, it is the boundary proof of a much bigger idea.

    +

    ThreeRT started as a hardware path tracer and has grown into a native runtime for Three.js—no browser between your scene and the GPU:

    + +

    The PS3 completes the spectrum:

    +
    + + + + + + + +
    TierHow it runsHardware & APIWhat it proves
    Flagship RTpathApple silicon, RTX, RDNA2+ (wgpu ray queries)real-time path tracing with zero baking
    Modern nativewebgpuMetal on macOS, Vulkan on Linux (wgpu + JavaScriptCore + PocketJS)sub-10 MB native apps and OS surfaces, with the same pixels as Chrome
    Console / legacy GPUthe PS3 port PocketJS, experimental2006 PlayStation 3: NV40-class RSX, raw FIFO, NV40 assembly, QuickJSno browser, no Electron, no WebGPU, no Vulkan, no JIT—still vanilla Three.js r187
    +
    +

    If vanilla three@0.187.0 can drive real-time PBR, studio IBL and hardware-stenciled mirror reflections on a 20-year-old PlayStation 3 at 1080p, there is no reason Three.js has to stay trapped inside a browser tab ever again.

    +

    The PS3 port is experimental, needs a console with custom firmware, and is built in PocketJS (platforms/ps3). How the three ways of running differ: RENDERING-METHODS.md.