Tag Info

New answers tagged

1

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 ...


3

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 ...


1

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 ...


0

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


1

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 ...


2

No, there is no restriction to mixing up use shader stages. The crash is being caused either by something specific you're doing incorrectly or a driver bug. Turn on the debug layer or trying using the WARP driver when setting up your D3D context. You can also try running under a graphics debugger; NVIDIA, AMD, and Intel have hardware-specific tools and ...


0

I just tried this with the debug layer enabled and I got the info: D3D11 INFO: ID3D11DeviceContext::DrawIndexed: Element [1] in the current Input Layout's declaration references input slot 1, but there is no Buffer bound to this slot. This is OK, as reads from an empty slot are defined to return 0. It is also possible the developer knows the data will ...



Top 50 recent answers are included