Q1 :
//C++csDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE;csDesc.CPUAccessFlags = 0;csDesc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;csDesc.StructureByteStride = sizeof(data);csDesc.ByteWidth = sizeof(data) * t_Size_X * t_Size_Y;csDesc.Usage = D3D11_USAGE_DEFAULT;
this code aboves creates a buffer, and that is starightforward.
But the only parameter value i find odd is the ByteWidth.
Data in this case is an float4.
why do i do the sizeof(data)*size_X*size_Y?
To specifi that i whant to make an 2d array of floats?
Q2 :
In the hlsl code, where should i put the eoutput?
Q3 :
(this question is related to question one)
If i specify to make a 2d array out of floats.
How do i know in wich element i am calculating right now?
my toughts where that the SV_GroupThreadID semantic would have the eye for that.
Q4 :
How do i read the output values in my cpp code?
(is this possible?)
If you have any good tutorials or any good booktips, let me know!
And thanks for all help.