drawcall/three.proton

Update Shaders

Spiri0 opened this issue · 1 comments

Proton's code is very interesting. After I have learned a lot about three.js and am now able to understand and use shaders and buffer geometries, it is particle's turn.
I quickly realized that adding particle geometries dynamically in three.js is the big challenge.
I study the code of proton, because proton can process particle body calls much better than is possible with three.js alone. I found out that proton use own renderers.
I created a shader material and chose the spriter renderer in proton. The result is very nice. Now to the problem. With shader I lever out certain behaviors like the scale and alpha. These values ​​are easy to manipulate using shader uniform values. The problem is that changes in uniform values ​​are not updated, only the new particles are always initialized with the new values. Existing particles ignore changes in uniform. This will be because the proton renderers do not pay attention to changes in the material parameters such as the uniforms.
It will take me a while until I understand the code better. Can an update lister be integrated into the renderer which like three.js pays attention to and updates changes in the material parameters?

Thank you, three.proton currently does not have a dedicated ShaderRender. But you can easily use CustomRender to render it. I will add ShaderRender if I have time