New answers tagged directx11
The typical way to do it would be to rebuild the instance buffer each frame, akin to a particle system or other dynamic vertex buffer.
No, there is not a simpler way. As you said, you must recreate all sampler objects that are affected by a change. However, it doesn't have to be a lot of work. Typically, you can share a few samplers across many shaders. I typically have a single sampler with trilinear/aniso filtering and repeat addressing, reused for textures across all shaders. If the ...
Applying two normal maps is not that bad. Many games apply multiple normal maps already because they're blending between texture layers (e.g. for terrain), so having a normal map representing the larger displacements and another normal map for fine details is pretty reasonable. Check out Blending in Detail by Colin Barré-Brisebois and Stephen Hill for a ...
The way I usually handle constant buffers is to define a struct in C++ that matches the layout of the constant buffer as defined in HLSL; then I can just create an instance of the struct and fill in the data. You can also create a more data-driven system where you use the offset and size information retrieved from shader reflection. You'll need to allocate ...
If you only care about the artistic effect of the think, you might as well just clear the screen to black and set the scissor testing by hand, before drawing the cinematic frame. See the docs: D3D9, D3D11
The black bars are nothing more than the cleared back buffer. The video is simply being centered and played between these two bars. This effect is known as Letterboxing. The only thing you need to do in DirectX is simply render the video accordingly (vertically aligned). That being said, a lot of the time these bars are shown because aspect ratio of the ...
Top 50 recent answers are included