Closed hanaimin closed 4 years ago
@hanaimin can you provide a sample glTF file that shows this issue?
@hanaimin can you provide a sample glTF file that shows this issue? thanks, the sample glTF(glb) file : 0.zip
and the tileset here: tileset.zip
and linked shaders: Shader.zip crazily modified
@OmarShehata hi, is there any solution for the issue?
in the glb file, the diffuse value alpha channel is 0.0, default it should be 1.0.
"u_diffuse": [
0.866667,
0.721569,
0.133333,
0.0
],
or you can just change the fs shader to ignore diffuse.alpha
if(u_hasDiffuse)
{
diffuse.rgb = diffuse.rgb * u_diffuse.rgb;
}
Thanks for the tip @rainliang000. @hanaimin can you confirm this by adding:
gl_FragColor = diffuse + vec4(ambient.rgb, 1.0);
As the last line of your shader?
@OmarShehata @rainliang000 Thank you very much. both solutions are OK.
Can not pick the feature when use the gltf2.0 KHR_techniques_webgl extension.
the FS like that.
but if I modify the FS code like following, pick-feature is OK. note the last line code modified crazily.
So strange.