replace vert and frag

This commit is contained in:
monoid 2021-10-09 20:47:54 +09:00
parent 9bb5fbe18b
commit f1a2d11ae1

View File

@ -1,9 +1,22 @@
import {createProgramFromSource, ProgramError, ShaderError} from "./gl_util";
/// <reference path="./glsl.d.ts" />
import vert_src from "./vertex.vert";
import frag_src from "./fragment.frag";
const vert_src = `#version 300 es
layout(location=0) in vec4 pos;
void main() {
gl_Position = pos;
}
`;
const frag_src = `#version 300 es
precision highp float;
layout(location=0) out vec4 outColor;
//in vec4 gl_FragCoord;
//in vec2 gl_PointCoord;
uniform vec4 u_color;
void main() {
outColor = u_color;
}`;
import { Drawable } from "./drawable";
import * as G from "./glWrapper";
import { getUniformDefaultValue, UniformSet } from "./uniform";