I have to wait for my GPU to idle before I can resize.
This code make wait GPU:
for (int i = 0; i < frameBufferCount; i++)
uint64_t fenceValueForSignal = ++fenceValue[i];
if (fence[i]->GetCompletedValue() < fenceValue[i])
Raycasting can do this. Cast a ray from the eye position through the viewing frustum for each pixel. Count the rays that intersect that object. This won't give correct numbers if you're using transparent textures or materials though.
So my approach is
i prepare image that i want to render with mipmap effect in file
create resource of that image(i used CreateWICTextureFromFile)
create an empty texture with mipmap setting.
read data from image and store in cpu
copy that data into texture with mipmapsetting
ID3D11Texture2D* image = TextureMgr::...
One way is capturing a frame with a graphics debugger, such as RenderDoc, Nsight, Visual Studio graphics debugger or something else, search for your texture in the resources window (different names with different programs of course), and see if there are any mip levels. You can also view any specific mip level.
An other way is to sample the texture in a ...
i have found the solution. it looks even so pretty.
should have been edited like
testV.push_back(((XMFLOAT4*)((char*)mappedResource.pData + (y* mappedResource.RowPitch) + (x*sizeof(XMFLOAT4))))->y)
i thought at first time that when i make a 2dTexture(xmfloat4) with WIDTH * HEIGHT, its size will be 16*WIDTH*HEIGHT. But ...
We solved the problem by getting the old version of Unity 5.6, and use dirextx 9 since our program for some reason have to be compatible with Windows 7 32 bit and even some oudated Windows XP. We still do not know about how the issue happened when we used newer vesrsion.
[Alternative Solution] Thanks for help guys.
i just found out with your helps that my idea won't work since the depth in pipeline will be restricted only between 0~1.
Here is my another solution that i figured out. i post it here just in case for someone who need z order system.
i came to modify projection matrix calculation.
and have multiple of it, so ...
When the object is behind the camera, then the z coordinate is negative. The projection matrix uses that negative value and scales it and places it in the w coordinate. Since this is still negative, it will flip every coordinate. You need to clip the triangles before this happens