3个小时,有些题是需要看图说话的,就不放上来了。
1 use a direction vector toward a target and camera up vector to generation a 3x3 rotation matrix for the camera to aim at the target.
2 explain how to do the u, v value to determine if the point (p) is inside he triangle(A, B, C) using Barycentric coordinates.
P = A + u (C - A ) + v * (B - A)
5 Implement the Total Force in a Spring system with following parameters:
float fStiffness;
float fSpringLength;
float fCompressedLength;
float fDamping;
Vector3 vDirection;
Vector3 vVelocity;
Vector3 vRestringForce;
Vector3 vDampingForce;
Vector3 vTotalForce;
6 Implement the specular highlight Vertex shader for water effect with following parameters:
Vector3 vLightDirection;
Vector3 vEyeDirection;
float4 fSpecularColor;
float2 fPerturbationXY;
float fSpecularPower;
7 Use Inverse Kinematic pseudo to get the tip close to the target.
movement_vector
<---------------@ <- tip
/^\
/ | \ <-- arm
ToTarget / | \
/ | \
target o | @ <-- joint
| /
ToTip | / <-- arm
| /
/
joint -> @ axis coming out of the page
8 if you found the bottleneck in your pixel render part of the game, how to improve Fragment shader performance ? (3D aware)
11 Write a Beer Pong Game in 3D with 6 cup on each side. Keep the code as simple and short as possible.