Open bkuster opened 4 years ago
Thanks for the detailed steps to reproduce @bkuster ! I can see this triggers an error in your Sandcastle here.
However, when running it in Sandcastle locally, it doesn't produce an error, but correctly just returns that it picked undefined
. Are you seeing this behavior too? You can run Sandcastle locally by cloning here, running npm install
and npm run start
and then going to http://localhost:8080/Apps/Sandcastle/index.html.
Thanks for the fast response @OmarShehata . I can also reproduce it in a local Sandcastle (on master). It took me quite some time to find the actual cause of the error and timing is everything. Maybe something loads faster/slower in your local Sandcastle and you would need to tweak the timeout settings or maybe even the picked screen positon.
@bkuster I think you're right about timing being a factor. It could come down to hardware refresh rate or a browser's rAF. Did you notice this on a high refresh rate display or a standard 60Hz panel?
I'll check to see if browser agent matters when I get to my PC.
@OmarShehata hi, i created a sample, please see Sandcastle Example
throw error when the mouse pick the 3dtiles.
Recently, I discovered that the texture on the clipping plane was missing during debugging. This occurred because it was executed during the "Cesium3DTileset.prototype.prePassesUpdate" phase, and it may not have been executed when picking.
Issue
When an entity is clipped and picked in the same animation frame, there is a null pointer in the pick render pass, due to a missing uniforms entry (in other words. The uniforms array has a length of
n
but onlyn - 1
entries).Background
In our application we dynamically place clipping planes. Sometimes the screen space, where the clipping plane is applied is picked within the same animation frame. After this happens, picking is broken.
Reproduction
I made a Sandcastle to programatically recreate the error, see this gist.*
* this is a modified version of the ClippingPlane Sandcastle with only the entity. The magic happens on lines 43 to 47.