Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

I've been working with caustics for a while in #webGPU and one of the issues I find is that it's hard to handle caustics for complex scenes. It's easy for planes, you can save photons in a texture using either compute and atomics, or additive blending with the rasteriser. 🧵

17,985 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

Hat profil fotoğrafı
Hat1 yıl önce

(2) but for a more generic case the photons should be gathered using a 3d texture, which means it requires to use a compute shader. This means that the shader requires to use atomics to account for each photon that arrives to a voxel, sadly atomics only allow to use i32 or u32.

Hat profil fotoğrafı
Hat1 yıl önce

(3) the thing is that the shader could use up to four different buffers to account for the RGBA channels required to save the accumulate photons, but that makes the shader run really slow. It becomes the bottleneck in the shader, and it can not be solved in the rasteriser.

Hat profil fotoğrafı
Hat1 yıl önce

(4) but one solution that might be helpful is to encode the RGBA photon data in a single I32 value, the idea is to use the 32 bits to encode when a single photon hits a voxel, and update the corresponding channel (R or G or B). This allows to save up to 255 photons.

Hat profil fotoğrafı
Hat1 yıl önce

(5) That way the compute shader only requires to implement a single atomic call which is much faster than 4 atomic calls on different buffers. The buffer is copied to a 3d texture which is used for filtering and final gather of the photons for each surface required in the scene.

caballero alba y marfil profil fotoğrafı
caballero alba y marfil1 yıl önce

I like your gui with gpu info

Nikita Agafonov profil fotoğrafı
Nikita Agafonov1 yıl önce

Man, I hope you share this wonder of yours with the github repo!

Hat profil fotoğrafı
Hat1 yıl önce

let me clean it and I'll post it with the corresponding repo. I'm working on another project right now, but I'll keep this in mind.

哈草战士 profil fotoğrafı
哈草战士1 yıl önce

Holy shit, that looks impressive

ALIM profil fotoğrafı
ALIM1 yıl önce

repo pls 😢🥹 i want to tweak it

tino tibaldo profil fotoğrafı
tino tibaldo1 yıl önce

This is impressive. The dispersion and transparencies look so smooth and pleasant to see. What's your GPU, though?

Benzer Videolar