From e849a07762a2feb3f124a08d50adeed52f085d5b Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 11 Jul 2020 00:29:49 +0800 Subject: =?UTF-8?q?*=E5=8A=A0internal=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shaders/default.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/shaders/default.c') diff --git a/src/shaders/default.c b/src/shaders/default.c index f184e27..6d12c8e 100644 --- a/src/shaders/default.c +++ b/src/shaders/default.c @@ -13,29 +13,29 @@ static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* clipcoord) { static Vec4 p; p.xyz = in->vertex->position; p.w = 1; - mat4_mulvec4(uniforms->mvp, &p, clipcoord); + internal_mat4_mulvec4(uniforms->mvp, &p, clipcoord); Vec4 normal = { in->vertex->normal.x, in->vertex->normal.y, in->vertex->normal.z, 1 }; - Vec4 worldnormal; mat4_mulvec4(object2world, &normal, &worldnormal); - vec3_normalize(light, light); - *rough = 1 - vec3_dot(&worldnormal, light); + Vec4 worldnormal; internal_mat4_mulvec4(object2world, &normal, &worldnormal); + internal_vec3_normalize(light, light); + *rough = 1 - internal_vec3_dot(&worldnormal, light); } static bool frag(UniformCollection* uniforms, FragmentShaderIn* in, Color32* color) { - vec3_normalize(light, light); + internal_vec3_normalize(light, light); float roughness = *rough; //(*color).r = 1; //(*color).g = 1; //(*color).b = 1; //(*color).a = 1; //return 1; - //float rough = 1- vec3_dot(&in->normal, light); + //float rough = 1- internal_vec3_dot(&in->normal, light); //Color32 nc = tex2d(noramltex, in->texcoord); - //vec3_scale(&c, roughness, &c); + //internal_vec3_scale(&c, roughness, &c); return 1; } -- cgit v1.1-26-g67d0