1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

remove shaders from tools

This commit is contained in:
Kevin Levron 2021-04-04 21:04:56 +02:00
parent 2dae67458f
commit d506b3333e
2 changed files with 14 additions and 15 deletions

View File

@ -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'],

View File

@ -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);
}`;