Structures
struct
UncompressedVertex
{
}
struct
Vertex
{
}
@location(3)
compressed_normal:
vec2<f32>,
NORMAL_PREPASS_OR_DEFERRED_PREPASS
AND
VERTEX_NORMALS
AND
VERTEX_NORMALS_COMPRESSED
@location(3)
normal:
vec3<f32>,
NORMAL_PREPASS_OR_DEFERRED_PREPASS
AND
VERTEX_NORMALS
AND
!VERTEX_NORMALS_COMPRESSED
@location(4)
compressed_tangent:
vec2<f32>,
NORMAL_PREPASS_OR_DEFERRED_PREPASS
AND
VERTEX_TANGENTS
AND
VERTEX_TANGENTS_COMPRESSED
struct
VertexOutput
{
}
struct
FragmentOutput
{
}
Functions
The instance_index parameter must match vertex_in.instance_index. This is a work around for a wgpu dx12 bug. See https://github.com/gfx-rs/naga/issues/2416
Most of these attributes are not used in the default prepass fragment shader, but they are still needed so we can pass them to custom prepass shaders like pbr_prepass.wesl.