Skip to content

Commit

Permalink
chore(lint): reformat to avoid linter error (#533)
Browse files Browse the repository at this point in the history
Co-authored-by: Alvaro Saburido <[email protected]>
  • Loading branch information
andretchen0 and alvarosabu authored Nov 23, 2024
1 parent f622324 commit 75897e6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/staging/ContactShadows.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,11 @@ function setColors(ps: typeof props, pool: ReturnType<typeof init>) {
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
}
}
Expand Down

0 comments on commit 75897e6

Please sign in to comment.