diff options
author | chai <chaifix@163.com> | 2020-07-18 03:25:53 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-07-18 03:25:53 +0800 |
commit | 4984946caf0397a13da7605bc1ee406ea7354628 (patch) | |
tree | 0e87b71ae7639b8f12dbf3e8ec94e2087390acef /src/shaders/unlit.c | |
parent | e5e995103377f9bb79123ef8257d8680ed0945fc (diff) |
-VertexShaderIn
Diffstat (limited to 'src/shaders/unlit.c')
-rw-r--r-- | src/shaders/unlit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shaders/unlit.c b/src/shaders/unlit.c index 0b92c8c..c6a258b 100644 --- a/src/shaders/unlit.c +++ b/src/shaders/unlit.c @@ -8,13 +8,13 @@ /*varyings*/ #define rough reg_num_00 -static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* clipcoord) { - static Vec4 p; p.xyz = in->vertex->position; p.w = 1; +static void vert(UniformCollection* uniforms, Vertex* in, Vec4* clipcoord) { + static Vec4 p; p.xyz = in->position; p.w = 1; internal_mat4_mulvec4(uniforms->mvp, &p, clipcoord); Vec4 normal = { - in->vertex->normal.x, - in->vertex->normal.y, - in->vertex->normal.z, + in->normal.x, + in->normal.y, + in->normal.z, 1 }; Vec4 worldnormal; internal_mat4_mulvec4(object2world, &normal, &worldnormal); |