i'm going to write a software rendered occlusion culling mechanism for block game 😤
-
in hindsight this makes sense. occluders should be small, since they set up the depth buffer, but then occlusion culling can be done on whole chunks since it doesn't matter how big the area you're testing at one time is so long as the occlusion map is filled up properly
so next i might try rendering single blocks into the occlusion map and depth culling entire chunks always and see how that performs
16 visible chunk radius now runs at 68 fps above ground (1 short of being truly nice 😔) and the occlusion culler runs in only 5ms
-
16 visible chunk radius now runs at 68 fps above ground (1 short of being truly nice 😔) and the occlusion culler runs in only 5ms
simplified everything and split occluders from depth culling candidate chunks
also trying to be more picky and granular about what occluders to use, so now i'm rendering single blocks nearby the camera. hopefully more granular occluders will improve the culling percentage
-
simplified everything and split occluders from depth culling candidate chunks
also trying to be more picky and granular about what occluders to use, so now i'm rendering single blocks nearby the camera. hopefully more granular occluders will improve the culling percentage
you can call me weird but it is very fun to build a little box around myself and watch my fps go up from 110 to 450 because of the depth occlusion system
-
you can call me weird but it is very fun to build a little box around myself and watch my fps go up from 110 to 450 because of the depth occlusion system
hmm hmm so my subchunk levels go 1³, 2³, 4³, 8³, 16³
but im betting anything above 2³ is gonna be exceedingly rare since a new requirement is having a block with an exposed face. though i havent tested this
but i feel like maybe 1³, then 2²x1 4²x1 8²x1 16²x1 for each axis would probably work a *lot* better given how human construction tends to go
and also ground planes/cliff faces
-
hmm hmm so my subchunk levels go 1³, 2³, 4³, 8³, 16³
but im betting anything above 2³ is gonna be exceedingly rare since a new requirement is having a block with an exposed face. though i havent tested this
but i feel like maybe 1³, then 2²x1 4²x1 8²x1 16²x1 for each axis would probably work a *lot* better given how human construction tends to go
and also ground planes/cliff faces
i'm *sure* you'll all find this as riveting as i do, but while there are loads of 8x8x8 areas of fully opaque blocks with at least one visible exterior face, there appear to be literally no 16x16x16 areas of the same description in any given chunk >_>
-
i'm *sure* you'll all find this as riveting as i do, but while there are loads of 8x8x8 areas of fully opaque blocks with at least one visible exterior face, there appear to be literally no 16x16x16 areas of the same description in any given chunk >_>
here's photographic evidence of all the 8x8x8 blobs out in their natural habitat
-
here's photographic evidence of all the 8x8x8 blobs out in their natural habitat
so i've tweaked all the parameters and above ground its now culling 75% ish of chunks that survive frustum culling. even at 24 chunk radius it runs in ~8ms so about half a frame (and it's threaded so that's fine)
and i'm getting 75 fps above ground at 16 render dist, and 115 at 12. and indoors or in caves its more like 300-400
so i'd call this feature a success and also done for the time being!
-
so i've tweaked all the parameters and above ground its now culling 75% ish of chunks that survive frustum culling. even at 24 chunk radius it runs in ~8ms so about half a frame (and it's threaded so that's fine)
and i'm getting 75 fps above ground at 16 render dist, and 115 at 12. and indoors or in caves its more like 300-400
so i'd call this feature a success and also done for the time being!
being in a cave make fps go zoom! :3
(lol the alt badge hides the fps counter. it reads 450)
-
being in a cave make fps go zoom! :3
(lol the alt badge hides the fps counter. it reads 450)
ngl this never gets old (turning occlusion culling on and off to show how much its culling)
-
ngl this never gets old (turning occlusion culling on and off to show how much its culling)
@eniko «Look at all the stuff you can't see!»