diff --git a/app/_home/index.tsx b/app/_home/index.tsx index df5411b8..55b3b618 100644 --- a/app/_home/index.tsx +++ b/app/_home/index.tsx @@ -22,6 +22,7 @@ export const Home = () => { setBlending({ mapIntensity: 0.45, + brightness: new THREE.Vector3(0.2, 0.2, 0.2), }); setNoise({ @@ -52,16 +53,16 @@ export const Home = () => { useFrame((props) => { const noise = updateNoise(props); const fluid = updateFluid(props); - const picked = updateBrightnessPicker(props, { - texture: fluid, - }); const blending = updateBlending(props, { - texture: picked, + texture: fluid, map: noise, }); - const colorStrata = updateColorStrata(props, { + const picked = updateBrightnessPicker(props, { texture: blending, }); + const colorStrata = updateColorStrata(props, { + texture: picked, + }); ref.current!.uniforms.u_fx.value = colorStrata; }); diff --git a/packages/use-shader-fx/src/hooks/useColorStrata/shader/main.frag b/packages/use-shader-fx/src/hooks/useColorStrata/shader/main.frag index d11f5030..f1da013d 100644 --- a/packages/use-shader-fx/src/hooks/useColorStrata/shader/main.frag +++ b/packages/use-shader-fx/src/hooks/useColorStrata/shader/main.frag @@ -21,7 +21,7 @@ void main() { } col[int(j)] = fract(p.x * laminateDetail.x + p.y * laminateDetail.y); } - col *= colorFactor; + col *= colorFactor * alpha; col = clamp(col, 0.0, 1.0); gl_FragColor = vec4(col, alpha); } \ No newline at end of file