mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-18 21:27:52 +00:00
softgpu: Implement per-light ambient lighting.
This commit is contained in:
parent
48d75dafcb
commit
0bf4956dfc
@ -70,6 +70,12 @@ void Process(VertexData& vertex)
|
||||
}
|
||||
}
|
||||
|
||||
// ambient lighting
|
||||
Vec3<int> lac = Vec3<int>(gstate.getLightAmbientColorR(light), gstate.getLightAmbientColorG(light), gstate.getLightAmbientColorB(light));
|
||||
vertex.color0.r() += att * spot * lac.r() * mac.r() / 255;
|
||||
vertex.color0.g() += att * spot * lac.g() * mac.g() / 255;
|
||||
vertex.color0.b() += att * spot * lac.b() * mac.b() / 255;
|
||||
|
||||
// diffuse lighting
|
||||
Vec3<int> ldc = Vec3<int>(gstate.getDiffuseColorR(light), gstate.getDiffuseColorG(light), gstate.getDiffuseColorB(light));
|
||||
Vec3<int> mdc = (gstate.materialupdate&2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user