Hi community!
Nothing special, I just wanted to know how the selective bloom will work with instanced meshes.
To be honest, I’m not sure that I chose the correct way in using of .onBeforeCompile()
. Criticism and advice are welcomed.
Here is a pic
And there is a working demo:
You can find a music video from youtube at the bottom right corner of the window. Just for better atmosphere of the scene
PS Special thanks to @marquizzo for pointing to the function of noise in shaders.
13 Likes
doum
May 12, 2019, 6:10pm
2
Can you explain to me how make with material in object 3d
Usnul
May 12, 2019, 6:43pm
3
Looks awesome. Though I didn’t find any boxes
1 Like
@doum
Oh! For working with materials and their modifications, you’d better read articles from @pailhead .
For example, this good one: Tutorial for modifying materials
1 Like
My only suggestion here is not to push the uniforms from the onBeforeCompile
but push them into.
Ie.
myMaterial.userData.uniforms = { myUniform }
myMaterial.onBeforeCompile = shader=> shader.uniform.myUniform = myMaterial.myUniform
You can also bind onBeforeCompile
. This way you have your uniforms already during instantiation, you don’t have to wait for three to do it’s… thing
2 Likes