diff options
author | chai <chaifix@163.com> | 2019-12-15 16:01:48 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-15 16:01:48 +0800 |
commit | bcb7c0a426e66dc57007ae9a0e879358c7860fbb (patch) | |
tree | 7ae13fbfbe7c54a3274adba193b1c6edc7fb9c65 /src/shaders/default.c | |
parent | a0b8ef3d482c965901f094879a79dd9c5fd8245c (diff) |
*misc
Diffstat (limited to 'src/shaders/default.c')
-rw-r--r-- | src/shaders/default.c | 4 |
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); } |