stride
stride copied to clipboard
How to generate shader source from material as text?
Hello, For educational purposes i want to create material and then generate shader source as text and read this text. How can I do that? I tried to read shader files from repository but it is difficult.
I started with something like that but I failed. This snipper returns null ;/
var context = new MaterialGeneratorContext(material, GraphicsDevice);
context.Step = MaterialGeneratorStep.GenerateShader;
context.PushLayer(null);
context.PopLayer();
var source = context.ComputeShaderSource(MaterialShaderStage.Vertex);