Open giagitom opened 1 month ago
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.
Hmm.. It seems that also varying bump frequency does not produce any effect on the representation. Maybe it is disabled somewhere else?
Oh.. sorry It was my fault. I didn't increase bumpiness on material. It is working fine.
Maybe just reconsider enable it by default since I hardly see any graphic artifacts or issues.
The only issue I can see is this in the contact between cylinders.. but it is super small
I find the artifact quite strong without specular highlights
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
https://github.com/molstar/molstar/blob/9604b89ee0716442b0bc8b862cfe712468dc6c95/src/mol-gl/shader/chunks/common-frag-params.glsl.ts#L114
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 fda3481d1504213dbabf70ec264580df2dfb22ff
It does not work using both meshes or impostors