New answers tagged directx11
0
In systems that manage distinct shader types, as opposed to those with uber-shaders, it's extremely helpful to be able to segregate the constant buffers for the different shader types - consider cases where the vertex shader, and it's associated constant buffer remain fixed - however the pixel shader definition alternates between a pure material based ...
6
Because the alternative is worse.
There's a set-constant-buffer function for each major shader type because it is often desirable to have a completely different set of constants for each (and also, because one does not necessarily utilize every type of shader in all scenarios).
It's usually the case that each stage of the shader pipeline does a drastically ...
3
A given shader model exposes a particular set of registers to HLSL; these registers are underlying hardware registers on the GPU, like CPU registers, but have more refined scopes (for example, there are registers dedicated to holding samplers).
Registers are where all your data is stored during the execution of your shader (with the exception of data, like ...
2
You need to make sure that any variable you use within the constant buffer does not cross a 16 byte alignment boundary, or you won't be able to access it from the shader.
For example, you could have a constant buffer that looks like this:
struct constant_buffer
{
XMFLOAT4X4 wvp; // 64 bytes -> 16 byte aligned = OK
XMFLOAT3 position; // 12 ...
0
Registers are a type of storage that is located on a processor, and accessible very rapidly. They are typically substantially smaller, and are used as input and output locations for processor instructions. HLSL provides a method for mapping up data to these registers from the CPU side, to be used within your shader on the GPU. They should be used whenever ...
1
If you set your MiPLevels to 1, and ArraySize to 1, it will just have one miplevel. thats all you do to it. beacuse you cannot simply "disable" mipmaping, since it´s a part of the GPU pipeline.
3
The Effects framework no longer ships and you don't get headers or libs for it. What you do get is the entire source code for it (in e.g. C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11) so you can compile it and link to it yourself.
I expect that this is just provided for use with older programs upgrading to D3D11 however; ...
1
There is no need to initialize a constant buffer with default values, simply ensure you have created it initially by calling CreateBuffer() on the d3d device. You then have to call Map() before you can copy any data into that buffer, and then Unmap() to return control of it to the GPU. It is good practice to initialize object members to default values on ...
0
There are plenty of open source rendering engines that implement direct3d as part of their pipeline. Whether or not it is directx 11 isn't terrible significant, as the rendering architecture overall is what is important, not the specific API calls. Irrlicht and Ogre are just a couple of the rendering engines you can look at. The API is insignificant from a ...
3
You'd use it for stream output (a technique frequently seen in GPU particle systems) and as output from a compute shader stage.
2
First of all, to create this kind of effect you're going to need more than 4 vertices. You can move the vertex positions around all you like, but a shape made with 4 vertices will only ever be a quadrilateral, not a shape with wavy sides like you've shown. You'll have to subdivide the shape vertically, at least, so that it has enough vertices along each ...
2
Yes. Any reference you have to a D3D object needs a Release() call when you're done with it. It doesn't matter whether another object might also have a reference to it. The object will not be deleted until all references to it are gone, so it's safe to Release() the texture as soon as you don't need the pointer to it anymore. If it's also referenced by ...
Top 50 recent answers are included
