0ad/binaries/data/mods/public/shaders/arb/overlay_solid.vp
Ykkrosh fe3315376c Add BoundingSphere, SOverlaySphere.
BoundingSphere is similar to a bounding box, but more spherical.

SOverlaySphere is useful for visualising BoundingSphere (it's quite
inefficient and should only be used for debug functionality).

Normalise the camera frustum clipping planes, so that IsSphereVisible
gives the correct result.

This was SVN commit r15261.
2014-06-01 18:05:46 +00:00

18 lines
475 B
Plaintext

!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
DP4 result.position.x, state.matrix.mvp.row[0], position;
DP4 result.position.y, state.matrix.mvp.row[1], position;
DP4 result.position.z, state.matrix.mvp.row[2], position;
DP4 result.position.w, state.matrix.mvp.row[3], position;
END