// Get the transformation matrix of the specified camera object
matrix Matrix = optransform(chs("camera"));
// Calculate the camera's world space position by transforming the origin (0,0,0) using the matrix
vector camPos = cracktransform(0, 0, 0, {0, 0, 0}, Matrix);
// Calculate the normalized vector representing the view direction from the camera to the current point
vector viewRay = normalize(@P - camPos);
// Define a threshold angle (in radians) for visibility determination
float threshold = chf("limit");
// Check if the dot product between the view direction and the point's normal is below the threshold
if (dot(viewRay, v@N) < threshold) {
i@group_invisible = 1; // Mark the point as invisible
} else {
i@group_invisible = 0; // Mark the point as visible
}