Suppose I have an emissive texture on the sphere and I wish to darken it, because it’s too bright for the scene. However, the source texture for this emissive texture also has an alpha channel. If I darken the emissive texture by changing the levels, the alpha channel also gets affected. I figured that line 32:
queryMaterial.useAlphaFromDiffuseTexture = true;
would prevent this alpha from being affected. I have a feeling that it has something to do with variables as references to objects, and reassigning something, but I’m not sure.
Any idea how to change this so I can reduce the levels of the diffuse texture without making the opaque parts correspondingly more transparent?
Line 30 is where I am having the issues. If I try to adjust the levels of the emissive texture, I end up with a transparent (any, babylon palm tree in this case)
queryMaterial.emissiveTexture.level = 0.5;
Line 30 results in the loss of opacity for the normally-completely opaque texels on the sphere.