Skip to content

Commit e43f56a

Browse files
Added public function
Added public function to the volumetric renderer to manually update clipmap on demand.
1 parent b635e38 commit e43f56a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

Runtime/Volumetrics/VolumetricRendering.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ void SetupClipmap()
499499
if (Vector3.Distance(ClipmapCurrentPos, cam.transform.position) > volumetricData.ClipmapResampleThreshold)
500500
{
501501
//TODO: seperate the frames where this is rendered
502-
UpdateClipmap(Clipmap.Near);
503-
UpdateClipmap(Clipmap.Far);
502+
UpdateClipmaps();
504503
//if (ClipFar == false) UpdateClipmap(Clipmap.Near);
505504
//else {
506505
// UpdateClipmap(Clipmap.Far);
@@ -509,10 +508,16 @@ void SetupClipmap()
509508
}
510509
}
511510

512-
enum Clipmap { Near,Far};
511+
public void UpdateClipmaps()
512+
{
513+
UpdateClipmap(Clipmap.Near);
514+
UpdateClipmap(Clipmap.Far);
515+
}
516+
517+
public enum Clipmap { Near,Far};
513518

514519

515-
void UpdateClipmap(Clipmap clipmap)
520+
public void UpdateClipmap(Clipmap clipmap)
516521
{
517522
//TODO: chache ids
518523
int ClipmapKernal = ClipmapCompute.FindKernel("ClipMapGen");

0 commit comments

Comments
 (0)