mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- fixed translucent voxel rendering.
This commit is contained in:
parent
793aaf242c
commit
35c2d6d14e
2 changed files with 27 additions and 3 deletions
|
@ -144,17 +144,19 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent)
|
|||
}
|
||||
else
|
||||
{
|
||||
state.EnableModelMatrix(true);
|
||||
state.mModelMatrix = rotmat;
|
||||
FHWModelRenderer mr(state, dynlightindex);
|
||||
if (modelframe < 0)
|
||||
{
|
||||
state.mModelMatrix = rotmat;
|
||||
|
||||
auto model = voxel->model;
|
||||
state.SetDepthFunc(DF_LEqual);
|
||||
state.EnableTexture(true);
|
||||
model->BuildVertexBuffer(&mr);
|
||||
mr.BeginDrawModel(RenderStyle, nullptr, rotmat, portalState.isMirrored());
|
||||
mr.SetupFrame(model, 0, 0, 0);
|
||||
model->RenderFrame(&mr, TexMan.GetGameTexture(model->GetPaletteTexture()), 0, 0, 0.f, TRANSLATION(Translation_Remap + curbasepal, palette));
|
||||
mr.EndDrawModel(RenderStyle, nullptr);
|
||||
state.SetDepthFunc(DF_Less);
|
||||
state.SetVertexBuffer(screen->mVertexData);
|
||||
|
||||
|
@ -165,7 +167,6 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent)
|
|||
}
|
||||
state.SetObjectColor(0xffffffff);
|
||||
state.SetVertexBuffer(screen->mVertexData);
|
||||
state.EnableModelMatrix(false);
|
||||
}
|
||||
|
||||
if (translucent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue