Bumpiness not working on ball and stick representation
giagitom opened this issue · comments
It does not work using both meshes or impostors
That is intended, the default bumpFrequency
is set to zero for some representations where is does not look good. See src\mol-repr\structure\representation\ball-and-stick.ts. If you change the bumpFrequency
you can still get bumpiness.
If you can fix the artifact, I am happy to reconsider
@arose I have found an other related issue with bumpiness on impostor spheres and cylinders that is most visible when xRayShaded is on. Here is a test state to reproduce the issue test.molj.txt
The issue seems to be due to this piece of code inside perturbNormal
Handling edge cases in which det == 0 like this if (det == 0.0) return vec3(normal);
seems to fix the problem and also reduces the effect of the before mentioned artifact (that is still present though).
I suspect there is an other similar edge case breaking the perturbed normal.
thanks, applied the fix in fda3481