update moonworks

main
cosmonaut 2022-01-13 14:35:59 -08:00
parent ff612f5f15
commit 34244d149b
3 changed files with 8 additions and 8 deletions

@ -1 +1 @@
Subproject commit 9df9aaeb3a7f99ef4f269437f2e32ef6e0daab47
Subproject commit a5c8ebfc3ae97dcae3ccbdbe3a5bc920b7dca0a6

Binary file not shown.

View File

@ -55,12 +55,10 @@ namespace MoonWorksTest
raymarchUniforms.resolutionX = windowWidth;
raymarchUniforms.resolutionY = windowHeight;
var textureCommandBuffer = GraphicsDevice.AcquireCommandBuffer();
var uploadCommandBuffer = GraphicsDevice.AcquireCommandBuffer();
woodTexture = Texture.LoadPNG(GraphicsDevice, textureCommandBuffer, "Content/woodgrain.png");
noiseTexture = Texture.LoadPNG(GraphicsDevice, textureCommandBuffer, "Content/noise.png");
GraphicsDevice.Submit(textureCommandBuffer);
woodTexture = Texture.LoadPNG(GraphicsDevice, uploadCommandBuffer, "Content/woodgrain.png");
noiseTexture = Texture.LoadPNG(GraphicsDevice, uploadCommandBuffer, "Content/noise.png");
sampler = new Sampler(GraphicsDevice, SamplerCreateInfo.LinearWrap);
@ -86,7 +84,9 @@ namespace MoonWorksTest
vertices[2].v = 0;
vertexBuffer = new Buffer(GraphicsDevice, BufferUsageFlags.Vertex, 4 * 5 * 3);
vertexBuffer.SetData(vertices);
uploadCommandBuffer.SetBufferData(vertexBuffer, vertices);
GraphicsDevice.Submit(uploadCommandBuffer);
/* Render Pass */
@ -300,7 +300,7 @@ namespace MoonWorksTest
new TextureSamplerBinding(noiseTexture, sampler)
);
var fragmentParamOffset = mainGraphicsPipeline.PushFragmentShaderUniforms(raymarchUniforms);
var fragmentParamOffset = commandBuffer.PushFragmentShaderUniforms(raymarchUniforms);
commandBuffer.DrawPrimitives(0, 1, 0, fragmentParamOffset);
commandBuffer.EndRenderPass();