Graphics Engineer

Joined May 2019
Guilherme Avila retweeted
New blog post! "Load store conflicts", in which we look at some performance sensitive code that has surprisingly dramatic performance swings based on the compiler and the microarchitecture used. RTs appreciated! zeux.io/2025/05/03/load-stor…
3
81
2
248
16,918
I see Stubbe's octahedral decode opt in almost every usage I come across. But I've never seen it used for encoding. The same symmetry applies here! and its ~50% faster. Especially important for octahedral-encoded textures, as it's required for every sample! please RT.
After playing around with symmetries for a bit, this seems like a cute and slightly faster way to decode octahedral normals than what seems to have become the standard approach. No outer conditional and reusing 1.0-abs(..) terms from n.z.
2
21
2
82
6,861
Found another potential optimization, breaking up instruction dependency, and allowing better pipeline while quarter-rate rcp runs. Got mixed results here, either no net gain or ~5% gain. Probably depends on the compiler, but should use this formulation eitherway.
1
5
368
Found another potential optimization, breaking up instruction dependency, and allowing better pipeline while quarter-rate rcp runs. Got mixed results here, either no net gain or ~5% gain. Probably depends on the compiler, but should use this formulation eitherway.
I see Stubbe's octahedral decode opt in almost every usage I come across. But I've never seen it used for encoding. The same symmetry applies here! and its ~50% faster. Especially important for octahedral-encoded textures, as it's required for every sample! please RT.
1
1
1
11
950
Worth noting, snippet expects unit normals & returns uv in [-1,1] range (remap to [0,1] afterwards if the API expects that range)
1
278
Guilherme Avila retweeted
meshoptimizer v0.21 is out! This release has many improvements related to meshlets: a new function to optimize meshlets for HW efficiency, extra features for meshopt_simplify* to make Nanite style processing easier to implement and faster, and more! RTs and ⭐️ appreciated :)
1
41
169
10,491
Example of full padded octahedral-encoded mipchain. Pre-convolved with GGX roughness lobes.
3
228
Octahedral-encoded indirect specular map, with added border so it allows bilinear filtering, pre-convolved mips & trivially tiled within texture atlas. shadertoy.com/view/43G3Dd
1
11
1,011
different spectral band
124
plasma tornado. I love the sun.
164
Currently, there isn't a physically correct way to filter + blend a .png ImageBitmap uploaded to WebGPU. Either filtering occurs in sRGB, or premultiplied-alpha does. As such, if you want photometric correct .png textures you need decode it manually. rawcdn.githack.com/sciecode/…
1
2
504
The point is - this is not something new. The information about having to filter, blend & premultiply-alpha in linear-space in order to properly handle cutouts & correct radiance/luminance data has been out there for at least 25 years.
1
151
So why, when I load a .png to a HTMLImageElement, does it filter + blend & premultiply-alpha in sRGB? This sort of thing frustrates more than I can put into words.
1
1
152