-
-
Notifications
You must be signed in to change notification settings - Fork 1
Module: SVO Voxelizer
// Instantiate SVO Tree
SVO = ScriptableObject.CreateInstance<NKLI.Nigiri.SVO.Tree>();
SVO.Create(attached_camera, max_depth, max_nodes, mipmap_queue_length);// Instantiate voxelizer
voxelizer = new NKLI.Nigiri.SVO.Voxelizer(SVO, emmissive_intensity, shadow_strength, occlusion_gain, gi_area_world_size);
// Dispose voxelizer
voxelizer.Dispose();// Destroy SVO
NKLI.Nigiri.Helpers.DestroyScriptableObject(ref SVO);
// Update voxelization parameters
voxelizer.UpdateParameters(emmissive_intensity, shadow_strength, occlusion_gain);// Voxelize scene
voxelizer.VoxelizeScene(_sample_count, position_texture, lighting_texture, lighting_texture2, mask_buffer);// Split nodes
voxelizer.SplitNodes();
attached_camera - Main camera
max_depth - Default max depth of the tree
max_nodes - Maximum nodes to store [Calculate VRAM as: (max_nodes * 16Bytes)]
mipmap_queue_length - Starting size of mipmap queue [Recommend: RenderTex(width * height)]
emmissive_intensity - Emissive lighting intensity
shadow_strength - Strength of shadows
occlusion_gain - Ambiant occlusion gain
gi_area_world_size - World space axis length of GI area
NKLI.Nigiri.SVO.Tree.MaxDepth - Default, max tree depth
NKLI.Nigiri.SVO.Tree.RAM_Usage - Estimation of allocated RAM
NKLI.Nigiri.SVO.Tree.VRAM_Usage - Estimation of allocated VRAM
NKLI.Nigiri.SVO.Tree.Runtime_Thread_Split - Execution time of node split worker thread
NKLI.Nigiri.SVO.Tree.Runtime_Thread_Mipmap - Execution time of node mipmap worker thread
NKLI.Nigiri.SVO.Tree.Buffer_SVO_ByteLength - Byte length of SVO buffer
NKLI.Nigiri.SVO.Tree.SplitQueueMaxLength - Current size of split queue buffer
NKLI.Nigiri.SVO.Tree.MipmapQueueMaxLength - Current size of the mipmap queue buffer
NKLI.Nigiri.SVO.Tree.SplitQueueSparseCount - Number of node splits waiting to be processed
NKLI.Nigiri.SVO.Tree.MipmapQueueSparseCount - Number of mipmaps waiting to be processed
NKLI.Nigiri.SVO.Tree.AbleToSplit - Are there nodes waiting to be processed?
NKLI.Nigiri.SVO.Tree.AbleToMipmap - Are there mipmaps waiting to be processed?
NKLI.Nigiri.SVO.Voxelizer.SVO_Tree - Bound SVO Tree
NKLI.Nigiri.SVO.Voxelizer.Emissive_Intensity - Emissive lighting intensity
NKLI.Nigiri.SVO.Voxelizer.Shadow_Strength - Strength of shadows
NKLI.Nigiri.SVO.Voxelizer.Occlusion_Gain - Ambiant occlusion gain
NKLI.Nigiri.SVO.Voxelizer.GI_Area_Size - World space axis length of GI area
NKLI.Nigiri.SVO.Voxelizer.UpdateParameters(emissiveIntensity, shadowStrength, occlusionGain)
- Updates voxelisation parameters
NKLI.Nigiri.SVO.Voxelizer.VoxelizeScene(sampleCount, positionTexture, lightingTexture, lightingTexture2, maskBuffer)
- Voxelisae scene using the input render textures and mask buffer
NKLI.Nigiri.SVO.Voxelizer.SplitNodes()
- Processes the node split queue
Scripts/NKLI.Nigiri.SVO.cs
Scripts/NKLI.Nigiri.SVO.Helpers.cs
Scripts/NKLI.Nigiri.SVO.SVONode.cs
Scripts/NKLI.Nigiri.SVO.Voxelizer.cs
Scripts/NKLI.Nigiri.Helpers.cs
Scripts/NKLI.Nigiri.Tools.MainThreadDispatcher.cs
Resources/NKLI_Nigiri_SVOVoxelizer.compute
Resources/NKLI_Nigiri_SVOVoxelizer_Functions.cginc
Resources/NKLI_Nigiri_SVOSplitter.compute
Resources/NKLI_Nigiri_SVOMipmapper.compute
Resources/NKLI_Nigiri_SVONode.cginc
Resources/NKLI_Nigiri_MortonOrder2D.cginc