softgpu: Storing view coordinates in VertexData is not necessary anymore.

This commit is contained in:
Tony Wasserka 2013-06-29 15:14:19 +02:00 committed by neobrain
parent 3cdf2a789d
commit 72a71702a5
2 changed files with 2 additions and 4 deletions

View File

@ -140,8 +140,7 @@ void TransformUnit::SubmitPrimitive(void* vertices, void* indices, u32 prim_type
if (!gstate.isModeThrough()) {
ModelCoords mcoords(pos[0], pos[1], pos[2]);
data[i].worldpos = WorldCoords(TransformUnit::ModelToWorld(mcoords));
data[i].viewpos = TransformUnit::WorldToView(data[i].worldpos);
data[i].clippos = ClipCoords(TransformUnit::ViewToClip(data[i].viewpos));
data[i].clippos = ClipCoords(TransformUnit::ViewToClip(TransformUnit::WorldToView(data[i].worldpos)));
data[i].drawpos = DrawingCoords(TransformUnit::ScreenToDrawing(TransformUnit::ClipToScreen(data[i].clippos)));
if (vreader.hasNormal()) {

View File

@ -44,7 +44,7 @@ struct VertexData
#define LINTERP(T, OUT, IN) (OUT) + ((IN - OUT) * T)
#define LINTERP_INT(T, OUT, IN) (OUT) + (((IN - OUT) * T) >> 8)
// World and view coords only needed for lighting, so we don't Lerp those
// World coords only needed for lighting, so we don't Lerp those
clippos.x = LINTERP(t, a.clippos.x, b.clippos.x);
clippos.y = LINTERP(t, a.clippos.y, b.clippos.y);
@ -76,7 +76,6 @@ struct VertexData
}
WorldCoords worldpos; // TODO: Storing this is dumb, should transform the light to clip space instead
ViewCoords viewpos; // TODO: Storing this is dumb, should transform the light to clip space instead
ClipCoords clippos;
DrawingCoords drawpos; // TODO: Shouldn't store this ?
Vec2<float> texturecoords;