Showing posts with label hda. Show all posts
Showing posts with label hda. Show all posts

Saturday, 10 June 2023

Frustum Culling in Vex

 This video shows you how to create an HDA that culls points outside the camera frustum using vex instead of using a volume.

I originally recorded an example of how to crash your scene by using a volume, but I cut it out because I didn't want to bore everyone to death.


Addition: I missed to check if the points are in front or behind the camera in the video, but you can solve that easily by checking the z value. It would look something like this:
"if((campos.x+padding.x) <0|| (campos.x-padding.x) >1 ||(campos.y+padding.y) <0 || (campos.y-padding.y) >1 || campos.z >0)"