Questions tagged [direct3d]

22 questions
12
votes
2 answers

Is there any reason to prefer Direct3D over OpenGL?

So I was reading this, I sort of got the reason why there are a lot more games on Microsoft windows than on any other OS. The main issue presented was that Direct3D is preferred over OpenGL. What I don't understand is why would any developer…
user3437
12
votes
4 answers

Does it matter whether I learn OpenGL or Direct3D?

Are the differences between these two APIs minor implementation details that mean once I have learned one I can use it for everything? Or are there reasons for learning one rather than the other if I want to be able to use it in general without…
10
votes
1 answer

Screen capture of game video

I'd like to "hook" into a running game, say Mario Bros, and capture each frame rendered... saving that frame to an image file. A good example of something similar is FRAPS. --Note: I don't want to capture the whole screen/desktop. I want to capture…
pookie
  • 269
  • 2
  • 7
7
votes
1 answer

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 the work required to keep there from being a hitch…
Alan Wolfe
  • 7,711
  • 3
  • 29
  • 72
3
votes
0 answers

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 cutting", also called "primitive restart", whereby a…
3
votes
1 answer

Flexible Vertex Format Constants in Direct3D 11

How do you migrate Flexible Vertex Format Constants (or FVF codes) from DirectX 9 to Direct3D 11? Old code: #include struct Vertex { public: Vertex() : p(D3DXVECTOR3(0.0f, 0.0f, 0.0f)), n(D3DXVECTOR3(0.0f, 0.0f, 0.0f)), tu(0.0f),…
Matthias
  • 1,044
  • 9
  • 25
3
votes
1 answer

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 application to wait for something ? I'm using a dynamic buffer to draw my UI and I noticed a strange behavior when drawing a…
3
votes
0 answers

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 targets (that is, render targets with sample…
2
votes
1 answer

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 Resource View in slot 1 of the Pixel Shader unit is…
ACskyline
  • 105
  • 6
2
votes
1 answer

Image saved as DDS with 16f format in photoshop has strange FOURCC text

I am analyzing the hex code for DDS files which are compressed via Nvidia's dds plugin in photoshop. I noticed something strange when having a 16 bit float file. This is the dialog: When I look at the header of this file it appears to not follow…
Samuel
  • 123
  • 3
2
votes
1 answer

Why does DirectX use COM pointers and interfaces?

I have a rudimentary understanding of COM and I know that its main purpose is to enable interoperability between programs written in different languages. However I dont understand why that is useful to the DirectX api. Is it because DirectX has to…
mbl
  • 291
  • 1
  • 8
2
votes
1 answer

Artifacts in omni light shadow mapping

Spotlight My spotlight's intensity is cut off at a distance of 3 and at an angle of $\pi/4$ radians (umbra angle). The corresponding light camera has a near plane at a distance of 0.1, a far plane at a distance of 3, an aspect ratio of 1 and a…
Matthias
  • 1,044
  • 9
  • 25
2
votes
1 answer

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: |Full-Screen shader: 714.16 us |Full-Screen shader: 709.72…
2
votes
0 answers

AO Denoise Filter

I'm trying to implement a filter to denoise ambient occlusion data. What kind of filter do you suggest for the purpose? The techniques I've come across are the following: Gaussian filter (doesn't preserve edges) Bilateral/Joint Bilateral filter…
1
vote
0 answers

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: since one of the benefits of multiple buffering…
1
2