Hi guys, I am trying to make the torus with different in 4 colours:
- rainbow - with spinning in circle colours
- red
- green
- golden
I was able to achieve
the rainbow effects with the shader `uniform float time;
varying vec2 vUv;
#include
#include <color_fragment>
vec3 hsb2rgb(in vec3 c) {
vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);
rgb = rgb * rgb * (3.0 - 2.0 * rgb);
return c.z * mix(vec3(1.0), rgb, c.y);
}
void main() {
vec3 colBloom = hsb2rgb(vec3(fract(vUv.x - time), 1.0, 1.0));
float mult = 1.0;
gl_FragColor = vec4(colBloom[0] * mult, colBloom[1] * mult, colBloom[2] * mult, 1.0);
}`
I am using bloom effect to achieve the glowing, but the problem is that doesn’t glow all colours in the spectrum as they are not above 1.0, I can increase intensity of bloom, but I have other objects in scene that will be affected by the change, so I am looking for a solution, maybe there something simillar for emissiveIntensity for shadermaterial?
another side question is that GPU and memory heavily loaded while effect composer is active, but when I add MeshReflectorMaterial from drei to any object, the values drop by 10x times which is good, is there back side of the medal?