New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per-vertex Alpha #14008
Comments
Yes. My suggestion is to follow the pattern of:
varying vec4 vColor;
THREE.ShaderChunk.color_pars_vertex = overrideChunk
Similar to the previous suggestion, you wouldn't replace |
I am not sure what level of control you need, but sounds like This example uses per-vertex alpha: |
I'm attempting to set up multi-textured terrain using alpha-blending. This would mean multiple layers of meshes, each individually textured, each blending with the one under it to create a smooth transition between textures. I've done this easily before in another language, but now I'd like to use JS and THREE.js; the issue being:
THREE.js does not support per-vertex alpha.
I cannot use alpha maps as I hope to generate the terrain procedurally - potentially even infinitely. I've noted this feature was already requested, but closed. I'm re-opening it because I strongly believe this a very necessary feature for very simple / common things such as I've described above. I'm not specifically pushing that it be part of the Color API, but it would be very useful, perhaps, to at least have an optional alpha geometry attribute.
In the meantime, is there an alternative way to inject per-vertex alpha into the shader? Or must I modify the source / use something other than THREE.js? I see there is a ShaderMaterial, but I'm not fully sure how to use it. And if I still want to achieve the shadows, texturing, and other effects, must I rewrite everything in my custom shader, simply to add alpha to vertices?
The text was updated successfully, but these errors were encountered: