I recently discovered that the assimp loader is behaving weirdly when Panda is built in double precision mode.
The most obvious problem is that the smooth normal angle parameter does not seem to be forwarded to assimp. I put some traces in the Panda code and the smooth angle is correctly configured and send to assimp, however the loaded model has no smooth normals at all.
The same config rebuilt in single precision mode do smooth the normals as expected.
I’m a bit confused, the assimp code in Panda does not rely much on stdfloat, especially not to configure the smooth angle parameter, so if anyone has a clue on how to investigate this further I’m all ears
That’s bizarre. Are you sure it’s that parameter that’s being passed incorrectly? Not sure how that’s possible. Perhaps you can try casting assimp_smooth_normal_angle explicitly to float?
I was a bit hasty accusing the assimp loader of being the culprit of my problem…
I could not reproduce it on a minimal example, so after more testing I found out that the effect appears when activating my PCF shadow filtering. For some yet unknown reason, the PCF on a double precision build generates shadows that follows exactly the edge of the triangles composing the mesh. On the other hand, on a vanilla build the shadows are smoothed as expected.
At first sight I don’t see why the precision should make PCF behave that way, the frustum used for the shadow camera is a tight fit around the object, so the range of the depth values should not change… So there is probably something wrong in my code.