- use normals to have proper light attenuation. So far only implemented for walls and flats. Models are planned but need some thinking about how to efficiently collect all required lights for an object.
This commit is contained in:
parent
2da18bfa56
commit
4eb5f10b02
19 changed files with 122 additions and 24 deletions
|
|
@ -248,6 +248,7 @@ void FVoxelModel::AddFace(int x1, int y1, int z1, int x2, int y2, int z2, int x3
|
|||
FModelVertex vert;
|
||||
unsigned int indx[4];
|
||||
|
||||
vert.packedNormal = 0; // currently this is not being used for voxels.
|
||||
vert.u = (((col & 15) * 255 / 16) + 7) / 255.f;
|
||||
vert.v = (((col / 16) * 255 / 16) + 7) / 255.f;
|
||||
|
||||
|
|
@ -271,6 +272,7 @@ void FVoxelModel::AddFace(int x1, int y1, int z1, int x2, int y2, int z2, int x3
|
|||
vert.y = -z3 + PivotZ;
|
||||
indx[3] = AddVertex(vert, check);
|
||||
|
||||
|
||||
mIndices.Push(indx[0]);
|
||||
mIndices.Push(indx[1]);
|
||||
mIndices.Push(indx[3]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue