Questions tagged [directxmath]
DirectXMath API provides common linear algebra and graphics math operations to DirectX applications
20 questions
1
vote
1
answer
379
views
How does planar shadow projection interact with perspective projection?
This question is about planar shadows as explained in Frank Luna's DX11 book. The author presents the 4x4 shadow matrix, whose bottom right element is n\$\cdot\$L (where n is the plane's normal and L ...
1
vote
1
answer
368
views
What's the relationship between the actor's pose and shape's pose in PhysX?
I have 2 Meshes and I want to add physics to them. The first is a primitive box, the second is a terrain.
The box and terrain are made with DirectXMath
Using the PhysX library, I made a copy of the ...
0
votes
1
answer
182
views
What is wrong with my terrain lighting?
I've just implemented a simple algorithm to calculate terrain vertex normals and I'm using diffuse and ambient light currently, but for some reason the squares that make up my terrain are visible when ...
-1
votes
1
answer
146
views
Translate code to DIRECTX directxmath
How can i translate the code to directxmath code?
...
0
votes
0
answers
103
views
XMMATRIX performance
Dears,
I am facing a performance problem when I try to access cell 42 and 43 in XMMATRIX define in DirectXMath.h. The frames dropped by 100 FPS.
Here is my code:
...
0
votes
1
answer
2k
views
What exactly does XMMatrixPerspective{L,R}H do?
There are generally three functions to create a perspective matrix in DirectXMath, XMMatrixPerspective{L,R}H, ...
2
votes
1
answer
2k
views
2d Scale width and height based on distance
I'm drawing a health bar on top of each player. I transform 3d position to 2d. I would like to draw it smaller when distance increases. Any simple math for that? Let's say bar width is 30 and height ...
0
votes
1
answer
888
views
Transforming quaternion between coordinate systems [duplicate]
Working in DirectX (with DirectXMath objects): If I have the rotation of an object relative to some coordinate space as quaternion Q, and I have a transformation matrix tx from that coordinate space ...
1
vote
0
answers
153
views
how to debug calculating tangent space
[][]2
there's problem calculating tangent space and look....
it seems there is no problem with UV code and my shader is 100% no problem. I just copy and pasted tutorial code which works well..
I ...
1
vote
1
answer
876
views
Why doesn't TriangleTests::Intersects from DirectXMath work correctly?
I am currently looking through the Introduction to 3D Game Programming with Direct X 11 by Frank Luna and I'm trying to implement the ray-triangle intersections. I already have a ray firing when the ...
0
votes
2
answers
372
views
Is there something similar to XMFLOAT2 that has its operators overloaded?
Since XMFLOAT2 is just a structure, I'm sure it does not have operator overloading which is what I need to make things a lot simpler. Is there something like ...
9
votes
1
answer
182
views
How to clip cut-off using different frustrum than that of original camera? How to cut plane by pyramid shape?
SOURCE : http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Mitchell_LightShafts.pdf
This process is part of creating light draft effect. And I am suggested to do the described process in ...
1
vote
1
answer
2k
views
Difference between column- and row vector matrix multiplication (vector transform)
Let's say we have a 4-by-4 matrix \$A\$ which represents some transformation.
We can use this matrix to transform a vector in two ways.
\$Ax\$ by assuming \$x\$ is a 4-by-1 column vector.
\$xA\$ by ...
4
votes
2
answers
7k
views
Calculate matrix transformation components separately
It is possible to calculate the translation, rotation and scale that were used to build a matrix?
I mean if I have a matrix M can I calculate the rotation, scale, ...
1
vote
2
answers
2k
views
How to rotate camera using mouse?
I'm looking for a basic example of rotating camera using the mouse. the only problem is I'm not sure of how to rotating the camera around it target. should i do this by an algorithm or is there a ...