diff options
author | chai <chaifix@163.com> | 2020-07-18 03:25:53 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-07-18 03:25:53 +0800 |
commit | 4984946caf0397a13da7605bc1ee406ea7354628 (patch) | |
tree | 0e87b71ae7639b8f12dbf3e8ec94e2087390acef /src/shaders/pbr.c | |
parent | e5e995103377f9bb79123ef8257d8680ed0945fc (diff) |
-VertexShaderIn
Diffstat (limited to 'src/shaders/pbr.c')
-rw-r--r-- | src/shaders/pbr.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |