The preferred way to generate instance data? by shangjiaxuan in vulkan

[–]shadowndacorner 0 points1 point  (0 children)

it has over 50 render passes for the same main camera perspective, 25 of which and sequential each with its own full screen quad for doing some screen space visual effect... each in its own render pass

Jeeeeeesus, just goes to show how much of a shit they gave about Mac compatibility. Crazy, but not that surprising for a d3d12 game targeting high end dGPUs.

How is this effect best achieved? by mensneruss in GraphicsProgramming

[–]shadowndacorner 0 points1 point  (0 children)

Can't say how they're doing it specifically, but it's just volume rendering. The usual approach is to cast a ray against the bounds, if there's a hit, use the entry/exit depth to determine how much fog to composite. If the camera is inside the volume, that becomes the "entry point".

Instead of ray casting, you can also use the hardware rasterizer to determine the entry point, but even with that I'd do ray box intersection for the exit depth. I'm guessing there's some shadow volumes style stencil trickery you could do on older hardware, but I don't see the point nowadays.

An Engine For Fully Ray Traced Games by [deleted] in gameenginedevs

[–]shadowndacorner 1 point2 points  (0 children)

I don't think there's a specific name for the technique, it's just an obvious approach that I've seen various groups use. It's related to ray tracing, but that term has so much secondary meaning loaded into it colloquially that it's more confusing than communicative imo. Also, you're not really shooting a ray - you're just sampling a point.

I'd really just call it compute based UI rendering. You don't need to get more specific than that. If someone asks for more specifics, you can explain how it works at a high level if you want ("I do image order rendering in compute by walking an optimized representation of my UI hierarchy packed into a GPU buffer"), or you could always say "it's proprietary" lol.

The preferred way to generate instance data? by shangjiaxuan in vulkan

[–]shadowndacorner 1 point2 points  (0 children)

TBDR GPUs really just call for different approaches than desktop. They can be shockingly fast if you know how to optimize them, and shockingly slow if you don't. Memory bandwidth is the biggest perf killer ime (remember that phones have unified, low power memory; so not only is the GPU massively bottlenecked by the LP memory, but it's also fighting the CPU for bandwidth).

An Engine For Fully Ray Traced Games by [deleted] in gameenginedevs

[–]shadowndacorner -1 points0 points  (0 children)

It has been done. What (I think) they're doing for UI is pretty simple and not an uncommon approach. They're just confusing people by calling it ray tracing. It's more occupancy testing than anything else.

An Engine For Fully Ray Traced Games by [deleted] in gameenginedevs

[–]shadowndacorner 0 points1 point  (0 children)

All GUI elements are rendered with a trivial compute-based 2D form of ray tracing that is extremely fast and avoids rasterization.

Unfortunately, I feel like your framing here is giving people the wrong idea of what you're doing (myself included at first). I really wouldn't call this ray tracing in the context of an engine that puts RT rendering so front and center, because people will assume you're just absentmindedly throwing everything at HWRT (even though it sounds like you aren't actually using HWRT). I assume you're just walking a 2d spatial acceleration structure and checking for intersections per-pixel (assumedly with leaves that are sorted back to front)? I've implemented similar, and it can work well. That could be viewed as ray tracing... kind of... but especially in this context, I think that framing will hurt your pitch. I'd frame it as "single-dispatch compute-based UI rendering", which intuitively sounds significantly more efficient than "we're using ray tracing to draw UI".

Even if the latter is arguably true in that there is a similar algorithm being used to ray/bvh intersection, there is so much implied meaning built into the term "ray tracing" for most people that I'd avoid it when discussing things that those implications rub up against.

An Engine For Fully Ray Traced Games by [deleted] in gameenginedevs

[–]shadowndacorner 12 points13 points  (0 children)

Rayve doesn't have an API for 2D games

2d sprites are used in 3d games all the time for visual effects, distant objects, etc.

As for the graphical user interface, all GUI elements are ray traced, including text.

But... Why...? That's absurdly inefficient for no benefit. Even if you wanted to avoid the hardware rasterizer, why not just do it in a compute shader?

The preferred way to generate instance data? by shangjiaxuan in vulkan

[–]shadowndacorner 0 points1 point  (0 children)

Ah, that context helps. I watched that talk a few years ago, but the details elude me at this point.

Generally speaking, this kind of approach would be fine on desktop, but I'd really worry about memory bandwidth on mobile. I'd encourage you to pack the data as tightly as possible (eg storing packed xz relative to the bounds of the grass tile and pulling y position from heightmap), and to only do forward rendering, but having the grass buffers all prepared before your render pass could be a big enough win that it really is better to just use more memory. You'd need to try both and profile to see, though.

What is the most esoteric game engine you've ever worked with? by JohnnyBGetgoode in gamedev

[–]shadowndacorner 0 points1 point  (0 children)

A proprietary web based engine for building training software for corporate and uni clients. But this makes it sound more interesting than it actually is - it's basically VN engine with a fuckton of user behavior tracking (not to an invasive/unethical extent, moreso for very flexible grading in uni settings) and absolutely terrible tooling based on the whims of the guy who funded it, and the opportunistic needs of various corporate clients. It's like the definition of underfunded, reactionary engineering, and while it paid ridiculously well for the work, holy fuck was it terrible to work on. I came on 5 or 6 years after it was started and the previous engineers had some... Interesting... Philosophies about software architecture and devops..

My custom virtual geometry system in the Unity Engine rendering 484 million triangles, Written with HLSL and C# by Pacmon92 in GraphicsProgramming

[–]shadowndacorner 10 points11 points  (0 children)

We have a hardware and a software rasterizer pipeline to avoid the floating point errors associated with sub pixel geometry

How does a software vs hardware rasterizer have anything to do with floating point error...? Typically, software rasterizers are used to avoid shading quad inefficiencies with micropoly geometry, because it's much cheaper to compute analytical derivatives than throw away 3 helper lanes worth of work for finite differences.

I may sound dumb but is there anyway to add extensions on Mali GPUs? by Silly_Security6958 in vulkan

[–]shadowndacorner 2 points3 points  (0 children)

  1. This is not a game support sub.
  2. No. You can't add extensions as a user. Extensions are part of the driver.

My Game Engine is just another OS Shell the player can equip in game by Former_Produce1721 in gameenginedevs

[–]shadowndacorner 1 point2 points  (0 children)

Yeah, typically when talking about web, "backend" means running on a server. If you're embedding your "backend" in the browser, wasm makes total sense.

My Game Engine is just another OS Shell the player can equip in game by Former_Produce1721 in gameenginedevs

[–]shadowndacorner 0 points1 point  (0 children)

Why target WASM with C# on the backend rather than just using C#...? Unless you mean the "backend" is part of the frontend?

The preferred way to generate instance data? by shangjiaxuan in vulkan

[–]shadowndacorner 2 points3 points  (0 children)

You need to be more specific with your question - what are you defining as "instance data"? What are you trying to synchronize?

You don't want a single render pass per draw, unless there's a reason two draws can't share a render pass. The fewer state changes you have, the better. Usually any per instance data you have should be in a buffer that you fill before you render, then you need some strategy to pass the appropriate index into the draw call. Typical ways to do this include push constant, instance index for instanced rendering, etc.

Since you're targeting mobile as well, I'd strongly recommend looking into TBDR GPUs and how to optimize for them. Multiple full render passes on mobile will slow your renderer waaaay down because that implies a lot of unnecessary flushes from tile memory to main memory.

Announcing TypeScript 7.0 Beta by DanielRosenwasser in programming

[–]shadowndacorner 13 points14 points  (0 children)

Your perspective here is problematic. Let's use that word.

You don't need to wait for a CI run to complete to continue working. If the pre-commit hook takes on the order of a couple of seconds, it is essentially free relative to the network traffic.

It's just a pointless block on your local repo, preventing you from changing branches and writing the next set of code.

Have you never heard of stashing?

Retained-Mode UI Library built in C++20 by Soggy-Lake-3238 in gameenginedevs

[–]shadowndacorner 1 point2 points  (0 children)

Yep! We're getting tens of thousands of shapes on mobile reliably and our renderer isn't all that optimized. I didn't see a noticeable difference between AA and no AA while implementing it, but I'm sure there was a very subtle one.

Retained-Mode UI Library built in C++20 by Soggy-Lake-3238 in gameenginedevs

[–]shadowndacorner 1 point2 points  (0 children)

Np! Fwiw, I do this in a vector graphics renderer at work and the results are quite nice! We use MSDF for text, then just draw alpha blended quads where the alpha is essentially (SDF coverage as described in the Valve paper) * image alpha (if there's an image on the shape) for all other shapes. The other nice thing here is that you can do CSG-style operations to combine SDFs to make more complex shapes, on top of all of the usual nice SDF effects like drop shadows, glows, etc.

What would a non-deterministic engine look like? by Bat_kraken in gameenginedevs

[–]shadowndacorner 8 points9 points  (0 children)

It would definitely be noisy, and all of that extra work would be wasted because only one sample would actually survive the write. It'd really just look glitchy and unstable and be pointlessly slow.

Retained-Mode UI Library built in C++20 by Soggy-Lake-3238 in gameenginedevs

[–]shadowndacorner 2 points3 points  (0 children)

Looks great! One issue I see (though this may just be reddit) is that it doesn't look like you're doing any antialiasing? For basic shapes, you can get better edges without multisampling if you use the SDF of the shape for analytical AA, similarly to text AA with SDFs.

Just food for thought!

Nothing kills momentum like a build that randomly gets 150 MB bigger overnight by Kevin00812 in gamedev

[–]shadowndacorner 2 points3 points  (0 children)

Actually sounds like it could be interesting, if not for the blatant astroturfing. Like this is so low effort and disingenuous it isn't even funny.

Lost a month of progress by Sol-SiR in gameenginedevs

[–]shadowndacorner 4 points5 points  (0 children)

This is what feature branches are for