CaffeineViking / vkhr

Real-Time Hybrid Hair Rendering using Vulkan™
MIT License
446 stars 34 forks source link

Simulate ADSM in Volume Rendering #45

Closed CaffeineViking closed 5 years ago

CaffeineViking commented 5 years ago

One of the components that will be missing even with Kajiya-Kay is the directional shadow component. The idea of ADSM should be fairly easy to emulate in the raymarcher, and with coarsely granular rays (I think). It boils down to this: find surface, shade surface, raymarch towards the light and approximate_deep_shadows. We should even be able to pass in the same arguments as in the strand-based solution. This can't be hard...

CaffeineViking commented 5 years ago

I've added ADSM (a volumetric approximation of it). It's essentially the same calculation but the densities are used as strand counts (which is already what they represent anyway). Currently not optimized that much, we will fix this in #41 when we can find the actual amount of steps we need to take. Even now it is already quite performant (a lot faster than the rasterized solution).

2019-01-29 17-31-55