3D-Demo/jsm/shaders/BasicShader.js

28 lines
328 B
JavaScript
Raw Normal View History

2022-10-14 16:50:42 +08:00
/**
* Simple test shader
*/
const BasicShader = {
uniforms: {},
vertexShader: /* glsl */`
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,
fragmentShader: /* glsl */`
void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );
}`
};
export { BasicShader };