Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

225 Neutral

About robydx

  • Rank
  1. Solved, it was SamplerFilter.   MinMagMipLinear instead of ComparisonMinMagMipLinear           ?  
  2. Hi, I've created my Render Target in both R8G8B8A8_Unorm and R32G32B32A32_float. No problem. But If I use R32_Float the texture is written (I'm using visual studio graphics debug to see that texture is written) but when I read it in a Shader, the result is always 0.   What' wrong? I create my resource like this ? ClearValue renderTargetOptimizedClearValue = new ClearValue() {    Format = targetFormat,    Color = new Vector4(0, 0, 0, 0) };   renderTarget= Device.CreateCommittedResource(new HeapProperties(HeapType.Default), HeapFlags.None,                     new ResourceDescription(ResourceDimension.Texture2D, 0, width, height, 1, 1, targetFormat, 1, 0, TextureLayout.Unknown, ResourceFlags.AllowRenderTarget), ResourceStates.RenderTarget, renderTargetOptimizedClearValue);   Device.CreateRenderTargetView(renderTarget, null, heapRTV);   ShaderResourceViewDescription desc = new ShaderResourceViewDescription {                 Dimension = ShaderResourceViewDimension.Texture2D,                 Format =  targetFormat,                 Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING }; desc.Texture2D.MipLevels = 1; desc.Texture2D.MostDetailedMip = 0; desc.Texture2D.ResourceMinLODClamp = 0;   Device.CreateShaderResourceView(renderTarget, desc, heapSRV);
  3. Hi, I'm using SharpDx too. Well, how I can see you are using 3 items (2 for textures and 1 constant buffer) in the same RootParameters   so, from any position in your heap, D3D expects this 3 items For example tex1,tex2,constant buffer. If you set offset to 0 D3D will start loading resource from tex1 position.   But if you increase just by one you'll have it starting from tex2 and read like this tex2,constant buffer,???  so you must pay attention. It doesn't seem right.     When you combine many resources in one RootParameter you must pay attention that items are in the right number and order.   I've published some demo in SharpDx on Github   https://github.com/RobyDX/SharpDX_D3D12HelloWorld and I've a website too (http://www.notjustcode.net) where I've started Direct3D12 tutorial using SharpDx. It's in italian but you can try to translate with bar I've added?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!