Add palette system

This commit is contained in:
schmelczerandras 2020-09-23 16:27:02 +02:00
parent f60ae06f59
commit 98d1fc9ca2
19 changed files with 196 additions and 113 deletions

View file

@ -14,6 +14,10 @@ export const loadUniform = (
(gl: UniversalRenderingContext, value: any, location: WebGLUniformLocation) => void
> = new Map();
{
converters.set(WebGLRenderingContext.SAMPLER_2D, (gl, v, l) => {
gl.uniform1i(l, v);
});
converters.set(WebGLRenderingContext.FLOAT, (gl, v, l) => {
if (v instanceof Array || v[0] instanceof Float32Array) {
if (v.length == 0) {