Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void d()
- {
- texture = new Texture2D(Renderer.Device, new Texture2DDescription()
- {
- Width = 1024,
- Height = 1024,
- MipLevels = 1,
- Format = Format.R8_UNorm,
- BindFlags = BindFlags.ShaderResource,
- Usage = ResourceUsage.Default,
- CpuAccessFlags = CpuAccessFlags.None,
- OptionFlags = ResourceOptionFlags.None,
- ArraySize = 100,
- SampleDescription = new SampleDescription(1, 0)
- });
- texture.Dispose();
- }
- device.ImmediateContext.PixelShader.SetShaderResource(0, texture.srv);
- device.ImmediateContext.ClearState();
- device.ImmediateContext.Flush();
Add Comment
Please, Sign In to add comment