{"action":"created","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/6201","repository_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/6201/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/6201/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/6201/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/6201","id":295969133,"number":6201,"title":"Increase max clipping planes using textures","user":{"login":"likangning93","id":5395255,"avatar_url":"https://avatars3.githubusercontent.com/u/5395255?v=4","gravatar_id":"","url":"https://api.github.com/users/likangning93","html_url":"https://github.com/likangning93","followers_url":"https://api.github.com/users/likangning93/followers","following_url":"https://api.github.com/users/likangning93/following{/other_user}","gists_url":"https://api.github.com/users/likangning93/gists{/gist_id}","starred_url":"https://api.github.com/users/likangning93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likangning93/subscriptions","organizations_url":"https://api.github.com/users/likangning93/orgs","repos_url":"https://api.github.com/users/likangning93/repos","events_url":"https://api.github.com/users/likangning93/events{/privacy}","received_events_url":"https://api.github.com/users/likangning93/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-02-09T18:35:19Z","updated_at":"2018-02-28T19:43:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/6201","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/6201","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/6201.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/6201.patch"},"body":"Storing the clipping planes in textures leads to a few caveats:\r\n* precision problems with compression to RGBA means plane transformations happen in the shader now instead of on the CPU side\r\n  * so it's a bit more shader math\r\n  * but nice benefit is that the texture doesn't get updated as the view changes - yay!\r\n* attaching a `Texture` gl resource to `ClippingPlaneCollection` means it's no longer super practical to `clone` it onto each model in a 3D Tileset backed by gltf, so now they share the tileset's reference to a single `ClippingPlaneCollection`\r\n* `Texture` also means `ClippingPlaneCollection` now has to be destroyed, but since a `Model` may either have a reference to its own `ClippingPlaneCollection` or a `Cesium3DTileset`'s `ClippingPlaneCollection`, the `destroy` function is a little weird and might need discussion.\r\n\r\nThere's also a new Sandcastle that I used for debugging. Performance predictably isn't great with all 2048 planes and gets worse as you get closer to the model or use a 3D Tileset. But it works! Even my laptop with Atom Z3700 Series Intel Graphics will gamely throw up a frame or two every couple seconds.\r\n\r\n---\r\n\r\nFixes #6184\r\nFixes #6048"},"comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/369359260","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/6201#issuecomment-369359260","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/6201","id":369359260,"user":{"login":"likangning93","id":5395255,"avatar_url":"https://avatars3.githubusercontent.com/u/5395255?v=4","gravatar_id":"","url":"https://api.github.com/users/likangning93","html_url":"https://github.com/likangning93","followers_url":"https://api.github.com/users/likangning93/followers","following_url":"https://api.github.com/users/likangning93/following{/other_user}","gists_url":"https://api.github.com/users/likangning93/gists{/gist_id}","starred_url":"https://api.github.com/users/likangning93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likangning93/subscriptions","organizations_url":"https://api.github.com/users/likangning93/orgs","repos_url":"https://api.github.com/users/likangning93/repos","events_url":"https://api.github.com/users/likangning93/events{/privacy}","received_events_url":"https://api.github.com/users/likangning93/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T19:43:54Z","updated_at":"2018-02-28T19:43:54Z","author_association":"CONTRIBUTOR","body":"Back on the topic of packing arbitrary floats to uint8 RGBA, just found out Cesium has code for doing just that in [`BatchTable.js`](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/BatchTable.js#L280).\r\n\r\n@pjcozzi @bagnell @lilleyse are there caveats on this? Or did I just neglect to ask?\r\nEither way I feel pretty silly with the complicated dance of normalization and denormalization that's in here right now."}}
{"actor":{"display_login":"likangning93"}}