mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 00:41:19 +00:00
- Fixed: the OpenGL renderer ignored the VisibleToTeam/Class properties.
- Updated the software shader with Korshun's latest version. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1498 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
4485382bea
commit
766b0d5713
2 changed files with 15 additions and 3 deletions
|
@ -444,8 +444,11 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
|
|||
// don't draw the thing that's used as camera (for viewshifts during quakes!)
|
||||
if (thing==GLRenderer->mViewActor) return;
|
||||
|
||||
// invisible things
|
||||
if (thing->sprite==0) return;
|
||||
// Don't waste time projecting sprites that are definitely not visible.
|
||||
if (thing == NULL || thing->sprite == 0 || !thing->IsVisibleToPlayer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (thing->renderflags & RF_INVISIBLE || !thing->RenderStyle.IsVisible(thing->alpha))
|
||||
{
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
|
||||
// Changing this constant gives resuluts very similar to changing r_visibility.
|
||||
// Default is 232, it seems to give exactly the same light bands as software renderer.
|
||||
#define DOOMLIGHTFACTOR 232.0
|
||||
|
||||
|
||||
#ifdef DYNLIGHT
|
||||
|
||||
// ATI does not like this inside an #ifdef so it will be prepended by the compiling code inside the .EXE now.
|
||||
|
@ -50,8 +55,12 @@ float R_DoomLightingEquation(float light, float dist)
|
|||
|
||||
float min_L = clamp(36.0/31.0 - L, 0.0, 1.0);
|
||||
|
||||
// Fix objects getting totally black when close.
|
||||
if (dist < 0.0001)
|
||||
dist = 0.0001;
|
||||
|
||||
float scale = 1.0 / dist;
|
||||
float index = (59.0/31.0 - L) - (scale * 232.0/31.0 - 232.0/31.0);
|
||||
float index = (59.0/31.0 - L) - (scale * DOOMLIGHTFACTOR/31.0 - DOOMLIGHTFACTOR/31.0);
|
||||
|
||||
/* result is colormap index (0 bright .. 31 dark) */
|
||||
return clamp(index, min_L, 1.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue