distance culling surfaces
Posted: Sun Oct 11, 2015 1:48 am
In Wolfenstein and Spearmint's foliage code, shaders can be given the instruction to have the game cull them at a distance. I'm trying to create way for the game to cull surfaces at a distance by shader, possibly fade too, but without the use of all the foliage instance code and whatnot.
Wolf uses does this in RB_SurfaceFoliage but is there a way to just plug what its doing right into RB_SurfaceTriangles? From a brief glance it looks like wolf records the origin of each instance to be used for distance cull. Instead of using the instance origin is there a way to use the surface's origin?
I'm just trying to cull a lot of needless traingles at a distance. It could be by another approach too. Like all detail brushes would cull at a set distance but leave structural brushes. Or maybe a type of instruction in q3map2 that would convert a func_group into a different type of brushes that culled at distance.
Wolf uses does this in RB_SurfaceFoliage but is there a way to just plug what its doing right into RB_SurfaceTriangles? From a brief glance it looks like wolf records the origin of each instance to be used for distance cull. Instead of using the instance origin is there a way to use the surface's origin?
I'm just trying to cull a lot of needless traingles at a distance. It could be by another approach too. Like all detail brushes would cull at a set distance but leave structural brushes. Or maybe a type of instruction in q3map2 that would convert a func_group into a different type of brushes that culled at distance.