mrvux / dx11-vvvv

DirectX11 Rendering within vvvv
Other
71 stars 71 forks source link

ClearDepth Renderer TextureSpread is not clearing Stencil #347

Closed timpernagel closed 6 years ago

timpernagel commented 6 years ago

Seems like the ClearDepth-Toggle is doing nothing at "Renderer TextureSpread ". Looked into the code. In "Renderer TextureSpread" the the depthstencil and dispose is handled pretty differently compared to the TempTarget (where everything works fine). Seems like a more complex code-change to have it working like in TempTarget.

mrvux commented 6 years ago

Indeed, this fixes it https://github.com/mrvux/dx11-vvvv/commit/185578cbb2d2d5db18380b3c22266bd9caf4429d

timpernagel commented 6 years ago

Thanks, will check tomorrow!ヽ(^◇^*)/

timpernagel commented 6 years ago

ezgif-2-a002fdfdc2

Unfortunately the issue is still present. Did a quick screencapture to show you the behaviour. Using the Renderer TempTarget the Stencil is cleared every frame, as it should be. Renderer SpreadTexture is looking like Clear disabled, even though the ClearDepth is enabled.

mrvux commented 6 years ago

Indeed, there was missing stencil flag on clear, this commit adds Stencil https://github.com/mrvux/dx11-vvvv/commits/master

timpernagel commented 6 years ago

Confirmed. Works now like expected. Supercool!

A little offtopic and definitley a feature-request and not an issue, but: Is there a chance to have also an "DX11DepthStencilTextureArray" from the Renderer TextureArray. I'm currently using the Renderer SpreadTexture and build an TextureArray afterwards to use it in a Compute Shader. This conversion from a texture-spread to an texture array is a huge performance-trap. But unfortunately the Depth from the ArrayRenderer has no Stencil...

mrvux commented 6 years ago

Ah in that case it should be that I allow to select format in texturearray renderer (iirc it defaults to D32, which has no stencil indeed)

mrvux commented 6 years ago

This adds format enum in texture array renderer + node to get stencil view out of it https://github.com/mrvux/dx11-vvvv/commit/22a13ed87123b7f75ba71651a2fe6bbb62b0932c

timpernagel commented 6 years ago

This feature just pushed the framerate for the whole simulation from ~55fps to ~110fps. Superb!