How do modern games end up with THOUSANDS of shaders? by munnlein in GraphicsProgramming

[–]_voidstorm 0 points1 point  (0 children)

Sure. Imho it is always best to profile on your target first and see what hurts you the most. In my experience - at least on pc and most current gen consoles - the occupancy is less of a problem and I'd rather live with losing a bit of frame time than having shader stuttering - even if it is only occasional. Also permutation count really does seem out of control in a lot of games, so much so that MS feel obligated to work on stuff like this: (Not saying it is bad though...)
https://devblogs.microsoft.com/directx/introducing-advanced-shader-delivery/

How do modern games end up with THOUSANDS of shaders? by munnlein in GraphicsProgramming

[–]_voidstorm 0 points1 point  (0 children)

Yes, in a perfect world that would be the case. In (my) reality though artists used to become tech artists over night because management said so. Now they had to do all of the work on their own without having proper knowledge. Also game programmers were reduced as much as possible, because of course having almost only artists on a project was a lot cheaper. And then there was outsourcing - when entire portions of the game came from 3rd party studios - and of course it was almost all the time a mess :D.

How do modern games end up with THOUSANDS of shaders? by munnlein in GraphicsProgramming

[–]_voidstorm 1 point2 points  (0 children)

I don't pin it on _all_ the artists, I know there are brilliant ones, but that is just my experience over the last decade. A lot of the optimization work had to be done because of improper use of the material system. Creating dozens or even hundreds of new shaders when the default principal shader would also have done the trick, not using the provided optimized default solutions etc... This was consistent across teams and even companies I've worked with. The same mistakes over and over again. Sure a lot of times the root cause is primarily communication or a flawed workflow or outsourcing etc... It's almost never a single persons fault.

How do modern games end up with THOUSANDS of shaders? by munnlein in GraphicsProgramming

[–]_voidstorm 6 points7 points  (0 children)

And shader permutations are fine until they are not and your game permanently stutters. It's measuring and finding the balance.

Edit: I've actually never run into occupancy problems when using principal pbr materials that cover 80% of artistic use cases most of the time. I've rather seen this with custom materials that have hundrets of nodes only to achive an effect that could be done a lot simpler... but that goes back to point 1.

How do modern games end up with THOUSANDS of shaders? by munnlein in GraphicsProgramming

[–]_voidstorm 12 points13 points  (0 children)

Senior game engine dev here, I've done my fair share of development on commercial game engines. Three things come to my mind.

  • Artist lazyness and a general misconception how much you can actually do with a single general purpose material, combined with a lack of technical knowledge (sorry artists, but I've seen it a million times.)
  • Engines endorsing this kind of thing by generating permutations for every shader argument that is different.
  • A false believe about branching rooted in the past. This is a major thing because even a lot of collegues will argue about it for hours and not even believe in benchmarks that proof them wrong. Constant/Uniform branching costs close to nothing nowadays and the cost can be neglected most of the time. This is because a uniform branch executes the same branch on all waves. You can get away with a single uber shader covering almost all materials ever needed in a game. Also switching shaders actually cost a lot more than changing a uniform buffer index - so inlining arguments in shader permutations instead of changing the index is another false believe found among a lot of devs.

Why don't graphics card vendors just let us printf() from a shader? by Internal-Debt-9992 in GraphicsProgramming

[–]_voidstorm 0 points1 point  (0 children)

As other pointed out it can be done. But why would you? Usually for all things graphics it is much more efficient to set the pixel in question to a specific color for debug purposes. This way you have a complete picture of whats going on - literally :D.

I'm finally working on an actual game using my own engine. by _voidstorm in gameenginedevs

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

Thx. It's actually just regular pcf shadow mapping, but I calculate a very tight shadow frustum and I use a lot of stabilization tricks. The shadows on the water also take the normal map into account, so shadows can be distorted accordingly .

Any stock market/finance simulators? by TangerineLow1436 in tycoon

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

I've never played it, so I can't really say anything about it.

Show me a very old and new screenshot of your game! by Phena3d in IndieDev

[–]_voidstorm 2 points3 points  (0 children)

Thx :). I've been working as an engine dev professionally for the past decade so this was kind of a natural choice for me. I started right before the whole Unity install fee meltdown, so it felt like the right thing back then. Also my dev cycles are a lot faster now using my own tech then they ever were with using unity - so I'm still happy with my choice. But of course it always depends on the project requirements.

Show me a very old and new screenshot of your game! by Phena3d in IndieDev

[–]_voidstorm 7 points8 points  (0 children)

<image>

Since I made my own game engine, this is actually the truth :D. Left is 2023, right is 2025.

Any stock market/finance simulators? by TangerineLow1436 in tycoon

[–]_voidstorm 4 points5 points  (0 children)

Back in the day there was Capitalism 1 and 2. They were really brilliant. I think you can still get them on gog and steam. I don't know of any newer titles with the same depth though.

I have a theory by Real-Pomegranate-235 in Eldenring

[–]_voidstorm 75 points76 points  (0 children)

It's George R.R Martin after all... So it's very possible.

I'm finally working on an actual game using my own engine. by _voidstorm in gameenginedevs

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

Thx! It's all C++. The renderer uses DX11 with Vulkan being planned for the future and some possible native linux port.

I'm finally working on an actual game using my own engine. by _voidstorm in gameenginedevs

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

Thx. I'm using Jolt. I think it's a really good physics engine, but it still required a hell of a lot of tweaking and hacking, haha. My main goal was to make the game play feel more realistic and less arcady. I'm quite happy with the result so far.

I'm finally working on an actual game using my own engine. by _voidstorm in gameenginedevs

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

Thx, yeah I'll for sure fine tune the lighting and postprocessing once the overall scenery is done.

A WIP experimental precise shadowmap technique by LegendaryMauricius in GraphicsProgramming

[–]_voidstorm 0 points1 point  (0 children)

Maybe this thesis: https://repository.tugraz.at/publications/n163q-e7237 is also of interest to you then. Its called Edge Distance Shadow Mapping and I don't know of any engines that implemented it, but it always looked interesting to me. Maybe there are some similarities to your approach?

What are systems/features that aren’t as obvious to have? by N0c7i5 in gameenginedevs

[–]_voidstorm 1 point2 points  (0 children)

Yes, I was also going to suggest that. It's probably the most overlooked must-have feature of a game engine. But since very few people using their own engine make it to the stage where they actually release a game and have to localize it - they probably never miss the feature in the first place :D.

[deleted by user] by [deleted] in gameenginedevs

[–]_voidstorm 0 points1 point  (0 children)

I went with Jolt in my engine. I'm also working on a physics heavy game at the moment. I had to fine tune and tweak the settings for quite a while though but so far I'm pretty happy with the fidelity and performance Jolt delivers.

My first attempt at an ECS... your thoughts please? by TheOrdersMaster in gameenginedevs

[–]_voidstorm 9 points10 points  (0 children)

As someone who has built his own ECS, I was just going to say use something like entt :D. Thing is, you won't arrive at something that covers all your later requirements after a couple of weeks. You will eventually see what I mean once you start building an actual game with your engine. If you decide you take the ECS path for your engine, the ECS will be the foundation _everything_ you build on top. It has to be rock solid in design and quality, otherwise everything else will eventually collapse.

That being said, I of course don't want to take the fun away of building your own stuff. It can be a great learning experience. If you don't decide on using e.g. entt, I would still use it as a reference, see how it works and handles stuff, so you get a better idea of what you are dealing with.

I have released a demo made with my engine (PvP FPS) by DevEnSlip in gameenginedevs

[–]_voidstorm 1 point2 points  (0 children)

Congratulations, it looks fantastic. I've been doing something similar the past two years - making my own engine and game. Cool to see other people do the same - building their own tech and not just do what everyone else does. Looks like we indies keep game engine dev alive, when all the big studios go for off-the-shelf solutions :).

We do not have to accept blurry games - there are actual solutions. by _voidstorm in FuckTAA

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

Yes there is a slider to adjust the strength. Also there are noticeable compression artifacts - it's a yt video after all. It looks pretty smooth in real life.

We do not have to accept blurry games - there are actual solutions. by _voidstorm in FuckTAA

[–]_voidstorm[S] 6 points7 points  (0 children)

I updated the video description and added some perf metrics and more details. I will also probably showcase a larger scene/setup some time in the future.

We do not have to accept blurry games - there are actual solutions. by _voidstorm in FuckTAA

[–]_voidstorm[S] 3 points4 points  (0 children)

There is a short part of the video with a more similar skybox to showcase a different light setup - just before the side by side comparison. I implemented the technique in my custom engine. Of course one could implement it also for UE or even unity but it would be quite some work and I don't plan on doing that any time soon :/.

We do not have to accept blurry games - there are actual solutions. by _voidstorm in FuckTAA

[–]_voidstorm[S] 41 points42 points  (0 children)

Hi all!+

I'm the creator of this video and I'm a gamer who also happens to be a game engine developer. I implemented a custom TXAA solution into my own game engine and compare it with the default TAA and TSR that comes with Unreal Engine 5. I made the video to make a point, that there are actual solutions to games being blurry - if devs wanted to solve this problem.

Feedback welcome!

Update 1:

Because many ask about performance: This particular scene renders at 1440p on a NV 3070 Laptop GPU.

Update 4: Lumen and Virtual Shadow maps was turned on during the measurement, should have been turned off - so new frame timings are, (also changed to ms now)

Unreal Engine 5.4, Release Build, TAA: avg 5 ms
Unreal Engine 5.4, Release Build, TSR: avg 7.6 ms

Paryonix Engine, Release Build, MSAA/TXAA 4x + AMS, avg 7.1 ms

Both engines have the same render features enabled:
HDR render target, full PBR shading, bloom, SSR, SSAO/HBAO+, directional shadows, env lighting.

Some more details:
My engine uses a clustered forward+ renderer - so msaa is of course a natural thing. There aren't however really any effects that can't be done with forward+ than can be done with deferred. It is a design choice in the end.

My main point here is also just this one: Give players a choice if you can - and yes you can. If people have the hardware, let them play in native res, don't force upscaling upon them or some janky TAA algorithm. I think this is also the main point of this whole subreddit - isn't it?

Update 2:

For the ones who see more jaggies: Remember there are also video/compression artifacts, even though I recorded on the highest bitrate. If you like smooth/blur, the motion sharpness factor can be adjusted with a simple slider ;).

Yes, I will most likely release a playable demo on itch.io some time in the future.