branchsbox/tiled-frustum-cullingcancel
15 Commits over 30 Days - 0.02cph!
Be more conservative by testing 4 points of cone base rather than a sphere shape
Tiled Frustums
Start moving tiled_light_culling to use frusta
Iterate frustum tiled culling
Near/far tiled frustum planes
Very simple ConeIntersect and AABBIntersect
Cubemap frustum cullinng
Show cubemap complexity on tiled debug vis as well
https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png
Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums
https://imgur.com/a/tybd5Dv
Fix ortho projection for CalculateScreenTiles
fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections
https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png
Delete tiled_frustums_cs, main shader does everything, we recalculate it every frame anyway since we also match the depth chain for the far plane, can store it later again from it if we need it for anything
Transform plane directly to local instead of using inverse matrix
Light.GetInvertedRadius() not used anywhere, let's make it Light.GetRadius()
Push radius changes to lightbinner.hlsl
Fix frustum calculation so it wouldnt mess up with low farz, fix FetchDepthMinMax
Using invprojrow3 to linearize depth feels a bit incorrect specially when moving far-z use correct algorithm, can be accelerated later
Depth Near-Far was inverted on tiled_culling, perfect for both near/far planes now
Allow using conservative near-z culling with D_CONSERVATIVE_CULLING and remove elegibility of D_DEPTH_PREPASS, we always have it
https://i.imgur.com/9UlrmTc.png
https://i.imgur.com/joEz72S.png
Allow using conservative near-z culling with D_CONSERVATIVE_CULLING and remove elegibility of D_DEPTH_PREPASS, we always have it
https://i.imgur.com/9UlrmTc.png
https://i.imgur.com/joEz72S.png
Using invprojrow3 to linearize depth feels a bit incorrect specially when moving far-z use correct algorithm, can be accelerated later
Depth Near-Far was inverted on tiled_culling, perfect for both near/far planes now
Fix frustum calculation so it wouldnt mess up with low farz, fix FetchDepthMinMax
Push radius changes to lightbinner.hlsl
Light.GetInvertedRadius() not used anywhere, let's make it Light.GetRadius()
Transform plane directly to local instead of using inverse matrix
Tiled Frustums
Start moving tiled_light_culling to use frusta
Iterate frustum tiled culling
Near/far tiled frustum planes
Very simple ConeIntersect and AABBIntersect
Cubemap frustum cullinng
Show cubemap complexity on tiled debug vis as well
https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png
Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums
https://imgur.com/a/tybd5Dv
Fix ortho projection for CalculateScreenTiles
[pick] Fix Depth::GetLinear and add Depth::Linearize
fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections
https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png
Delete tiled_frustums_cs, main shader does everything, we recalculate it every frame anyway since we also match the depth chain for the far plane, can store it later again from it if we need it for anything
[pick] Fix Depth::GetLinear and add Depth::Linearize
fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections
https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png
Fix ortho projection for CalculateScreenTiles
Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums
https://imgur.com/a/tybd5Dv
Show cubemap complexity on tiled debug vis as well
https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png
If Graphics.RenderTarget is not overriden, let it return the actual output rendertarget so you can fetch MSAA textures without copy ( you're going to shoot your own balls using this if you dont know what you're doing )
Tiled Frustums
Start moving tiled_light_culling to use frusta
Iterate frustum tiled culling
Near/far tiled frustum planes
Very simple ConeIntersect and AABBIntersect