mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
- 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:
parent
6aa51b08da
commit
0623a92363
3 changed files with 3 additions and 1 deletions
|
@ -267,7 +267,7 @@ void GLSprite::Draw(int pass)
|
|||
|
||||
if (pass == GLPASS_LIGHTSONLY)
|
||||
{
|
||||
if (modelframe)
|
||||
if (modelframe && !modelframe->isVoxel)
|
||||
{
|
||||
if (RenderStyle.BlendOp != STYLEOP_Shadow)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue