I wrote a basic custom shader for some instances and it looks fine on most devices and browsers but looks wonky on others. Any clue as to why the different results across devices and browsers?
Any ideas @EVGENI_POPOV ? The beards in the last image seem to render ok as if to suggest the tinting multiplier in the line: gl_FragColor = texture2D(hairSampler,vUV) * vec4(vTint, 1.);
is working fine while the line: gl_FragColor = texture2D(textureSampler,vUV) * vec4(vTint, 1.);
is messing things up when multiplied by the sampled texel. The vTint in that case would be ( 1.0 , 1.0 , 1.0 ).
Hi @gbz ! I’m helping @SirFizX test out this issue and I am one of the people who notices that strange effect. I am on Windows on Chrome 88.0.4324.150, which I think is the latest. I do NOT notice the effect on my Android phone on Chrome.
We’re seeing this mostly on Windows 10, consistently in Firefox, Chrome, Edge, etc.
Less so on Mac and Linux, but I think there were a few instances where it was seen there depending on OS version + browser. Can’t speak to that personally, but we can get more detailed info if needed.
I also saw the “correct”, solid version on windows chrome when I turned OFF hardware acceleration on the browser, then I saw the “wonky” version when I turned hardware acceleration ON. I have an RTX 3090 (not trying to flex haha, just noting in case important) @gbz@Evgeni_Popov
It seems the interpolation between (1,1,1) and (1,1,1) to generate the varying vTint does not always result to (1,1,1), hence your problems… It is probably due to some floating point precision issues.
Using < 0.9999 does also fix the problem (if you use a (1,1,1) tint color for the head).
However, I think the best way to handle this is to have a separate material for each part: