137 Followers
93 Following
2.2K Posts

Graphics programmer.

Trans lesbian. Math geek. Coaster enthusiast.
🏳️‍⚧️🏳️‍🌈 she/her

Opinions expressed here are my own and do not represent any current or past employer.

Blender 4.2 has a strange bug where any OBJ import seems to get transmission set to 1.0 on all materials.

4.0 does it right. Hmm.

Implemented 2.5D culling. (Basic idea: after computing min/max depth for the tile, slice it into 32 ranges, build a bitmask of depths that are present. Build the same for lights. Only accept lights that intersect the depth mask.)

From these A/B shots (false positive heatmap), you can see that it does help. A little. But the mask for the light is very crude, just uses the min/max in view space, doesn't account for the bounding sphere.

Okay, remapping with:
`log2(float(count) + 1.0) / 2.0`

This gives blue at 3, green at 15, red at 63, and white at 255:

An interesting debug view: instead of total light count in the tile, displaying the per-pixel false-positive count (lights in the tile that do not pass the range check for the light.)
Also, confirmed: this makes for _really_ nice stochastic alpha once animated:
At @mjp 's suggestion, added some worst-case alpha test to really stress things. All of the spheres now do stochastic alpha discard! Leads to some truly fantastic depth complexity:

Heatmap view, with the light count in the scene raised to 256.

There's two culling tests, and a light is only marked visible if it passes both:
- inside the planes of the subfrustum
- inside the viewspace AABB of the subfrustum

AABB only is decent, but falls flat on edges. Frustum only is _awful_. The two together do a pretty good job, though.

Incidentally, this is what it's _supposed_ to look like (culling is off here).

_Finally_ getting around to actually implementing tiled light culling. Which was the original reason I started this renderer... a year+ ago?

It is, of course, incredibly broken so far:

This is going well, as you can see.