C
C
chegcheg2020-03-20 00:07:11
JavaScript
chegcheg, 2020-03-20 00:07:11

How to change the color of dots in particles?

There is such an animation on three.js - https://codepen.io/ykob/pen/WpNxaR .

How can you recolor all these particles in one particular color?
I understand that the color is set through a sorting algorithm, but how to remove it and set one color - there is not enough knowledge.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RAX7, 2020-03-20
@chegcheg

gl_FragColor = vec4(color, 0.4 * start);
replace with this will change the particle color to rgba gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
(255, 255, 0, 1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question