private ShaderStage ShaderStageFactory( IGalMemory Memory, long Position, long PositionB, bool IsDualVp, GalShaderType Type) { GlslProgram Program; GlslDecompiler Decompiler = new GlslDecompiler(); if (IsDualVp) { ShaderDumper.Dump(Memory, Position, Type, "a"); ShaderDumper.Dump(Memory, PositionB, Type, "b"); Program = Decompiler.Decompile( Memory, Position, PositionB, Type); } else { ShaderDumper.Dump(Memory, Position, Type); Program = Decompiler.Decompile(Memory, Position, Type); } return(new ShaderStage( Type, Program.Code, Program.Textures, Program.Uniforms)); }
private OglShaderStage ShaderStageFactory( IGalMemory memory, long position, long positionB, bool isDualVp, GalShaderType type) { ShaderConfig config = new ShaderConfig(type, OglLimit.MaxUboSize); ShaderProgram program; if (isDualVp) { ShaderDumper.Dump(memory, position, type, "a"); ShaderDumper.Dump(memory, positionB, type, "b"); program = Translator.Translate(memory, (ulong)position, (ulong)positionB, config); } else { ShaderDumper.Dump(memory, position, type); program = Translator.Translate(memory, (ulong)position, config); } string code = program.Code; if (ShaderDumper.IsDumpEnabled()) { int shaderDumpIndex = ShaderDumper.DumpIndex; code = "//Shader " + shaderDumpIndex + Environment.NewLine + code; } return(new OglShaderStage(type, code, program.Info.CBuffers, program.Info.Textures)); }
private OglShaderStage ShaderStageFactory( IGalMemory memory, long position, long positionB, bool isDualVp, GalShaderType type) { GlslProgram program; GlslDecompiler decompiler = new GlslDecompiler(OglLimit.MaxUboSize, OglExtension.NvidiaDriver); int shaderDumpIndex = ShaderDumper.DumpIndex; if (isDualVp) { ShaderDumper.Dump(memory, position, type, "a"); ShaderDumper.Dump(memory, positionB, type, "b"); program = decompiler.Decompile(memory, position, positionB, type); } else { ShaderDumper.Dump(memory, position, type); program = decompiler.Decompile(memory, position, type); } string code = program.Code; if (ShaderDumper.IsDumpEnabled()) { code = "//Shader " + shaderDumpIndex + Environment.NewLine + code; } return(new OglShaderStage(type, code, program.Uniforms, program.Textures)); }
private OGLShaderStage ShaderStageFactory( IGalMemory Memory, long Position, long PositionB, bool IsDualVp, GalShaderType Type) { GlslProgram Program; GlslDecompiler Decompiler = new GlslDecompiler(OGLLimit.MaxUboSize); int ShaderDumpIndex = ShaderDumper.DumpIndex; if (IsDualVp) { ShaderDumper.Dump(Memory, Position, Type, "a"); ShaderDumper.Dump(Memory, PositionB, Type, "b"); Program = Decompiler.Decompile(Memory, Position, PositionB, Type); } else { ShaderDumper.Dump(Memory, Position, Type); Program = Decompiler.Decompile(Memory, Position, Type); } string Code = Program.Code; if (ShaderDumper.IsDumpEnabled()) { Code = "//Shader " + ShaderDumpIndex + Environment.NewLine + Code; } return(new OGLShaderStage(Type, Code, Program.Uniforms, Program.Textures)); }