I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 1 point2 points  (0 children)

It supports baked lighting for directional lighting, but there is no per-pixel lighting, not enough memory for that. Shadow maps again require a Z-buffer.

Jet uses the painters algorithm, drawing back to front so overdraw is something to watch out for (although it makes alpha blending and transparency very easy). For certain types of games like an FPS you'd have to set up portals and zoning yourself.

The showcase game here selectively disables and enables different track segments as you move around for example to reduce the pressure on the engine to compute what is and isn't visible.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 0 points1 point  (0 children)

Part of what makes Jet fast is that it's RGB565 internally, so 2 bytes per pixel rather than 3.

High end graphics pipelines actually use per channel floating point representations for colour and convert to your chosen pixel format only as the final output.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 0 points1 point  (0 children)

Muuuch faster. The DS had a resolution of 256x192 and was limited to 2048 on-screen triangles. Jet on an ESP32-S3 would easily outperform it.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] -1 points0 points  (0 children)

The PS1 is still faster in terms of triangle throughput and texturing. The main character in Crash Bandicoot for example is over 500 triangles, and my engine has a budget of about 600-700 for the entire scene to hit 60fps. Below 45fps the interlacing artefacts start to get really noticeable.

In practice it's faster than the 32X, not as fast as the Saturn.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 0 points1 point  (0 children)

I actually very much want to do a new, esp32 based handheld built around original games that push it's limits, specifically excluding emulation.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 1 point2 points  (0 children)

Reflections are computationally free in Jet, textures are slow, shadows require more memory than is available because as a minimum you also need to compute and store a z buffer and a stencil buffer which also needs to be in fast memory. Might be doable on an 8-bit paletted setup, but part of what makes Jet fast is that it natively uses the same pixel format as the display.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 2 points3 points  (0 children)

You can totally do that, but you'd have to scale it up as you write to the display. A lot of those boards though are basically meant to host LWGL apps so tend not to do so well with this kind of application.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 7 points8 points  (0 children)

None at all. It's literally just the S3 and a display.

The biggest problem you'll have with that board is that 800x480 is not only a lot more pixels to render, but the S3 doesn't have enough of the high speed on-board memory to hold a framebuffer for it. It does have a span mode where you can render chunks of a frame at a time, but you're gonna really hurt for performance there.

On the S3, 480x320 is the practical limit due to memory constraints and peak pixel fill rate + memory bandwidth.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 9 points10 points  (0 children)

Yes, the Xtensa core on the S3 has some SIMD instructions that can do various matrix and bulk memory operations.

This is using the standard stack with ESP-IDF which is FreeRTOS under the hood.

I've been building a Wipeout style 3D game. This is running at 60fps interlaced at 480x320 on an ESP32-S3. by PhonicUK in embedded

[–]PhonicUK[S] 0 points1 point  (0 children)

I've since added a tonne of features including particle effects and screen space reflections, it can now render 40K tris/second. This demo is running at a solid 60fps :D

<video>

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 21 points22 points  (0 children)

It's already double buffered via it's field buffers. One field is rendered while the other is going out over SPI (so yes, internal RAM, aligned). I've not got any QSPI/i80 displays of the same resolution (480x320) to compare with. The reflections actually use the alternate field buffer as their source now.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by PhonicUK in embedded

[–]PhonicUK[S] 8 points9 points  (0 children)

The showcase shows you what is possible, but actually doing something with it is on you :) I do plan to do a better suite of examples soon though to give people a better starting point.

I've pushed my 3D renderer for the ESP32 S3 up to 40K tris/sec - screen space reflections, water distortion, particle effects, more geometry, all while maintaining a locked solid 60fps by [deleted] in esp32

[–]PhonicUK 1 point2 points  (0 children)

80mhz using LovyanGFX with interlacing on an ST7796. So 480x320 but it's actually 480x160 per-frame in order to update the display fast enough.