Structures
struct
UncompressedVertex
{
}
struct
Vertex
{
}
@if(NORMAL_PREPASS_OR_DEFERRED_PREPASS && VERTEX_NORMALS && VERTEX_NORMALS_COMPRESSED)
@location(3)
compressed_normal:
vec2<f32>
,
@if(NORMAL_PREPASS_OR_DEFERRED_PREPASS && VERTEX_NORMALS && !VERTEX_NORMALS_COMPRESSED)
@location(3)
normal:
vec3<f32>
,
@if(NORMAL_PREPASS_OR_DEFERRED_PREPASS && VERTEX_TANGENTS && VERTEX_TANGENTS_COMPRESSED)
@location(4)
compressed_tangent:
vec2<f32>
,
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.