public static DebugEffectTechnique Parse(DebugBytecodeReader reader, DebugBytecodeReader techniqueReader, DebugShaderVersion version) { var result = new DebugEffectTechnique(version); var nameOffset = result.NameOffset = techniqueReader.ReadUInt32("NameOffset"); var nameReader = reader.CopyAtOffset("NameReader", techniqueReader, (int)nameOffset); result.Name = nameReader.ReadString("Name"); result.PassCount = techniqueReader.ReadUInt32("PassCount"); result.AnnotationCount = techniqueReader.ReadUInt32("AnnotationCount"); for (int i = 0; i < result.AnnotationCount; i++) { techniqueReader.AddIndent("Annotation"); result.Annotations.Add(DebugEffectAnnotation.Parse(reader, techniqueReader, version)); techniqueReader.RemoveIndent(); } for (int i = 0; i < result.PassCount; i++) { techniqueReader.AddIndent($"Pass {i}"); result.Passes.Add(DebugEffectPass.Parse(reader, techniqueReader, version)); techniqueReader.RemoveIndent(); } return(result); }