Skip to content

Instantly share code, notes, and snippets.

@Ipotrick
Ipotrick / Efficient GPU Work Expansion.md
Last active July 11, 2025 16:13
Efficient GPU Work Expansion

What is "Work Expansion"

In a GPU-driven renderer, "work expansion" is a commonly occurring problem. "Work Expansion" means that a single item of work spawns N following work items. Typically one work item will be executed by one shader thread/invocation.

An example for work expansion is gpu driven meshlet culling following mesh culling. In this example a "work item" is culling a mesh, where each mesh cull work item spawns N following meshlet cull work items.

There are many diverse cases of this problem and many solutions. Some are trivial to solve, for example, when N (how many work items are spawned) is fixed.

@pyoneerC
pyoneerC / gpr.md
Last active August 5, 2025 04:51
List of free resources to study graphics programming.
@bazhenovc
bazhenovc / the_sane_rendering_manifesto.md
Last active September 30, 2025 18:19
The Sane Rendering Manifesto

The Sane Rendering Manifesto

The goal of this manifesto is to provide an easy to follow and reasonable rules that realtime and video game renderers can follow.

These rules highly prioritize image clarity/stability and pleasant gameplay experience over photorealism and excess graphics fidelity.

Keep in mind that shipping a game has priority over everything else and it is allowed to break the rules of the manifesto when there are no other good options in order to ship the game.

Do not use dynamic resolution.

code

@zeux
zeux / bounds-frag.glsl
Last active April 3, 2025 14:19
Shader code used in "Approximate projected bounds" article, used for profiling with offline cycle estimation tools.
#version 450
// 2D Polyhedral Bounds of a Clipped, Perspective-Projected 3D Sphere. Michael Mara, Morgan McGuire. 2013
bool projectSphereView(vec3 c, float r, float znear, float P00, float P11, out vec4 aabb)
{
if (c.z < r + znear) return false;
vec3 cr = c * r;
float czr2 = c.z * c.z - r * r;
@h3r2tic
h3r2tic / raymarch.hlsl
Last active September 21, 2025 11:18
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"

From time to time I receive questions on the depth aware upsampling mentioned in the INSIDE-rendering presentation: https://loopit.dk/rendering_inside.pdf#page=39

noisy blur

The goal of this technique is to take the texture-output from a half-resolution pass, containing the results of sampling volumetric fog - and scale it up to full resolution. This presents two challenges:

  • Making sure samples from the low-resolution buffer, do not spill on top of foreground objects in the high-resolution buffer
  • Making sure the samples in the volumetric fog can be properly accumulated by TAA after upsampling

@MomoDeve
MomoDeve / questions.txt
Created October 26, 2021 20:54
rendering engineer Huawei
Вопросы на rendering engineer Huawei
- в чем разница между forward и deferred rendering? Какие плюсы и минусы у каждого из двух подходов (производительность / ограничения)
- какие способы рендерить прозрачную геометрию вы знаете?
- что такое алиасинг? Из-за чего он происходит? Какие есть алгоритмы антиалиасинга? Как реализован встроенный MSAA и чем он лучше SSAA?
- как работает TAA и какие дефекты он вызывает?
- как оптимально рисовать большое число объектов на экране? Какие есть способы отсечения? (на GPU и CPU)
- как работает Kd-дерево, bvh, bsp? Какая у них асимптотика и от чего она зависит?
- для чего нужны mip-уровни текстур и фильтрация текстур?
@rtryan98
rtryan98 / Graphics and Engine development.md
Last active October 15, 2025 19:07
Talks, Posts, Papers and more for Graphics and (Game) Engine Development