DirectX Tessellation Function for Triangles
Hi - I have the following simple patch function in DX11, but I keep getting rips, and when I look at the wireframe its clear that adjacent edges are not getting the same tessellation factor. The...
View ArticleWhy are these three methods for determining depth giving me different output?
Hi! I'm a beginner and an amateur, just trying to learn, explore, and play. I'm using MikuMikuDance in conjunction with MikuMikuEffect as an engine in order to explore HLSL (although I'm on the...
View Articlerendering a scene with magnification
rendering a scene with magnification how is it done? a few methods come to mind.... 1. move everything x times closer to the camera, then render as usual. seems pretty easy, given position...
View ArticleTake a screenshot in D3D12
Hi, here the code I used using D3D11 to take a screenshot : CImage CDirect3D11RenderWindow::ScreenShot() const { // Get the back buffer. ID3D11Texture2D* BackBuffer; m_SwapChain->GetBuffer( 0,...
View Article[D3D12] SSAO Demo
Hi community I want to share a new update of my little DirectX 12 rendering engine. I implemented Screen Space Ambient Occlusion and improved camera movement. Post Video Hope you find it useful!
View ArticleQuestion about InterlockedOr
Hey Guys, I recently have a bug in related to atomic operation: void InterlockedAddToUpdateQueue(uint3 u3BlockIdx) { uint uOrig = 1; InterlockedOr( tex_uavBlockStateVol[u3BlockIdx],...
View ArticleMultiple vertex/pixel shaders
This is a pretty basic question, but the HLSL documentation and guides out there are pretty scarce and disappointing... I've learned that vertex and pixel shaders are executed by the graphics...
View ArticleVisual Studio Graphics Analyser problem
Hi Guys, The Visual Studio Graphics Analyser has suddenly given me some weird behaviour. In the event call stack it is only showing the 'present' call. Although the scene is all being rendered...
View Articleuav barrier and atomic operation
Hey Guys, Think about the following case: You have multiple dispatch calls with compute shader which launches tons of threads, and each thread will do an atomic add on the same memory location (same...
View ArticleFence flags
Hi! I can kind of guess what D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER is for but what is the use of D3D12_FENCE_FLAG_SHARED? Is it used for fence shared across different queues? Thanks.
View ArticleHLSL StructuredBuffer usage
Hi, I am a newbie for DirectX and HLSL shader. In my HLSL shader, I would like to use a StructuredBuffer to store a volume data: On GPU: uniform StructuredBuffer<float> _VolBuffer; float...
View ArticleHigh precision texture.
Hello! I´ve been strugling for a while on how to load hight precision textures in DX12. Right now I´ve been using to load my textures "DirectX::CreateDDSTextureFromFile12". There is also the...
View ArticleGenerating a 3D Texture from multiple Pixel Shaders or Compute Shader
I have a program that basically takes an input frame (2D texture) and some a 3d texture and generate a new frame for output. Each output pixel is calculated based on the corresponding input frame pixel...
View ArticlePrevent interpolation of value from VS to PS
Hi, I pass in an array of textures into my shader, with a vertex value ("textureIndex") indicating which texture from the array should be used to paint that particular vertex. If my triangle has...
View ArticleHow to do simple filtering for 3D texture using Pixel Shader
I have a 3D texture and I want to filter each pixel of it. It is rather simple as I only need to read the pixel data for that pixel. So the pixel shader will like this: outcolor = filter_val *...
View Articlevolume rendering
Hi, I have a medical volume data and I would like to learn how to write a HLSL shader to do ray-cast rendering, volume slicing etc. Can anybody provide me some links for this kind of examples? I use...
View ArticleNeed barrier after RTV cleanrendertarget and before actual rendering?
Hey Guys, a quick question: do we need to insert some kind of barrier between RTV clean and actual rendering to the same RTV? It seems we don't need this barrier, but after struggling with a lot...
View ArticleStrange slowdown when model(s) goes off screen
Got a pretty strange issue, perhaps someone recognizes it. I have a model that I created the vertex and index buffers for and that I render using DrawIndexedPrimitive, after that I render a bunch of...
View ArticleGlitches with flip model swap chain
I have a program where I used a bitblt model swap chain (DXGI_SWAP_EFFECT_DISCARD, the default used by most samples), and it worked fine. But now I want to use a flip model swap chain...
View Article[D3D12] Depth Buffer problem (maybe)
Hi, community. I have a bug with Screen Space Ambient Occlusion and I suspect is the depth buffer information I use. Depth Stencil View Format is DXGI_FORMAT_D24_UNORM_S8_UINT Depth Stencil Shader...
View Article