mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-04 21:31:11 -05:00
18 lines
339 B
Text
18 lines
339 B
Text
|
uniform mat4 mvp;
|
||
|
uniform mat3 m3a, m3b, m3c;
|
||
|
uniform vec4 v3a, v3b, v3c;
|
||
|
|
||
|
void main() {
|
||
|
gl_Position = mvp * gl_Vertex;
|
||
|
|
||
|
vec3 ta = -(v3a.xyz - gl_Vertex.xyz);
|
||
|
vec3 ra = m3a * ta;
|
||
|
|
||
|
vec3 tb = -((mvp * v3b).xyz - gl_Vertex.xyz);
|
||
|
vec3 rb = m3b * tb;
|
||
|
|
||
|
vec3 rc = m3c * (-(v3c.xyz - gl_Vertex.xyz));
|
||
|
|
||
|
gl_FrontColor = vec4(ra+rb+rc,1.0);
|
||
|
}
|