From 4984946caf0397a13da7605bc1ee406ea7354628 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 18 Jul 2020 03:25:53 +0800 Subject: -VertexShaderIn --- src/shaders/pbr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/shaders/pbr.c') diff --git a/src/shaders/pbr.c b/src/shaders/pbr.c index 556208e..1c74feb 100644 --- a/src/shaders/pbr.c +++ b/src/shaders/pbr.c @@ -19,14 +19,14 @@ #define _world_tangent reg_v3_03 #define _world_bitangent reg_v3_04 -static void vert(UniformCollection* uniforms, VertexShaderIn* in, Vec4* clipcoord) { - static Vec4 p; p.xyz = in->vertex->position; p.w = 1; +static void vert(UniformCollection* uniforms, Vertex* in, Vec4* clipcoord) { + static Vec4 p; p.xyz = in->position; p.w = 1; object2clip(&p, clipcoord); - Vec3 worldnormal = mat4_mulvec3(*_object2world, in->vertex->normal); + Vec3 worldnormal = mat4_mulvec3(*_object2world, in->normal); worldnormal = vec3_normalize(worldnormal); //*rough = 1 - internal_vec3_dot(&worldnormal, light); - //*vnormal = in->vertex->normal; - *_texcoord = in->vertex->texcoord; + //*vnormal = in->normal; + *_texcoord = in->texcoord; _clip_pos->x = clipcoord->z; _clip_pos->y = clipcoord->w; } -- cgit v1.1-26-g67d0