- use standard sprite lighting for voxels.

Per-pixel lighting requires normals which voxels do not have.

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp
This commit is contained in:
Christoph Oelckers 2018-10-31 12:28:10 +01:00 committed by drfrag666
parent 6aa51b08da
commit 0623a92363
3 changed files with 3 additions and 1 deletions

View file

@ -267,7 +267,7 @@ void GLSprite::Draw(int pass)
if (pass == GLPASS_LIGHTSONLY)
{
if (modelframe)
if (modelframe && !modelframe->isVoxel)
{
if (RenderStyle.BlendOp != STYLEOP_Shadow)
{

View file

@ -515,6 +515,7 @@ void InitModels()
FVoxelModel *md = (FVoxelModel*)Models[VoxelDefs[i]->Voxel->VoxelIndex];
FSpriteModelFrame smf;
memset(&smf, 0, sizeof(smf));
smf.isVoxel = true;
smf.modelIDs[1] = smf.modelIDs[2] = smf.modelIDs[3] = -1;
smf.modelIDs[0] = VoxelDefs[i]->Voxel->VoxelIndex;
smf.skinIDs[0] = md->GetPaletteTexture();

View file

@ -478,6 +478,7 @@ struct FSpriteModelFrame
float angleoffset;
// added pithoffset, rolloffset.
float pitchoffset, rolloffset; // I don't want to bother with type transformations, so I made this variables float.
bool isVoxel;
};
FSpriteModelFrame * FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped);