From 75897e68e990a006ec8161cb98c2f582abffab59 Mon Sep 17 00:00:00 2001 From: andretchen0 Date: Sat, 23 Nov 2024 09:52:48 -0600 Subject: [PATCH] chore(lint): reformat to avoid linter error (#533) Co-authored-by: Alvaro Saburido --- src/core/staging/ContactShadows.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/staging/ContactShadows.vue b/src/core/staging/ContactShadows.vue index c1c9e2012..0be427e8d 100644 --- a/src/core/staging/ContactShadows.vue +++ b/src/core/staging/ContactShadows.vue @@ -310,12 +310,11 @@ function setColors(ps: typeof props, pool: ReturnType) { pool.depthMaterial.onBeforeCompile = function (shader) { const tint = ps.tint ? new Color(ps.tint as ColorRepresentation) : new Color('white') const { r, g, b } = tint - shader.fragmentShader = /* glsl */` - ${shader.fragmentShader.replace( - 'gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );', - `gl_FragColor = vec4( ${r}, ${g}, ${b}, ( 1.0 - fragCoordZ ) * opacity);`, - )} - ` + const fragmentShader = shader.fragmentShader.replace( + 'gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );', + `gl_FragColor = vec4( ${r}, ${g}, ${b}, ( 1.0 - fragCoordZ ) * opacity);`, + ) + shader.fragmentShader = fragmentShader } }