Ben Sims Profile picture
Senior Programmer@ Tantalus South. Graphics/C++/C#/Shaders/Unity/Unreal/PC/Console/cats. https://t.co/ZVhM7nzRvf https://t.co/L6p2GNXesk
Dec 11 4 tweets 1 min read
Fun Unity bug: My TAA jitter was behind by a frame. I'm managing constant buffers myself using GraphicsBuffers and LockBufferForWrite. Behind the scenes, Unity writes to a temp buffer, since the current buffer is being accessed by GPU for rendering previous 1-3 frames. This means that the data I'm setting during my current frame does not actually get used until the next frame, or possibly the frame after. (As 3 swap chains may exist, idk how to query/control this though) The solution is to create 3 graphics buffers manually, and flip between them which is
Oct 25, 2023 7 tweets 2 min read
Cities Skylines 2 is a good example of how unsuitable Unity's HDRP is for regular game development. You pay a very high base cost for all its features, it doesn't scale down to lower end hardware, and can't be scaled back for high framerates. I wouldn't recommend it for any game. Unity pushed very hard to compete with Unreal, but HDRP is a layer on top of Unity's underlying renderer, which itself has many legacy issues. (You can find many pieces of code in the HDRP base that have to work around unity limitations, such as lights, camers, probes, terrain)
Sep 28, 2022 4 tweets 3 min read
I implemented "Exposure Fusion - local tonemapping" from @BartWronsk's blog:

bartwronski.com/2022/02/28/exp…

It tonemaps regions of the screen and blends them together, resulting in a smooth, less overexposed look, note the extra detail in the clouds, and sky/land saturation

#graphics (I also implemented Physically based bloom, based on learnopengl.com/Guest-Articles…, which means every pixel contributes to the effect based on their luminance, instead of an arbitary threshold. This effect works nicely with localised tonemapping)
Sep 26, 2022 5 tweets 1 min read
One thing I've learnt about programming:
Speaking up and raising concerns is hard, you have to do it early and often. It takes time and energy away from writing code. You also have to pick your battles, there isn't enough time to solve every problem on every project. 🧵

#gamedev However if you avoid this, you'll find yourself getting frustrated frequently fixing bugs and putting out fires, knowing they could have been avoided if things were done differently. You also won't grow as a developer by always fixing problems after they occur instead of before.