summaryrefslogtreecommitdiff
path: root/src/shaders/default.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-12-08 00:24:22 +0800
committerchai <chaifix@163.com>2019-12-08 00:24:22 +0800
commit0c4b1e68d64996a4aa5b136ddb6ee5643e159ef2 (patch)
tree0a263567be678f8b945b1472392f09b77b31b9eb /src/shaders/default.c
parent3df29dc54c509c983dc8a0e23eab4160d48144f2 (diff)
+test
Diffstat (limited to 'src/shaders/default.c')
-rw-r--r--src/shaders/default.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/shaders/default.c b/src/shaders/default.c
new file mode 100644
index 0000000..b1345e0
--- /dev/null
+++ b/src/shaders/default.c
@@ -0,0 +1,20 @@
+#include "common_header.h"
+
+/*uniforms*/
+#define lightdir UV3(0)
+#define shinees UN(0)
+
+/*vertex output*/
+#define uv reg_v2_00
+
+static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* homocoord) {
+ static Vec4 p; p.xyz = in->vertex->position; p.w = 1;
+ mat4_applytovec4(uniforms->mvp, &p, homocoord);
+}
+
+static bool frag(UniformCollection* uniforms, FragmentShaderIn* in, Color* color) {
+
+ return 1;
+}
+
+Program ssr_built_in_shader_default = { vert, frag }; \ No newline at end of file