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"; import {createProgramFromSource, ProgramError, ShaderError} from "./gl_util";
/// <reference path="./glsl.d.ts" /> const vert_src = `#version 300 es
import vert_src from "./vertex.vert"; layout(location=0) in vec4 pos;
import frag_src from "./fragment.frag";
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 { Drawable } from "./drawable";
import * as G from "./glWrapper"; import * as G from "./glWrapper";
import { getUniformDefaultValue, UniformSet } from "./uniform"; import { getUniformDefaultValue, UniformSet } from "./uniform";