diff options
author | chai <chaifix@163.com> | 2019-12-08 00:24:22 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-08 00:24:22 +0800 |
commit | 0c4b1e68d64996a4aa5b136ddb6ee5643e159ef2 (patch) | |
tree | 0a263567be678f8b945b1472392f09b77b31b9eb /src/shaders/unlit.c | |
parent | 3df29dc54c509c983dc8a0e23eab4160d48144f2 (diff) |
+test
Diffstat (limited to 'src/shaders/unlit.c')
-rw-r--r-- | src/shaders/unlit.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/shaders/unlit.c b/src/shaders/unlit.c new file mode 100644 index 0000000..ec6949f --- /dev/null +++ b/src/shaders/unlit.c @@ -0,0 +1,23 @@ +#include "common_header.h" + +#define model_matrix UM4(0) + +#define world_normal reg_v3_00 +#define vcolor reg_v4_00 + +static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* clipcoord) { + static Vec4 p; p.xyz = in->vertex->position; p.w = 1; + mat4_applytovec4(uniforms->mvp, &p, clipcoord); + model_matrix; +} + +static bool frag(UniformCollection* uniforms, FragmentShaderIn* in, Color* color) { + *color = in->color; + world_normal; + return 1; +} + +Program ssr_built_in_shader_unlit = { + vert, frag, + VARYING_COLOR +}; |