New answers tagged

0

Ok, i didn't read carefully enough the documentations, it states that: q.x = sin(theta/2) * axis.x q.y = sin(theta/2) * axis.y q.z = sin(theta/2) * axis.z q.w = cos(theta/2) so in my case i had to write: D3DXQUATERNION tempRot1(0.0f, sin(XM_PIDIV2 / 2), 0.0f, cos(XM_PIDIV2 / 2));


2

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: https://github.com/Chlumsky/msdfgen If you are interested in how it ...


3

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


0

You don't render a skybox as a "cubemap". You often render objects using a environment cubemap that matches the skybox, but the skybox itself is just rendered with a set of 2D textures. On Direct3D Feature Level 10.0 or later hardware, you can use a Texture2D array with 6 faces as both a cubemap and with another shader as six individual faces. The WIC ...


0

I don't know if you solved the problem, but since I am working with SH I can tell you that the best way to project a cubemap so far is that of Peter Pyke Sloan. Here his paper on SH, he basically sums each contribute from each pixel weighted by some value obtained from its uv (st in opengl) coordinates. And then all coefficients are normalized by a value ...


1

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.


0

You can continue to use the legacy DirectX SDK for Direct3D 9 on Windows 10, but there are a number of caveats: First, there is no Direct3D 9 Debug support on Windows 8.0, Windows 8.1, or Windows 10. That means no helpful diagnostic information in the debug window. The last OS to support Direct3D 9 debugging was Windows 7. Second, if you are using VS 2012, ...


7

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


1

You could rebuild the spears orientation matrix from a direction vector. Good example with dx code is here.. http://stackoverflow.com/questions/4237873/rotate-a-sphere-so-that-its-pole-heads-towards-the-camera/4237921#4237921


2

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



Top 50 recent answers are included