yea, so it goes. i think its largely that theres extremely common patterns of problems people need to solve, and when you have a problem which is adjacent to one, but not the same, its 10x harder to find solutions.
need to get the screen space bounding box of an object and every post online is dead wrong. "just convert the points to screen space" fails horribly when the object is partially offscreen, or worse, partially behind the player.
ive resorted to Sutherland–Hodgman but its so expensive. help......
this was a wild ride to solve. gpus can easily flush a denormalized float and we need to treat this data as literal bits. starting with 2 as a float ensures that we never produce denormalized floats
so we took the L and sacrificed a bit to the 2 god
you can mitigate the worst of it by using the Specular workflow instead of the Metalness workflow but to some extent it will always exist unless you use layering
most game engines use the left because its cheap, most films use the right because its correct. in the last few years unreal has moved to strata or whatever theyre calling it these days, which is a layered approach that also lets you do lots of cool special things like pearlescence.
but thats expensive because you have to render two PBR shaders and then blend. the result here is akin to "this pixel contains 50% pure metallic and 50% pure nonmetallic microfacets".
its a difficult distinction to describe but its really obvious looking at the results.
theres two approaches, one is correct. the cheap way is to blend the inputs (textures), IE "every facet in this pixel is *both* 50% reflective and 50% diffuse at the same time". such a material does not exist in real life. the correct way is to shade two pure materials separately and blend after.
the short version is i was breaking down how physically based materials work: surfaces are made of microscopic facets. these facets can be for ex metal or plastic, but theyre always a "pure" material. but you obviously need to blend sometimes, like between clean metal and rust.