Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,14 @@ internal static void GeneratePackedStruct(StructDescriptor shaderStruct, ActiveF

if (fieldIsActive)
{
// special case, "UNITY_STEREO_INSTANCING_ENABLED" fields must be packed at the end of the struct because they are system generated semantics
//
if (subscript.HasPreprocessor() && (subscript.preprocessor.Contains("INSTANCING")))
postUnpackedSubscripts.Add(subscript);
// special case, "SHADER_STAGE_FRAGMENT" fields must be packed at the end of the struct,
// otherwise the vertex output struct will have different semantic ordering than the fragment input struct.
//
if (subscript.HasPreprocessor() && (subscript.preprocessor.Contains("SHADER_STAGE_FRAGMENT")))
else if (subscript.HasPreprocessor() && (subscript.preprocessor.Contains("SHADER_STAGE_FRAGMENT")))
postUnpackedSubscripts.Add(subscript);
else if (subscript.HasSemantic() || subscript.vectorCount == 0)
packedSubscripts.Add(subscript);
Expand Down