summaryrefslogtreecommitdiff
path: root/src/shaders/default.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-12-15 16:01:48 +0800
committerchai <chaifix@163.com>2019-12-15 16:01:48 +0800
commitbcb7c0a426e66dc57007ae9a0e879358c7860fbb (patch)
tree7ae13fbfbe7c54a3274adba193b1c6edc7fb9c65 /src/shaders/default.c
parenta0b8ef3d482c965901f094879a79dd9c5fd8245c (diff)
*misc
Diffstat (limited to 'src/shaders/default.c')
-rw-r--r--src/shaders/default.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shaders/default.c b/src/shaders/default.c
index df3f121..00b436c 100644
--- a/src/shaders/default.c
+++ b/src/shaders/default.c
@@ -13,14 +13,14 @@
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);
+ mat4_mulvec4(uniforms->mvp, &p, clipcoord);
Vec4 normal = {
in->vertex->normal.x,
in->vertex->normal.y,
in->vertex->normal.z,
1
};
- Vec4 worldnormal; mat4_applytovec4(object2world, &normal, &worldnormal);
+ Vec4 worldnormal; mat4_mulvec4(object2world, &normal, &worldnormal);
vec3_normalize(light, light);
*rough = 1 - vec3_dot(&worldnormal, light);
}