Jeshurun Hembd
Jeshurun Hembd
@ggetz thanks for checking! This new video will be helpful for further debugging. The Z value looks like it’s flickering clear across the whole volume.
Thanks for the report @happyfeet1996! Are you able to share the data for this example? If so, a [Sandcastle example](https://sandcastle.cesium.com/) that replicates the issue would give us more context to...
Also reported in #11401. See that issue for some additional test datasets.
Many of the properties of the `FragmentInput` struct for a voxel `CustomShader` are undocumented, including two new properties `tileIndex` and `sampleIndex` added in this PR. However, rather than documenting them...
I added a [local Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html#c=tRiLbts48ld4vmIht4ry6gIHJw0uzabXAElT1Gmu27hoaYm2uKUkH0k5dgL/+w2HlETayaa9R5FC1nBenPcorUqlyZyzWybJK1KyW3LCFK+L5Bph0aiX4vtJVWrKSyZHvZjcj0pCxlSxc7pkctCQnBV0yuQSgclEVsV7Wc15xuSxWpZpZIhIg3vFBbugsyGTc54yR9ngI/FHKRxJSzSuucguqqwWDE97x0oxrbav2ELXkqntdxSeVJxSqfOzs1Gvbxngox8HWr/n6Xej+4QKxfBoyqq0ykKY5gUTcG0fRkteUM2rsgOu+gejclSmaM17olJWspiktGCSkhUY1loYkfAwydi4ng7z6vaNBCz1nskhA/IMcLWsmcdOpZLqND+pRLXmIgRFVvSkLlOjEwEbpiwzVriohebGztfVgonGtpHK6Yz1rQ91zlWCAOCMz4MWnMHVSwUs1ZpUMC78ouV+9DIm5q/fEZXmMoB/A3FjtBv1vnSHejmzh47TBdM0o5peATy5Pj156eGmVTGrSlbqq0eITnyE5M355fHV/p7H4KtgcyZOqrrUQL0PBytjp6fMk8xkpSujaSLZv2qm9G8gDDi0BsagrGbmtxqVzpCN5zXwOzeCY/z5yT5+t4/PGAqOFL1GCJ+QqCUiR682lHcCCJEMYrskdZmxCURkhlddWS5WfOCxNR8edGjmcg0CuuRm54t3LGmZVcWQMYhFK9nq/tzjnyzD1wV5YS/6MPiTxx4dDjDQAAGyTvUHFGmgxthRxyFGZWNPp76zm7MGuK3gyvhKVWLOopuG/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r9L4tOW5rXcP7g2uNVRw3ZQxbuD3uxdB/l1fVa+hMGXAYznImWbRGPg5O3YcH02bs+r2D4RMEDPS7TKz3jWFqeuxwBjX4dA7R8NYiRdbeKS3nVBkmrrWZLwPZCQwHIBoy0szuVVqbMDLDtouo18sz8E1vHXnU22RkC+DTPHBfNuTuEmbTwPw/xpIfdStoUc2RQbB9FhVUlveV4ogDFc4hJazMGvDGcgJVqAs80APDKwpY2WJoKvJfnD3dBhq1LPprW2qzm4aLMdbq2C/cMakkBxVZ1sTB62phP5g0rD2NbwgQLGOYJc0Yczn+AypQgqVERQ/wSVIDkX3Iw1mEE580h/Y6635LOMxJ8u3VxTmw/marGrEMcDV5dr9YxbjUPLtfrmJchp7d362++ZvzdEyvUR3/AsbfMAbBRK6XUftZxN/P0sc+7SRJ0vEM9TZtQOmlgByh6fcp3qyJNNskdHWiFIKGkM/l1A3FvlOCSSuweleErJ4eoolKV9fhOmGHMR8HW0/3f5jUmtsQe7GBC3z8WApjS7m4/Dg8/XpxeX1qkHtx7xBNcmTk/p3DTiw1qaUAO25rBozBz2p7XIMFdZIqZ9G/GpN+YIjsgrgz6RbacoCujWAyc3/NhLBqGQQFw7HJuAKZywEMUOYb4tZYVOl317pnUNrBKQOym+bt//00f4CtceoPcLzlmc6BH2um+pyZqcqHbN7rNue62SAKKqe83BJsolGtRpXD7caqhxmfE569euCjMEkFVQpOJrUQQ5iHR72jw23AD8hgTjW3vpwzCdcwKPnu0bkFQrAfbsPrJpWuKjGmIAQd28E7x7mj9cOwMB+FWd3IeZgMk/Sow2m1cs9/Aw) for testing. This should be ready for final review. 
Thanks for the feedback @ggetz. I addressed everything except the flickering. I agree the flickering looks wrong. Unfortunately I'm not able to reproduce it on my machine. Perhaps we should...
See https://github.com/CesiumGS/cesium/issues/11841 for the flickering issue
I'm getting some strange results with large polygons on terrain.  The polygon has just 4 points. The same polygon on 3D Tiles doesn't seem to clip anything.
> Was this the only polygon in the scene or were there multiple? Good question. I can only trigger the problem if there are multiple polygons. Here is the result...
Thanks @ggetz, the code is looking good, and the issue with large polygons is fixed. I have two more smaller comments on the Sandcastles. ## AEC Clipping Sandcastle This one...