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 = () => {
22
22
23
23
setBlending ( {
24
24
mapIntensity : 0.45 ,
25
+ brightness : new THREE . Vector3 ( 0.2 , 0.2 , 0.2 ) ,
25
26
} ) ;
26
27
27
28
setNoise ( {
@@ -52,16 +53,16 @@ export const Home = () => {
52
53
useFrame ( ( props ) => {
53
54
const noise = updateNoise ( props ) ;
54
55
const fluid = updateFluid ( props ) ;
55
- const picked = updateBrightnessPicker ( props , {
56
- texture : fluid ,
57
- } ) ;
58
56
const blending = updateBlending ( props , {
59
- texture : picked ,
57
+ texture : fluid ,
60
58
map : noise ,
61
59
} ) ;
62
- const colorStrata = updateColorStrata ( props , {
60
+ const picked = updateBrightnessPicker ( props , {
63
61
texture : blending ,
64
62
} ) ;
63
+ const colorStrata = updateColorStrata ( props , {
64
+ texture : picked ,
65
+ } ) ;
65
66
ref . current ! . uniforms . u_fx . value = colorStrata ;
66
67
} ) ;
67
68
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ void main() {
21
21
}
22
22
col[int (j)] = fract (p.x * laminateDetail.x + p.y * laminateDetail.y);
23
23
}
24
- col *= colorFactor;
24
+ col *= colorFactor * alpha ;
25
25
col = clamp (col, 0.0 , 1.0 );
26
26
gl_FragColor = vec4 (col, alpha);
27
27
}
You can’t perform that action at this time.
0 commit comments