Merge branch 'dev'

This commit is contained in:
Maze Winther
2026-03-02 17:48:39 +01:00
2 changed files with 25 additions and 25 deletions
@@ -650,7 +650,7 @@ function EffectsButton({
<Button <Button
variant="text" variant="text"
size="icon" size="icon"
className={cn("rounded-sm !size-5 bg-background/50", className)} className={cn("rounded-sm !size-5 bg-black/50 text-white", className)}
onClick={handleClick} onClick={handleClick}
onMouseDown={(event) => event.stopPropagation()} onMouseDown={(event) => event.stopPropagation()}
> >
+24 -24
View File
@@ -19,32 +19,32 @@ export const blurEffectDefinition: EffectDefinition = {
renderer: { renderer: {
type: "webgl", type: "webgl",
passes: [ passes: [
{ {
fragmentShader: blurFragmentShader, fragmentShader: blurFragmentShader,
uniforms: ({ effectParams }) => { uniforms: ({ effectParams, width }) => {
const intensity = const intensity =
typeof effectParams.intensity === "number" typeof effectParams.intensity === "number"
? effectParams.intensity ? effectParams.intensity
: Number.parseFloat(String(effectParams.intensity)); : Number.parseFloat(String(effectParams.intensity));
return { return {
u_sigma: Math.max(intensity / 5, 0.001), u_sigma: Math.max((intensity / 5) * (width / 1920), 0.001),
u_direction: [1, 0], u_direction: [1, 0],
}; };
},
}, },
{ },
fragmentShader: blurFragmentShader, {
uniforms: ({ effectParams }) => { fragmentShader: blurFragmentShader,
const intensity = uniforms: ({ effectParams, height }) => {
typeof effectParams.intensity === "number" const intensity =
? effectParams.intensity typeof effectParams.intensity === "number"
: Number.parseFloat(String(effectParams.intensity)); ? effectParams.intensity
return { : Number.parseFloat(String(effectParams.intensity));
u_sigma: Math.max(intensity / 5, 0.001), return {
u_direction: [0, 1], u_sigma: Math.max((intensity / 5) * (height / 1080), 0.001),
}; u_direction: [0, 1],
}, };
}, },
},
], ],
}, },
}; };