Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Nov 2010
Offline Last Active Oct 21 2016 11:40 AM

#5117239 [Solved] Terrain tessellation and depth buffer

Posted by on 15 December 2013 - 11:48 PM

Nevermind. I solved this, I didnt see this post http://www.gamedev.net/topic/603052-slimdx-direct3d10-depth-buffer-only-works-backwards/ which prompted me to check my perspective projection matrix. I had the near and far plane's flipped.

#5117206 Increment texture values using render to texture

Posted by on 15 December 2013 - 06:00 PM

Just want to make sure I understand what you are describing so I'll write up a bit of pseudo code.


Texture2D texA = CreateTexture();
Texture2D texB = CreateTexture();
RenderTarget texARTV = CreateRenderTarget(texA);
ShaderResource texASRV = CreateShaderResource(texA);
RenderTarget texBRTV = CreateRenderTarget(texB);
ShaderResource texBSRV = CreateShaderResource(texB);

// then when rendering

// pass 1


//pass 2

... and so on?

#5117193 Increment texture values using render to texture

Posted by on 15 December 2013 - 05:08 PM

As I understand it you cant bind the a texture as a render target and a shaderresource at the same time. How does one typically handle the situation where you want to render to a texture but sample that same texture in the render to texture operation. The reasoning would be if you need to use the previous value in the texture in the new value being written.The only way I could think of was to duplicate your texture and use one as the render target every frame and the other as the resource. Once the render is complete, copy the render target to the resource view.