初次提交

This commit is contained in:
2022-09-19 18:05:01 +08:00
commit 57051fc44b
5401 changed files with 325410 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
//焰火粒子着色器
precision mediump float;
uniform vec3 uColor;//粒子颜色
void main()
{
//给此片元颜色值
gl_FragColor = vec4(uColor,1.0);
}

View File

@@ -0,0 +1,15 @@
uniform mat4 uMVPMatrix; //总变换矩阵
uniform float uPointSize;//点尺寸
uniform float uTime;
attribute vec3 aVelocity; //顶点速度
void main()
{
float currTime=mod(uTime,10.0);
float px=aVelocity.x*currTime;
float py=aVelocity.y*currTime-0.5*1.5*currTime*currTime+3.0;
float pz=aVelocity.z*currTime;
//根据总变换矩阵计算此次绘制此顶点位置
gl_Position = uMVPMatrix * vec4(px,py,pz,1);
//设置粒子尺寸
gl_PointSize=uPointSize;
}