原文链接: webgl 测试线性插值
上一篇: 使用storage事件实现跨窗口通讯
下一篇: echarts 二维散点图 Mandelbrot 分形
varying 只能是浮点型, 因为所有顶点传到片元的值都需要插值, 布尔和int不能插值, 虽然不是不确实, 但是目前看起来是这样的
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Basic Draw Add Color</title>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aPos;
attribute vec4 aColor;
// varying int index;
varying vec4 vColor;
void ma