48 Days Ago
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