跳过导航
I've been doing research on the Dreamcast's PVR and found a solution to introduce subsurface…
0:00 / 2:58

I've been doing research on the Dreamcast's PVR and found a solution to introduce subsurface…

Jilted Valkyrie

@JiltedValkyrie4433 位关注者

在 X 上查看
514 个赞下载原帖

25,548 次观看

I've been doing research on the Dreamcast's PVR and found a solution to introduce subsurface scattering--or at least something that looks exactly like it. Here is a real hardware capture on Sega Dreamcast. Despite being a fixed-function GPU, there is a LOT more you can do with it than you think. I've worked in visual effects for film and TV for almost 9 years now, so when I started thinking of the PowerVR chip as a supercharged compositing and layering suite (not unlike a living Photoshop), I started to get some real workhorse out of it. Every wave, colour and reflection is computed on the console: rolling swells that move the actual geometry, fine ripples catching the light, a sky gradient fading into horizon fog, the sun reflected across the water, and wave crests that shadow the water behind them. How it works: The SH4 CPU builds the water every frame. Four sine swells, each travelling in its own direction, displace the water mesh. Three shorter waves only bend the surface normals, so you get fine ripple detail without adding triangles. Slopes come straight from the wave formulas, so neighbouring heights never need recalculating. Mesh rows are spaced evenly in screen depth rather than world distance, which puts detail where you can actually see it. Far away, ripples too small for the mesh to resolve fade out instead of shimmering. A small heightfield pass then checks which crests block the low sun and shades the water behind them. All of the maths goes through SH4ZAM, a maths library built around the SH-4's vector and fast-reciprocal instructions built by Falco Girgis. I also had contributed by having Fable 5.2 Max Ultracode ("Lord SH4ZAM" as I call him) create additional SH4ZAM routines in a layered approach to find approaches to maths that Falco hasn't implemented yet: 1. shz_dce_project_vertices: a fast fused vertex routine where every row of the water's roughly 11,700 vertices goes through, with transform and screen projection in one pass. 2. shz_dce_vec3_normalize_safe: turns the view and sky directions into unit length. The PowerVR2 GPU handles the look. The whole upper sky lives in one 512×512 texture, and each vertex's bent normal decides where the water reads from it. That means the sun's reflection streak forms out of the waves themselves rather than being painted on. A Fresnel term sets how much the water reflects versus shows its own colour: the PVR multiplies the sky texture by vertex colour for the reflection, then adds its "offset" colour for the deep-water tint and the light glowing through thin crests. The PVR's built-in fog table blends far water into the exact horizon colour between 55 m and 520 m, at no cost. The sky gradient is dithered when it's generated, so 16-bit colour doesn't band. Where this could go: Ocean and lake surfaces for racing, sailing, flight or island games, and big outdoor horizons, all at almost no disc space since the scene is generated. The crest-shadow trick works for terrain too, with hills shadowing valleys from a low sun. Building reflections from bent normals is a cheap way to fake environment reflections on fixed-function hardware.... but you will need to scope down the effects. Obviously, you would not run the water as heavy as I did (turn off SH4DOW-DC or limit its range), but I am pretty pleased with this result. I pushed this to the limit for demonstration purposes to show what our little white console can do.

43 条评论

评论来自 X (Twitter) 上的原帖

  • John Linneman 的头像

    @dark1x

    Wow that’s incredible

    14 个赞

  • Hobo | madebyhobo 🇦🇺 的头像

    @HoebenChris

    Getting fake subsurface scattering out of a fixed function GPU from 1998 is the kind of thing that makes modern engines look lazy

    14 个赞

  • Jilted Valkyrie 的头像

    @JiltedValkyrie

    If you think about it, it's all technically "fake". Like film, CG isn't even real like the actors. The only result that matters is what you can see with your eyes regardless of the technique used to achieve the look.

  • It's Still Thinking 的头像

    @ItsStillThinkin

    You just created the best water effect ever seen on Dreamcast by a large margin.

    13 个赞

  • Sky.Driftr 的头像

    @Sky_Driftr

    Bro this is ps360 levels of graphics.

    9 个赞

  • Jilted Valkyrie 的头像

    @JiltedValkyrie

    Fun fact: a fixed-function GPU can perform the exact same task as a regular GPU far, far more efficiently. Programmable shaders are slow.

    2 个赞

  • Jordan Weaver 的头像

    @Pcuser44

    This is the kind of stuff i was trying to explain in my other post when buddy was all over me about it. The dreamcast isn’t some PC clone like an XBOX. Its quite possibly the last non PC clone, when Console hardware did its own thing. Like back when only NES could properly do hardware scrolling. This is another example of how the Dreamcasts unique hardware allows it to do things that punch far above its 200Mhz CPU.

    7 个赞

  • Jilted Valkyrie 的头像

    @JiltedValkyrie

    The Gearbox Halo port to PC used fixed-function rendering. There's really no reason they couldn't have done similar things to what I have been doing. I imagine at that point they didn't care about software rendering since programmable shaders were taking over; and if they had a hard deadline to port.

    1 个赞

  • Blace (Captain N) 的头像

    @CaptainN_DK

    This looks astonishing!

    5 个赞

  • WuBu ⪋ WaefreBeorn 🇺🇸 👑 的头像

    @waefrebeorn

    thank you so much for your graphics abstraction back to basics helps me speed up

    4 个赞

  • Fops 的头像

    @leviakatsuki

    I did read the whole post explanation, but my reaction to it still stands BROTHER, HOW This is insane

    4 个赞

  • Missy the Persian Cat 的头像

    @MissyTheNeko

    Imagine if the Dreamcast had been allowed to finished it's planned life instead of being cut short! Glad development on it has been picking up

    3 个赞

  • Legend Games EN 的头像

    @LegendGames_EN

    Soft shadows and bloom on a 200 MHz SH-4 is a lot of ocean for that hardware. The horizon fog is what sells it.

    3 个赞

  • Ausama Thaeer 🍥 的头像

    @ausama47

    Soulcalibur with that ... can be something 😁

    3 个赞

  • Jilted Valkyrie 的头像

    @JiltedValkyrie

    I think SoulCalibur running at 60fps is a lot more important BUT I think since the draw distance isn't far maybe there could be a paired back version of it in place.

    2 个赞

  • Ed Venture 的头像

    @Edmitsu

    Dreamcast was truly ahead of its time. Wow.

    3 个赞

  • Ian B is Here 的头像

    @IanBisHere

    I am not tech savvy but I was actually understanding a lot of what you said. Great breakdown on how the dreamcast hardware works 👍.

    3 个赞

  • Kevin Bhall 的头像

    @bloopledebleep1

    I'll just interpret all that as rtx on ! Hell yeah!

    2 个赞

  • OneHundredYen 的头像

    @racer4200

    Wild

    2 个赞

  • Cledson Lopes 的头像

    @cledsonCledman

    Fantastic content! I'm in love with it! Thank you for sharing with us! Greettings from Brazil!

    2 个赞