Erfan Ahmadi.

Math, Computer Graphics and GPUs

Erfan Ahmadi

I share my knowledge about computer graphics and math here, the best way I can.

Portrait of Erfan Ahmadi

Posts

11 posts since 2019
Year
YouTube
·Video

Screen-Space Derivatives in Practice

Screen-space derivatives are built into every GPU and available in fragment shader, yet few people know how and when they should use them.

YouTube · Shaders · Math · SDF
An infinite grid of equilateral triangles
·5 min read

Effortless Simplex Grid

Deriving the 2D “squash” transform behind simplex noise that turns a square grid into equilateral triangles — a proof instead of magic numbers.

Math · Shaders
The CPU records a command buffer while the GPU executes the previous one
·10 min read

Frames In Flight Explained

What “frames in flight” really means, how to drive it with timeline semaphores, and how swapchain images limit it.

Vulkan · Synchronization · Nabla
An image travelling from CPU memory through a staging buffer to the GPU
·6 min read

Uploading Textures to GPU — The Good Way

The Nabla utility that streams large textures to the GPU in batches through a fixed-size staging buffer, converting formats on the fly.

Vulkan · Nabla
Yugen Journal · Part 4

Render Target Abstraction over Vulkan and D3D12

Weighing designs for one render-target abstraction over Vulkan render passes and D3D12, from framebuffers to imageless framebuffers.

·6 min read
Two million cubes animated by a compute shader
Yugen Journal · Part 3

Compute Shader Tech Demo

Multi-queue submission lands in our renderer backend: two million cubes animated in a compute pass and drawn instanced.

·1 min read
A mesh loaded from a YUGA file
Yugen Journal · Part 2

YUGA: The Yugen Asset System

YUGA, our chunked asset file format for meshes, textures and shaders, and how shader reflection data is stored inside it.

·5 min read
Four Yugen tech demos
Yugen Journal · Part 1

Yugen Engine Introduction: The Rendering System

Kicking off a journal on building the rendering system of Yugen, our in-house engine: the Vulkan backend, the demo framework and what comes next.

·4 min read
Bokeh highlights in a corridor rendered with single-pass depth of field
·3 min read

Bokeh Depth of Field

Three ways to render bokeh depth of field: circular separable DoF, practical gather-based bokeh, and single-pass depth of field.

Post-processing · The Forge
A toon-shaded dragon with outlines
·2 min read

The Forge Examples

Weekend experiments on The Forge: instancing, Blinn-Phong lighting, deferred shading, toon shading, tessellation and bloom.

The Forge · Shaders
“The best way to learn is to teach” — Frank Oppenheimer
·2 min read

Introduction to Me

Who I am, why I wanted to build engines instead of just using them, and why I started this blog.

Personal