diff options
Diffstat (limited to 'client/src/render/shaders/vertex_world_skin.wgsl')
-rw-r--r-- | client/src/render/shaders/vertex_world_skin.wgsl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/render/shaders/vertex_world_skin.wgsl b/client/src/render/shaders/vertex_world_skin.wgsl index 6e2b308..2188cf4 100644 --- a/client/src/render/shaders/vertex_world_skin.wgsl +++ b/client/src/render/shaders/vertex_world_skin.wgsl @@ -16,7 +16,7 @@ struct VertexIn { @location(0) position: vec3<f32>, @location(1) normal: vec3<f32>, - @location(2) tangent: vec3<f32>, // TODO maybe compress this + @location(2) tangent: vec4<f32>, // TODO maybe compress this @location(3) texcoord: vec2<f32>, @location(4) joint_index: vec4<u32>, @location(5) joint_weight: vec4<f32>, @@ -25,8 +25,9 @@ struct VertexOut { @builtin(position) clip: vec4<f32>, @location(0) normal: vec3<f32>, @location(1) tangent: vec3<f32>, - @location(2) texcoord: vec2<f32>, - @location(3) position: vec3<f32>, + @location(2) tangent_binormal_sign: f32, + @location(3) texcoord: vec2<f32>, + @location(4) position: vec3<f32>, } struct PushConst { @@ -50,7 +51,8 @@ fn main(vi: VertexIn) -> VertexOut { let vo = VertexOut( clip, normalize((pc.model * vec4(vi.normal, 0.)).xyz), - normalize((pc.model * vec4(vi.tangent, 0.)).xyz), + normalize((pc.model * vec4(vi.tangent.xyz, 0.)).xyz), + vi.tangent.w, vi.texcoord, (pc.model * vec4(vi.position, 1.)).xyz, ); |