Tag Info

New answers tagged

0

You rely on uninitialized state. D3D11_VIEWPORT is a POD type, without any constructors or so. In this case, you can get different result each time your app runs. In Debug mode, compilers initialize variables in different manner - they use Magic Debug Values, add guard bytes and much more to check for validity of your code. For instance, if you check values ...


0

Since you have a spherical panoramic photo it isn't too difficult luckily (: Basically what you need to do is make a sphere, texture it with your picture, then render 6 times from the center of the sphere, once with the camera facing each of the directions of the cube. You just need to make sure and give the camera a 90 degree field of view when rendering ...


4

Totally normal thing to do. You can also render your 3D to one render target and your 2D to a different render target and then draw those over each other in a later pass. That lets you do all sorts of fun tricks, like rendering the 3D in a lower and faster resolution while keeping your 2D in a higher and crisper resolution. This sort of thing is also ...


2

DXGI_FORMAT_R32G32B32_FLOAT is not 16 bytes, that's the first problem after a quick look. Either declare it 12 in your layout or specify D3D11_APPEND_ALIGNED_ELEMENT instead. Or Make it DXGI_FORMAT_R32G32B32A32_FLOAT instead depending on your matrix.


0

When creating your vertex buffer, specify D3D11_USAGE_DYNAMIC and D3D11_CPU_ACCESS_WRITE in the buffer description (in Usage and CPUAccessFlags members). This will create you a dynamic vertex buffer, which you can update by ID3D11DeviceContext::Map -ping it, copying data to it and ID3D11DeviceContext::Unmap -ping at the end. Something like this: ...


0

It's called GPU skinning (or a variation of it) Add several uniforms that represent the changes. Then add attributes to the vertices that represent how much they are affected by each change. For example bulging would be going towards the normal vector: outPos = MVP*(pos_in + bulgeFactor * normal * bulgeUniform)


1

Many possible reasons why something would not be rendered but if the difference is only in the matrix, here's some that I think might be most likely: Camera is too far (a triangle of size 1 in distance ~1732 with 45 degree FOV might simply be too small to see) You're looking at the triangle from the other side and culling is enabled (seems a bit unlikely ...


0

It appears there are syntax differences between HLSL for DX9 and DX11. I'm pretty such the above script was written for DX9, so it won't work as-is on DX11. http://stackoverflow.com/questions/2853997/directx-9-hlsl-vs-directx-10-hlsl-syntax-the-same EDIT: After doing research, HLSL is supported both in DX9 and DX11. You generally pre-compile HLSL with ...



Top 50 recent answers are included