Questions tagged [directx11]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
14 votes
4 answers
1k views

Projected grid water horizon detail

I'm trying to implement an ocean scene with C++ and DirectX11. Currently I have a projected grid, Gerstner waves and a basic shading. My problem is that when I aim my camera horizontally, so I can see ...
Gábor Szalóki's user avatar
11 votes
1 answer
352 views

Do the alignement and declaration order of uniforms matter?

In the section 6.4 Constant Buffers of the book Practical Rendering & Computation with Direct3D 11 (pages 325, 326) it is mentioned: By default, the HLSL compiler will attempt to align ...
Julien Guertault's user avatar
10 votes
1 answer
2k views

Is it possible to alpha blend multiple render targets using a specified alpha?

Say I have render targets 0 through N and RT 0 happens to have in its fourth component an alpha channel specified by a material or mask or something. Is it possible to have the hardware compositor ...
jeremyong's user avatar
  • 267
7 votes
1 answer
562 views

Does prerendering actually help performance?

In PC game development, after loading models, textures, shaders, etc in a loading screen, some games will render the models once to an off screen target to make sure the driver and gpu have done all ...
Alan Wolfe's user avatar
  • 7,801
7 votes
2 answers
4k views

Physically Based Area Lights

So after reading https://www.guerrilla-games.com/read/killzone-shadow-fall-creating-art-tools-for-a-new-generation (a guerilla games presentation on PBR) I noticed the Area lights as opposed to the ...
Arjan Singh's user avatar
  • 2,511
7 votes
1 answer
2k views

What's the difference between Sample and tex2D

I am mainly using Unity but I think that it's not related to this engine, and I am wondering what's the difference between using tex2D and ...
MaT's user avatar
  • 1,229
7 votes
1 answer
986 views

HLSL Deferred Rendering

I've recently made the switch to Visual 2015 and the .fx files have been depreciated. My project contained .fx files for the shaders so I've been switching over. Only during the switch have I changed ...
phatgreen's user avatar
  • 141
7 votes
0 answers
142 views

Injecting Virtual point lights into 3D Grid

I am currently trying to implement light propagation volumes in DirectX 11 and I have already done the RSM part which contains position, normal, depth and flux map generation. But for Injecting ...
user3059485's user avatar
6 votes
2 answers
825 views

Why did tessellation come to be a prominent feature?

Tessellation has been touted as one of the major features in newer graphics APIs like DirecX 11, and it is shown as a standalone stage in a modern graphics pipeline. Compared to the amount of ...
ApoorvaJ's user avatar
  • 597
5 votes
2 answers
3k views

Books to learn Ray Tracing [closed]

Recently I have developed and interest in Ray Tracing and like most computer graphics tutorials online there is nothing regarding implementation for a beginner like myself. So far I have only done ...
Arjan Singh's user avatar
  • 2,511
5 votes
1 answer
3k views

Bloom in DirectX

How can I make an object give the effect that it is giving out light when it isn't? I basically want to make an object glow, for example Neon Lights. Also Area Lights in my engine work properly but to ...
Arjan Singh's user avatar
  • 2,511
5 votes
2 answers
150 views

Problem with Basic Diffuse Lighting

So recently I have been learning how to implement Diffuse Lighting in DirectX and I have done so with the following code: ...
Arjan Singh's user avatar
  • 2,511
5 votes
1 answer
222 views

Error with tube lighting

I have recently been working on area lights for a small open source game engine called Urho3D but have run into an issues when rendering tube lights where the lights look the same as sphere lights ...
Josh Nuttall's user avatar
4 votes
0 answers
306 views

Direct3D Global Atomic Issue

Recently I ran into an odd issue with some of my DirectX11 DirectCompute code when trying it on an AMD GPU for the first time where as on a NVIDIA one it had worked fine all through development. The ...
Lemon Drop's user avatar
4 votes
0 answers
81 views

Drawing "after" Present to achieve better performance

I had an application that was originally single threaded and worked as follows: gather the items to be drawn (occlusion / frustrum culling / sorting into batches) draw items using an immediate ...
default's user avatar
  • 333
3 votes
1 answer
3k views

What are Jittering and Dithering

I've heard a lot about jittering and dithering but I would like to know more about those techniques, especially when used to avoid visible sampling in a fragment shader. What are the differences ...
MaT's user avatar
  • 1,229
3 votes
1 answer
2k views

VR stereo rendering with Instancing

I have been reading this paper by Timothy Wilson Fast Stereo Rendering for VR and it would suit our game engine (DirectX 11) to use this method of stereo rendering. I have managed to get the game ...
Garry Wallis's user avatar
3 votes
1 answer
632 views

Trading off instancing for render order

I've been doing some searching online and it seems like I could improve my renderer by ordering my draw calls based on depth. For opaque objects render the closest items first and move backward in ...
JHall's user avatar
  • 57
3 votes
1 answer
746 views

Why don't Direct3D/Metal support texture swizzles?

To be clear, I'm talking about behavior like https://www.khronos.org/opengl/wiki/Texture#Swizzle_mask, not "normal" myColorVariable.rbgr swizzling in a shader. I ...
Matt Haynie's user avatar
3 votes
1 answer
2k views

Buffer of arrays in HLSL compute shader

I'm trying to follow along with a tutorial that uses an OpenGL compute shader, but I'm using D3D11. What they do is: ...
slanden's user avatar
  • 133
3 votes
1 answer
330 views

D3D11 Map forces synchronization

Is it possible that a call to ID3D11DeviceContext::Map on a dynamic vertex buffer with D3D11_MAP_WRITE_DISCARD causes my ...
leone ruggiero's user avatar
3 votes
0 answers
71 views

Profile GPU performance in Direct3D 11

I'm trying to profile a d3d11 application using queries (pretty much exactly as described here). I noticed something strange with the data I was getting from the queries and I think I managed to ...
leone ruggiero's user avatar
3 votes
0 answers
66 views

Intel UHD extremely slow copy operations

Is there a way to make copy operations such as CopyResurce(d3d11) and glBlitFramebuffer(ogl) on multi-sample resources faster ...
leone ruggiero's user avatar
3 votes
0 answers
283 views

What are some good examples of post-processing edge detection?

I'm trying to implement a post-processing pass to detect silhouette-edges from depth data. (by silhouette-edge of a triangles mesh I mean the triangle edges shared by a front and a back-facing ...
leone ruggiero's user avatar
3 votes
0 answers
80 views

D3D11 MultisampleEnable and AntialiasedLineEnable affecting line rendering

Microsoft D3D11 documentation for D3D11_RASTERIZER_DESC structure writes: The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render ...
leone ruggiero's user avatar
3 votes
0 answers
547 views

Can you disable strip cutting (AKA primitive restart) on Direct3D 11?

Line strips and triangle strips are drawing modes supported across 3D graphics APIs, such as OpenGL, Direct3D, and Vulkan. When using indices to control drawing, a more recent feature is "strip ...
Roger Sanders's user avatar
2 votes
3 answers
238 views

Trouble Finding Simple 2D DirecX11/HLSL Issue

Some possible things that might be the issue and could be explained by someone who is knowledgeable Order of my indices, In all I've read, your array of indices for a triangle list is just clockwise ...
phatgreen's user avatar
  • 141
2 votes
1 answer
826 views

mipmap selection process

I wished to understand which mip map in the chain of mips is selected upon sampling a texture.Which factors it depends on.I know that it depends on the area of the texture visible. I tried a simple ...
VersesDev's user avatar
  • 129
2 votes
1 answer
135 views

D3D11 Gpu profiling with queries accuracy

I'm using queries to profile my Direct3D renderer. What precision and consistency should I expect from them? Those are some values for a full-screen draw I do each frame as an example: ...
leone ruggiero's user avatar
2 votes
1 answer
890 views

Downscaling texture via mipmap [DirectX 11]

I am implementing a post-processing effect in my DirectX 11 pet renderer. The post-processing pass is implemented by rendering a full-screen quad covered with texture containing original rendered ...
ivokabel's user avatar
  • 1,464
2 votes
1 answer
330 views

R16_FLOAT, SampleCmp and CheckFormatSupport

I want to use PCF shadow map on my d3d11 app. My shadow map is an R16_FLOAT texture. When I use SampleCmpLevelZero it didn't give a correct result. After enabling debug layer, it shows: The Shader ...
ACskyline's user avatar
  • 115
2 votes
0 answers
47 views

Multipass Rendering Vertex Buffer Organisation

I am working on a Renderer that should do a Depth Prepass before rendering the desired geometry. For this I have a Vertex and Pixel Shader that outputs to the Depth Texture. After that it should ...
user avatar
1 vote
1 answer
634 views

Is `groupshared` memory stored in L2 cache of GPU?

The article says that L1 cache is shared by work items in the same work group(aka. SM) and L2 cache is shared by different work groups. In Direct3D, it seems that a thread group (which is specified ...
Cu2S's user avatar
  • 167
1 vote
1 answer
488 views

How do you loop through the contents of a buffer in DX11?

Okay, so I'm currently using the IAGetVertexBuffers() method and I'd like to loop through some of the returned buffers to verify the contents. However, I'm kind of new to DirectX and C++ in general. I ...
junfanbl's user avatar
  • 113
1 vote
1 answer
927 views

what is the range for NDC coordinates to be visible in directx

Hi I have a confusion in dx pipeline what is the range for a vertex to be visible? Generally for a vertex to be visible vertex shader position output must be within -1 to 1 for both x & y ...
VersesDev's user avatar
  • 129
1 vote
3 answers
383 views

what is the output from rasterizer

what exactly does the rasterizer outputs as per my knowlage it outputs primitives rasterized as fragments which seems correct as the next step in vulkan/opengl is fragment shader but dx confuses me ...
VersesDev's user avatar
  • 129
1 vote
1 answer
236 views

ShadowMap peter-panning and wrong direction

I am creating Forward-Rendering DX11 engine and I have some troubles with shadow-mapping algorithm as it doesn't work as supposed. As you can see - shadow is peter-panning and looks totally not ...
DirectX_Programmer's user avatar
1 vote
0 answers
71 views

Imprecise TEXCOORD interpolation of a screen quad in DirectX

I was debugging with RenderDoc an issue on an app based on Directx11 and 12 that draw screen space quads to perform various baking steps. These baking steps just render a quad in clip space without ...
Michele M.'s user avatar
1 vote
0 answers
252 views

OpenGL/D3D11 offscreen render multiple buffering

Recently I've been looking at Vulkan, and one thing that I noticed is that the application is responsible for choosing which buffer to render to in the case of multiple buffering. This got me thinking:...
Botond Máté's user avatar
1 vote
0 answers
115 views

Cannot use variable as texture sample value - HLSL DirectX11

I ran into strange problem. My HLSL VS won't compile for given lines: ...
DirectX_Programmer's user avatar
1 vote
1 answer
129 views

Optimisation of Geometry Pass

I'm trying to optimize a geometry pass for a game using dx11 and deferred rendering. (All test are performed on Nvidia GTX 1060 at fixed clock rate) After profiling with NSight it seems to have very ...
trfd's user avatar
  • 11
1 vote
0 answers
43 views

Texture2DMS slice access and bandwidth saving

Can we cut bandwidth by N (for N×MSAA) if we access only one slice of a multisampled texture in a shader ? I'm thinking of ...
v.oddou's user avatar
  • 623
0 votes
1 answer
322 views

Weirdly looking diffuse irradiance map

I have problem with creating diffuse irradiance map. As reference I am using https://learnopengl.com/PBR/IBL/Diffuse-irradiance and https://github.com/TheEvilBanana/PhysicallyBasedRendering/blob/...
DirectX_Programmer's user avatar
0 votes
1 answer
938 views

XMMatrixPerspectiveFovLH is broken?

I've been trying to build a simple DirectX renderer from the ground up (was an OpenGL guy before but i figure it's good to know different APIs). I've been following the guide at rastertek.com to learn ...
russ's user avatar
  • 2,392
0 votes
0 answers
51 views

Direct3D11 4x MSAA enabled - still looking bad

I'm rendering a simple triangle using Direct3D11 and I'm seeing a very visible staircase pattern despite enabling 4x MSAA with quality level = 16 on the swap chain (I'm not even using any depth/...
Ivan Ivanov's user avatar
0 votes
0 answers
37 views

AMD GPU specific triangles disappearing by subsequent draw calls in same frame

we have a Windows/DirectX11 2D Renderer that paints textured triangles to the screen from back to front. There is no face-culling or depth test activated. Now on AMD GPUs it happens randomly that an ...
user20154's user avatar
0 votes
0 answers
51 views

Hlsl Texture2d array that can be accessed using a variable index

I have tried ...
t3rminal's user avatar
0 votes
0 answers
131 views

void* D3D11_MAPPED_SUBRESOURCE::pData to OLE_COLOR* possible?

I have found the following from this link enter link description here pData Type: void* Pointer to the data. When ID3D11DeviceContext::Map provides the pointer, the runtime ensures that ...
Tajuddin Khandaker's user avatar
0 votes
1 answer
472 views

SSAO - artifacts appearing

I am trying to implement SSAO using DirectX11 but instead I got white screen with few black dots on model. My suspect is that kernel generation or usage might be wrong. I've tried changing order of ...
DirectX_Programmer's user avatar
0 votes
0 answers
986 views

How to properly release directx com objects

This one I am not getting even one bit. I started learning directx11 and using the basic dx initialization i tried a experiment by allowing an option to destroy the window and creating it again ...
VersesDev's user avatar
  • 129