smugdev

1.3K posts

smugdev banner
smugdev

smugdev

@smug_dev

Professional #gamedev by day, Aspiring #indiedev by night. Programmer for @UnWarGame Interested in just about everything development related and games

/dev/random Tham gia Temmuz 2019
236 Đang theo dõi131 Người theo dõi
smugdev
smugdev@smug_dev·
@vadiks2003 @ccallac7 Your GPU runs your shaders in batches. Being coherent means all shader invocations inside a batch take the same path. If you put a single bool variable into your shader that is the same for every invocation during a frame (e.g. isNight), then dynamic branching is basically free.
English
0
0
1
9
smugdev
smugdev@smug_dev·
@vadiks2003 @ccallac7 It's more complicated than if/else=bad. 1. The code doesn't matter. What it compiles into does. Your compiler doesn't necessarily turn an if/else into a branch. 2. GPUs these days can handle dynamic branches quite well if the branches are coherent.
English
1
0
1
11
Charlie Callahan
Charlie Callahan@ccallac7·
ray-marched fog not too hard to implement
Charlie Callahan tweet mediaCharlie Callahan tweet media
English
9
25
595
25.1K
smugdev
smugdev@smug_dev·
@DeltaWave0x It's the perfect storm, because they all happened around the same time.
English
1
0
0
133
smugdev
smugdev@smug_dev·
@DeltaWave0x And in part due to "modern" (outdated by now) APIs (DX12/Vulkan) being designed in a way that also increases the number of permutations you need to compile.
English
1
0
0
146
DeltaWave0x 🇮🇹
DeltaWave0x 🇮🇹@DeltaWave0x·
You cannot make an engine that has to compile literally 5000+ shaders on startup, you just can't, there's fundamentally no way to fix it apart from a total fucking rewrite. Why do you even have that many fucking shaders? Are they all permutations? Do you have one shader per thing? What the actual fuck unreal engine, this literally the epitome of "Yeah this was never meant to be a generic engine, but for some fucking reason we decided to use it as such and now we can't go back"
English
22
11
329
33.9K
smugdev
smugdev@smug_dev·
@valigo @michaelkap19 I found it useful to think of it that way, because double buffering comes with tradeoffs like input lag/latency. You can address that with triple buffering. In the case of few writes, many reads, I'd recommend checking out this approach: blog.s-schoener.com/2026-01-28-rwl…
English
0
0
1
31
smugdev
smugdev@smug_dev·
@valigo @michaelkap19 Never heard of this name. I implemented that technique many times, but always call it double buffering, since it's exactly how simple, double-buffered vsync works. Two framebuffers: One to render the next frame into and one to display until the other is ready. Then you swap.
English
1
0
1
42
Valentin Ignatev
Valentin Ignatev@valigo·
Very good talk by Jon Gjengset about concurrency - read-write locks, left-right data structures, false sharing, all that. It's not Rust-specific either, it's more about how CPUs work.
Valentin Ignatev tweet media
English
8
16
389
11.4K
Lan
Lan@Lanstrash·
Any unreal dev know how to fix the level streaming hitch? Tried merging and used packed level actors on some of my static meshes. It's been happening on all of my levels on load. Seems like the rendering thread is running high.
English
21
14
219
27.3K
smugdev
smugdev@smug_dev·
@jnvcia @simplex_fx Always doing all X before doing all Y can creates guarantees that you can rely on to make your Y-logic simpler. E.g. knowing that your pathfinding never has to handle edge-cases where the level is partially out-of-date, because you run all level modification prior to AI.
English
0
0
1
22
smugdev
smugdev@smug_dev·
@jnvcia @simplex_fx This here makes perfect sense: x.com/Jonathan_Blow/… Bucket entities by type and process each bucket one by one in a predefined order. It simplifies your dependencies, because you always know what happens when. This then allows you to make simplifying assumptions in your logic.
Jonathan Blow@Jonathan_Blow

@anicic_filip @BOENSAW My game code has evolved toward "iterate over all entities of type X, do Y on them, at the place in the code where this needs to happen". The entity does not own the function, the game engine owns the function.

English
1
0
2
61
smugdev
smugdev@smug_dev·
@sarahb_paw @babadokia @fsfblake Specialization is a luxury many of them can't afford (esp. the smaller ones). You see a lot of indie devs filling multiple roles already. If they have money to spare, they typically spend it on visuals. Understandable, but good audio is still underrated.
English
1
0
2
33
Sarah 🎧🎛🎚
Sarah 🎧🎛🎚@sarahb_paw·
@babadokia @fsfblake Indie isn't really sustainable either as they often don't hire/contract out for most roles that you see in AA-AAA spaces. I rarely see any indies looking for audio pros... Just VAs and artists. Maybe occasionally a programmer
English
1
0
2
68
Blake 🪑
Blake 🪑@fsfblake·
Like I understand why so many students are giving are up on their game dev dreams. I wanna support and inspire but it truly does not matter if you ship a hit or a flop at a big studio. Your career will eventually be in the hands of some corporate person you've never met
English
9
14
207
7.1K
smugdev
smugdev@smug_dev·
@MrMPFR @SebAaltonen As much as I liked his proposal, it would be a workaround and not a fix. The actual fix would be for GPUs to have an actual ISA your shader compilers target. You don't recompile CPU code all the time, because your compiler outputs x86/Arm, which your CPUs are build to execute.
English
0
0
4
111
MrMPFR
MrMPFR@MrMPFR·
@SebAaltonen Can this be fixed within DX12 and Vulkan or do we need a brand new API like you suggest months ago?
English
1
0
0
763
Sebastian Aaltonen
Sebastian Aaltonen@SebAaltonen·
The PSO explosion has grown so much that today we need massive cloud servers to deliver the PSOs. Each vendor has their own solutions. We should fix the root cause instead of building this massive infrastructure. tomshardware.com/pc-components/…
English
15
22
220
13.3K
smugdev đã retweet
Source Gallery
Source Gallery@sourcegallery1·
ZXX
5
624
4.9K
169.8K
smugdev
smugdev@smug_dev·
@EyeOfScar @lukinu_u I've not done a deep-dive into how BPs work, but what I saw during that optimization session reminded me of seeing how Python works as opposed to something like JS. I didn't see a JIT. Just a ton of function calls.
English
0
0
1
46
Peter Brand
Peter Brand@EyeOfScar·
I highly do not recommend doing this, esp in UE. If possible, move all code to C++ as BPs have extreme limitations and some really terrible practices and issues. I guess for a turn based game where you don't do much, you could get away with it. Otherwise BPs can hinder perf.
Elan Ruskin@despair

🤯 #GDC #ClairObscur

English
4
0
7
6.9K
Peter Brand
Peter Brand@EyeOfScar·
@smug_dev @lukinu_u This is new to me. I never thought timeline would be this inefficient. There are a lot of inefficiencies in a lot of BP related nodes, workflows. Thank you!
English
1
0
0
25