diff --git a/src/materials/ShaderMaterial.js b/src/materials/ShaderMaterial.js index b384282..4aea37b 100644 --- a/src/materials/ShaderMaterial.js +++ b/src/materials/ShaderMaterial.js @@ -1,6 +1,19 @@ import { defineComponent, watch } from 'vue'; import { ShaderMaterial } from 'three'; -import { propsValues, defaultFragmentShader, defaultVertexShader } from '../tools'; +import { propsValues } from '../tools'; + +const defaultVertexShader = ` +varying vec2 vUv; +void main(){ + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); +}`; + +const defaultFragmentShader = ` +varying vec2 vUv; +void main() { + gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); +}`; export default defineComponent({ inject: ['three', 'mesh'], diff --git a/src/tools.js b/src/tools.js index 09aa896..28ad0f7 100644 --- a/src/tools.js +++ b/src/tools.js @@ -79,17 +79,3 @@ function getMatcapFormatString(format) { return ''; } } - -// shader defaults -export const defaultVertexShader = ` -varying vec2 vUv; -void main(){ - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); -}`; - -export const defaultFragmentShader = ` -varying vec2 vUv; -void main() { - gl_FragColor = vec4(vUv.x, vUv.y, 0., 1.0); -}`;