11
votes
Accepted
How is this lantern glow effect achieved?
My best guess right now is that it's a billboarded transparent sprite, which is animated to give it a pulsing effect.
Exactly that. This is simple enough even for older hardware. There's also some ...
7
votes
Accepted
How does the following code generate a full screen quad?
it doesn't generate a quad, instead it generates a fullscreen triangle.
The outputs end up as:
...
6
votes
Accepted
Why do a lot of games use DirectX9
The vast majority of game developers today don't deal with graphic APIs like DirectX, OpenGL, Mantle or Vulkan directly. They delegate that to a library or game engine, so they can focus on the fun ...
5
votes
Accepted
Why are committed resources better than placed resources?
You will get contradicting suggestions from their own: http://developer2.download.nvidia.com/assets/gameworks/downloads/regular/GDC17/DX12CaseStudies_GDC2017_FINAL.pdf
Page 14: "Sub-allocation ...
4
votes
Why would a game developer choose Direct3D instead of something with more cross-platform support?
This is a rather broad question & the specific answer will vary from one situation to the next. Here are some general reasons:
It takes less time, money & expertise to develop & support a ...
4
votes
Special Texture Stretching without deformation
So, essentially what you're looking for is 9 Slice Scaling. However that's only good for stretching out a texture so the edges and corners remain undeformed (sort of).
The corners are 1:1 in both ...
4
votes
Why would a game developer choose Direct3D instead of something with more cross-platform support?
The answers in this thread all make good points that play into this decision, but a few more things to consider:
Windows comes with DirectX built-in and the driver certification includes Direct3D ...
4
votes
Are DirectX coordinates spaced out in meters?
They are just Units
The units in DirectX (or OpenGL for that matter) does not correspond to any physical measure.
For consistency and your mental health, you can define them to be whatever unit you ...
4
votes
Accepted
HLSL MipMap sampling in pixel shader
Sample calculates the mip level to sample based on screen space derivatives of the texture coordinates provided. Derivatives of texture coordinates can be computed as follows:
...
4
votes
Accepted
How do game engines implement multiple rendering platforms?
Most game engines will have a layer between their rendering abstraction and the actual rendering API. In Unreal and Qt this is called the Rendering Hardware Interface, or RHI. I'm not sure if the ...
4
votes
Can I use DirectXTK12 commercially?
From the license posted in the DirectXTK12 repo:
microsoft/DirectXTK12 is licensed under the MIT License:
A short and simple permissive license with conditions only requiring preservation of ...
3
votes
Can I use DirectX with C#?
In 2023, this question is still one of the most prominent search engine results when typing "DirectX C#". Therefore, here is a renovated answer:
Since 2013, the answers to that question have ...
3
votes
Why would a game developer choose Direct3D instead of something with more cross-platform support?
Because this is not actually as important as you seem to think it is
OpenGL (or Vulkan) is not a magic bullet for cross-platform support; in fact supporting multiple rendering APIs on different ...
3
votes
Accepted
Left-handed version of the reversed depth projection with infinite far plane
Well, I feel stupid now. Turns out I had to use a positive 1 in the last member of the third row instead of the -1 displayed in ...
3
votes
Accepted
Pros and cons of loading DirectX DLLs directly?
If the DLLs are loaded using a .lib your game will fail to launch if the DLLs are missing.
Loading DLLs using LoadLibrary lets you display a friendlier message on ...
3
votes
Accepted
Why do these DirectXMath functions seem like they return column-major matrics?
You posted a column-major version of the translation matrix for (1,1,-1):
1.0 0.0 0.0 1.0
0.0 1.0 0.0 1.0
0.0 0.0 1.0 -1.0
0.0 0.0 0.0 1.0
...
3
votes
Accepted
error X4016: SV_InstanceID semantic cannot be used with 10Level9 targets
TL;DR: Edit your shader compilation to use Shader Model 5.1 or later.
With the DirectX 12 API, there is no supported device to date that supports anything less than Direct3D Feature Level 11.0. ...
3
votes
Synchronizing with monitor refreshes without vsync
In OpenGL you can control the swap interval of your application, which will limit the frame swap to the refresh rate of the monitor (v-sync). However, the user can override this by disallowing ...
3
votes
DirectX11 creating input layout throws error on input signature not matching shader (instancing)
The problem was I was not calculating the number of elements in the CreateInputLayout call. It was fixed at 2 elements.
Incorrect
...
3
votes
Accepted
Texture does not draw with ATI Radeon RX, but does with NVIDIA/no GPU
I can see that you're checking the HRESULTs returned from D3D functions in some cases (but not all of them), and where you're checking them you just silently handle the error. I'd suggest adding debug ...
2
votes
Rendering only a part of the screen in high detail
Yes, Foveated Rendering utilizes eye tracking to only render what the user is looking at in high detail. Everything else, can be rendered in lower detail.
While it's fairly obvious when looking at a ...
2
votes
Run Simple HLSL Pixel Shader with DirectX 9
Since this question has been viewed 1000 times, I might as well post a follow-up.
This is the code I ended up with, processing Avisynth video scripts through pixel shaders.
https://github.com/...
2
votes
Unwanted darkening at polygon edges when using normal maps with SSAO
This is something of a cold case, but I thought I'd take a crack at it.
My answer to the original question "Is there anything obvious wrong with the normals?" is that there does appear to be ...
2
votes
Problem Rendering a Wireframe Cube and Grid with DirectX 11
D3D11_INPUT_ELEMENT_DESC inputElementDesc[] =
{
{"POSITION",0,DXGI_FORMAT_R32G32_FLOAT,0,0,D3D11_INPUT_PER_VERTEX_DATA,0}
};
You need to change the format to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
directx × 1070c++ × 310
directx11 × 208
hlsl × 149
opengl × 147
shaders × 131
directx9 × 74
c# × 64
sharpdx × 58
xna × 57
textures × 54
rendering × 52
3d × 50
graphics × 45
directx10 × 38
graphics-programming × 27
windows × 26
slimdx × 26
2d × 25
directx12 × 25
optimization × 24
matrix × 23
fragment-shader × 23
glsl × 21
lighting × 21