mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
remove shaders from tools
This commit is contained in:
parent
2dae67458f
commit
d506b3333e
@ -1,6 +1,19 @@
|
|||||||
import { defineComponent, watch } from 'vue';
|
import { defineComponent, watch } from 'vue';
|
||||||
import { ShaderMaterial } from 'three';
|
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({
|
export default defineComponent({
|
||||||
inject: ['three', 'mesh'],
|
inject: ['three', 'mesh'],
|
||||||
|
14
src/tools.js
14
src/tools.js
@ -79,17 +79,3 @@ function getMatcapFormatString(format) {
|
|||||||
return '';
|
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);
|
|
||||||
}`;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user