Guest User

Untitled

a guest
Dec 12th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public void d()
  2. {
  3. texture = new Texture2D(Renderer.Device, new Texture2DDescription()
  4. {
  5. Width = 1024,
  6. Height = 1024,
  7. MipLevels = 1,
  8. Format = Format.R8_UNorm,
  9. BindFlags = BindFlags.ShaderResource,
  10. Usage = ResourceUsage.Default,
  11. CpuAccessFlags = CpuAccessFlags.None,
  12. OptionFlags = ResourceOptionFlags.None,
  13. ArraySize = 100,
  14. SampleDescription = new SampleDescription(1, 0)
  15. });
  16. texture.Dispose();
  17. }
  18.  
  19. device.ImmediateContext.PixelShader.SetShaderResource(0, texture.srv);
  20.  
  21. device.ImmediateContext.ClearState();
  22. device.ImmediateContext.Flush();
Add Comment
Please, Sign In to add comment