Tag Info

New answers tagged

1

If you use same semantic for SemanticName, then you need to increase number for SemanticIndex. I also see that you are increasing InputSlot. This may be correct or not depending on how your data is layed out. If you really have 4 vertex streams (vertex buffers) then it's fine, but I assume that your instance transform is stored in one vertex buffer. Then ...


0

You're already using bone transforms. I suggest you read up on bone animation in blender. You can create a chain of bones that represent arms, holding the bat, and animating that in blender. Then just export the model, including the animations, and you can use the bone animation you made yourself. Download blender and follow this tutorial: ...


0

You can make objects appear smaller or larger simply by moving the camera further or closer to them, so you will need to change the view matrix. However, since the numbers you are dealing with are potentially large, be sure to also fix the projection matrix for the near and far clipping plane values. Finally, note that astronomy pictures are often taken ...


1

To calculate perspective projection divide by w. vec4 result = vec4(x, y, z, 1) * perspective_view_model_matrix; result /= w; You are then left with the (x,y) in screen space (-1 to 1). Multiply this by 1/2 screen width,height and you get pixel coordinates. You then need to take the corresponding vertex UVs, multiply by the texture size and you get ...


3

The value is for Homogeneous Coordinates. Using homogeneous coordinates makes it possible to use things like quaternions and projection matrices. The last entire row is actually for dealing with homogeneous coordinates. Essentially, the coordinates transformed by a 4x4 matrix will be a 4x1 vector, with (X,Y,Z,W) components. The final values of (X,Y,Z) are ...



Top 50 recent answers are included