public GlslProgram Decompile(IGalMemory Memory, long Position, GalShaderType ShaderType) { Blocks = ShaderDecoder.Decode(Memory, Position); Decl = new GlslDecl(Blocks, ShaderType); SB = new StringBuilder(); SB.AppendLine("#version 410 core"); PrintDeclTextures(); PrintDeclUniforms(); PrintDeclInAttributes(); PrintDeclOutAttributes(); PrintDeclGprs(); PrintDeclPreds(); PrintBlockScope(Blocks[0], null, null, "void main()", IdentationStr); string GlslCode = SB.ToString(); return(new GlslProgram( GlslCode, Decl.Textures.Values, Decl.Uniforms.Values)); }
public GlslProgram Decompile(IGalMemory Memory, long Position, GalShaderType ShaderType) { Blocks = ShaderDecoder.Decode(Memory, Position); BlocksB = null; Decl = new GlslDecl(Blocks, ShaderType); return(Decompile()); }
public GlslProgram Decompile(byte[] Binary, GalShaderType ShaderType) { Header = new ShaderHeader(Binary); HeaderB = null; Blocks = ShaderDecoder.Decode(Binary); BlocksB = null; Decl = new GlslDecl(Blocks, ShaderType, Header); return(Decompile()); }
public GlslProgram Decompile( IGalMemory Memory, long VpAPosition, long VpBPosition, GalShaderType ShaderType) { Blocks = ShaderDecoder.Decode(Memory, VpAPosition); BlocksB = ShaderDecoder.Decode(Memory, VpBPosition); GlslDecl DeclVpA = new GlslDecl(Blocks, ShaderType); GlslDecl DeclVpB = new GlslDecl(BlocksB, ShaderType); Decl = GlslDecl.Merge(DeclVpA, DeclVpB); return(Decompile()); }
public GlslProgram Decompile( byte[] BinaryA, byte[] BinaryB, GalShaderType ShaderType) { Header = new ShaderHeader(BinaryA); HeaderB = new ShaderHeader(BinaryB); Blocks = ShaderDecoder.Decode(BinaryA); BlocksB = ShaderDecoder.Decode(BinaryB); GlslDecl DeclVpA = new GlslDecl(Blocks, ShaderType, Header); GlslDecl DeclVpB = new GlslDecl(BlocksB, ShaderType, HeaderB); Decl = GlslDecl.Merge(DeclVpA, DeclVpB); return(Decompile()); }