![]() ![]() With the “pivot” being behind the ship being warped in. As more of the ship warps in, the box is scaled down. HOWEVER I doubt they’d hassle with clip planes… Much easier to draw a box, (using vertex colors to only show the rectangular “portal” area, to avoid extra draw calls). (But NOT what I think! Explanation why and how I think later.) Would be interesting to try nevertheless.įirst of all, the theories of using the depth buffer are quite possible, and easy to do. Or the first plane pass, ship pass, and second plane pass and the extra offset plane pass increment the stencil buffer, so, somehow it is known between which stencils value to let it pass. – These ‘clip planes’ have to be big enough as to cover the whole ship from the point of view of the camera then.įor filling the geometry it could be an exact second pass but with the planes animation offset and the ship completely white and a bit inflated. Maybe disabling/overriding every type of depth testing will show better (if possible, the same you are forcing the wireframe mode). Wireframe wouldn’t help because for wireframe to be drawn for those objects it would actually need to pass the depth tests the same way as when not-wireframe mode. In the second gif, we see that they actually leave some engine trails at the very beginning. If you somehow can pause the game and move the camera while the ‘hyperspace effect’ is in mid-sequence, maybe you should be able to see the ship already there. ![]() This will allow the planes to blend and be over the ships in case it is the case shown in the second gif. DepthRead test would be LESSEQUAL, if you want to see the ships in front of the ‘Clip Plane’ or GREATEREQUAL if you want to see it behind the ‘Clip Plane’Ĥ.- Re-Draw ‘Clip Planes’: This time as a normal alpha blended object, probably with a bit of a depth bias to not fight for the depth written by itself the previous time. What will happen is since the clip plane wrote to the depth buffer on the previous draw calls, the ships won’t be visible until the planes start ‘swiping’ and ‘clipping’ over the ship geometry. Opaque objects, then background then all transparent/alpha-blended objects.Ģ.- ‘Clip Planes’ Draw: Now time to render the ‘clipping planes’ -> these won’t write to the color buffer, only write to the depth mask.ģ.- Ships Draw: As opaque objects, DepthRead and DepthWrite enabled. – Render everything EXCEPT ships and ‘clip planes’: this is still done in the original rendering order. Let’s call the hyperspace planes ‘clip planes’ (not related custom clipping planes function of the graphics cards)ġ. I think I would do it like this, at least for the first screenshot: If not with hardware clipping planes (problem I see with this is too many drawcalls, for each ship the hardware clipping planes would not be the same) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |