Anonymous
3/20/2025, 2:53:22 PM
No.1009753
>>1009750
> Testing for an intersection with a triangle is a cheap, trivial, easily optimizable operation. Testing for transparency within that triangle is orders of magnitude more expensive
That's not really so obvious honestly. It's like:
test raycast with 2 triangles + lookup pixel alpha within 1 texture if it hits any of those 2 triangles
vs
test raycast with 300 triangles + don't lookup pixel alpha
I don't think alpha lookup is that expensive, textures' uploaded on GPU, there's nothing expensive about reading it's pixel
What I think it tries to optimize is make less of a dead area, but the fact those [singular pixel lookups that have to be made when ray hits dead (transparent) area of 2 triangles] are more expensive than [having to raycast hundreds triangles] is not obvious at all either.
Maybe it also heavily depends on the size of polygons and distance to them from camera? In foliage like grass and flowers for example, most of them in scene, especially far away, will have their whole polygon so small that optimizing for that dead area doesn't sound good at all.
Really makes you hmmm.
> Testing for an intersection with a triangle is a cheap, trivial, easily optimizable operation. Testing for transparency within that triangle is orders of magnitude more expensive
That's not really so obvious honestly. It's like:
test raycast with 2 triangles + lookup pixel alpha within 1 texture if it hits any of those 2 triangles
vs
test raycast with 300 triangles + don't lookup pixel alpha
I don't think alpha lookup is that expensive, textures' uploaded on GPU, there's nothing expensive about reading it's pixel
What I think it tries to optimize is make less of a dead area, but the fact those [singular pixel lookups that have to be made when ray hits dead (transparent) area of 2 triangles] are more expensive than [having to raycast hundreds triangles] is not obvious at all either.
Maybe it also heavily depends on the size of polygons and distance to them from camera? In foliage like grass and flowers for example, most of them in scene, especially far away, will have their whole polygon so small that optimizing for that dead area doesn't sound good at all.
Really makes you hmmm.