Hot answers tagged


I would guess that they've scaled and shifted their outputs into the range from 0f to 1f (0-255) for the purpose of that greyscale height visualisation. They probably omitted that adjustment from the formula because it's not critical to the shape they're describing with the normal map. Try multiplying the result by something in the neighbourhood of 0.5f ...


Release does not return an HRESULT, it returns a ULONG. That ULONG is the new reference count on the object (after the release). hr == S_FALSE in your code because Release is returning 1 (which is what S_FALSE is defined as), which means there's one pending reference count to the object after you release it (that's not necessarily a problem, it could be an ...


I have solved this exact problem for my master's thesis over a year ago and have already talked about it here. Yesterday, I released an open source program with my multi-channel distance field construction algorithm, msdfgen, which you can try out right now. It is available on GitHub: If you are interested in how it ...


Turns out that setting the oblique projection was pretty straight forward. To make it work on D3D11, the oblique projection should be composed by two matrices: P(α,θ) = S(α,θ) * M_orth where M_orth is an orthographic projection matrix and S(α,θ) the shear matrix given by: S(α,θ) = | 1 0 0 0 | | 0 1 0 0 | | a b 1 0 | ...


Ok, I found what was wrong. Nsight have problem with stencil buffer on dx12. Every thing works, only Nsight doesn't show correct data for depth/stencil buffer.


You could rebuild the spears orientation matrix from a direction vector. Good example with dx code is here..

Only top voted, non community-wiki answers of a minimum length are eligible