Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit c2312c5

Browse files
committed
also remove nonUVShader portion
1 parent 532f758 commit c2312c5

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/engine/src/avatar/components/AvatarDissolveComponent.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export const AvatarDissolveComponent = defineComponent({
4848
},
4949

5050
createDissolveMaterial(object: Mesh<any, MeshBasicMaterial & ShaderMaterial>): any {
51-
const hasUV = object.geometry.hasAttribute('uv')
5251
const isShaderMaterial = object.material.type == 'ShaderMaterial'
5352
const material = object.material
5453
const hasTexture = !!material.map
@@ -101,13 +100,6 @@ export const AvatarDissolveComponent = defineComponent({
101100

102101
uniforms = UniformsUtils.merge([UniformsLib['lights'], uniforms])
103102

104-
const vertexNonUVShader = `
105-
#include <fog_vertex>
106-
vec2 clipSpace = gl_Position.xy / gl_Position.w;
107-
vUv3 = clipSpace * 0.5 + 0.5;
108-
vPosition = position.y;
109-
`
110-
111103
const vertexUVShader = `
112104
#include <fog_vertex>
113105
vUv3 = uv;
@@ -153,7 +145,7 @@ export const AvatarDissolveComponent = defineComponent({
153145
`
154146

155147
vertexShader = vertexShader.replace('#include <clipping_planes_pars_vertex>', vertexHeaderShader)
156-
vertexShader = vertexShader.replace('#include <fog_vertex>', hasUV ? vertexUVShader : vertexNonUVShader)
148+
vertexShader = vertexShader.replace('#include <fog_vertex>', vertexUVShader)
157149
fragmentShader = fragmentShader.replace('#include <clipping_planes_pars_fragment>', fragmentHeaderShader)
158150
fragmentShader = fragmentShader.replace('#include <output_fragment>', fragmentTextureShader)
159151

0 commit comments

Comments
 (0)