|
|
|
|
|
|
#define VBUFFER_SLICE_COUNT 128 |
|
|
|
#endif |
|
|
|
|
|
|
|
#define SOFT_VOXELIZATION |
|
|
|
#define GROUP_SIZE_1D 8 |
|
|
|
#define GROUP_SIZE_1D 8 |
|
|
|
|
|
|
|
#define SOFT_VOXELIZATION 1 // Hack which attempts to determine the partial coverage of the voxel |
|
|
|
|
|
|
|
//-------------------------------------------------------------------------------------------------- |
|
|
|
// Included headers |
|
|
|
|
|
|
float3 voxelCenterBS = mul(voxelCenterWS - obb.center, transpose(obbFrame)); |
|
|
|
float3 voxelCenterUV = voxelCenterBS / obbExtents; |
|
|
|
|
|
|
|
#ifdef SOFT_VOXELIZATION |
|
|
|
#if SOFT_VOXELIZATION |
|
|
|
// TODO: use v_cubeid_f32. |
|
|
|
// TODO: use v_cubeid_f32. |
|
|
|
uint axisIndex; float faceDist; |
|
|
|
|
|
|
|
faceDist = abs(obbExtents.y - abs(voxelCenterBS.y)); |
|
|
|