mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
softgpu: Transform normals correctly.
This commit is contained in:
parent
c5544eb293
commit
219b35317e
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ void TransformUnit::SubmitPrimitive(void* vertices, void* indices, u32 prim_type
|
|||
data[i].drawpos = DrawingCoords(TransformUnit::ScreenToDrawing(TransformUnit::ClipToScreen(data[i].clippos)));
|
||||
|
||||
if (vreader.hasNormal()) {
|
||||
data[i].worldnormal = TransformUnit::ModelToWorld(data[i].normal);
|
||||
data[i].worldnormal = TransformUnit::ModelToWorld(data[i].normal) - Vec3<float>(gstate.worldMatrix[9], gstate.worldMatrix[10], gstate.worldMatrix[11]);
|
||||
data[i].worldnormal /= data[i].worldnormal.Length();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue