Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Assets/Fur/Shaders/Shell/Depth.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,13 @@ void geom(triangle Attributes input[3], inout TriangleStream<Varyings> stream)
}
}

void frag(
Varyings input,
out float4 outColor : SV_Target,
out float outDepth : SV_Depth)
half4 frag(Varyings input) : SV_Target
{
float4 furColor = SAMPLE_TEXTURE2D(_FurMap, sampler_FurMap, input.uv / _BaseMap_ST.xy * _FurScale);
float alpha = furColor.r * (1.0 - input.layer);
if (input.layer > 0.0 && alpha < _AlphaCutout) discard;

outColor = outDepth = input.vertex.z / input.vertex.w;
return 0;
}

#endif
#endif
9 changes: 3 additions & 6 deletions Assets/Fur/Shaders/Shell/Shadow.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@ void geom(triangle Attributes input[3], inout TriangleStream<Varyings> stream)
}
}

void frag(
Varyings input,
out float4 outColor : SV_Target,
out float outDepth : SV_Depth)
half4 frag(Varyings input) : SV_Target
{
float4 furColor = SAMPLE_TEXTURE2D(_FurMap, sampler_FurMap, input.uv * _FurScale);
float alpha = furColor.r * (1.0 - input.layer);
if (input.layer > 0.0 && alpha < _AlphaCutout) discard;

outColor = outDepth = input.vertex.z / input.vertex.w;
return 0;
}

#endif
#endif