File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
packages/use-shader-fx/src/hooks/useColorStrata/shader Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const Home = () => {
2222
2323 setBlending ( {
2424 mapIntensity : 0.45 ,
25+ brightness : new THREE . Vector3 ( 0.2 , 0.2 , 0.2 ) ,
2526 } ) ;
2627
2728 setNoise ( {
@@ -52,16 +53,16 @@ export const Home = () => {
5253 useFrame ( ( props ) => {
5354 const noise = updateNoise ( props ) ;
5455 const fluid = updateFluid ( props ) ;
55- const picked = updateBrightnessPicker ( props , {
56- texture : fluid ,
57- } ) ;
5856 const blending = updateBlending ( props , {
59- texture : picked ,
57+ texture : fluid ,
6058 map : noise ,
6159 } ) ;
62- const colorStrata = updateColorStrata ( props , {
60+ const picked = updateBrightnessPicker ( props , {
6361 texture : blending ,
6462 } ) ;
63+ const colorStrata = updateColorStrata ( props , {
64+ texture : picked ,
65+ } ) ;
6566 ref . current ! . uniforms . u_fx . value = colorStrata ;
6667 } ) ;
6768
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ void main() {
2121 }
2222 col[int (j)] = fract (p.x * laminateDetail.x + p.y * laminateDetail.y);
2323 }
24- col *= colorFactor;
24+ col *= colorFactor * alpha ;
2525 col = clamp (col, 0.0 , 1.0 );
2626 gl_FragColor = vec4 (col, alpha);
2727}
You can’t perform that action at this time.
0 commit comments