Skip to content

Commit

Permalink
Added rend-light-wall-angle
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 11, 2003
1 parent 0bcc700 commit a7e9e32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions doomsday/Include/rend_list.h
Expand Up @@ -59,6 +59,7 @@ typedef struct {
#define RLPF_NORMAL 0
#define RLPF_REVERSE 1

extern float rend_light_wall_angle;
extern float detailFactor, detailMaxDist, detailScale;

void RL_Init();
Expand Down
7 changes: 5 additions & 2 deletions doomsday/Src/rend_list.c
Expand Up @@ -187,9 +187,12 @@ extern float maxLightDist;

// PUBLIC DATA DEFINITIONS -------------------------------------------------

int numrlists=0; // Number of rendering lists.
int numrlists = 0; // Number of rendering lists.
boolean renderTextures = true;

// Intensity of angle-based wall lighting.
float rend_light_wall_angle = 1;

// Rendering parameters for detail textures.
float detailFactor = .5f;
float detailMaxDist = 256;
Expand Down Expand Up @@ -275,7 +278,7 @@ void RL_VertexColors(rendpoly_t *poly, int lightlevel, byte *rgb)
{
// Do a lighting adjustment based on orientation.
lightlevel += (poly->vertices[1].pos[VY] - poly->vertices[0].pos[VY])
/ poly->length * 18; // * 16
/ poly->length * 18 * rend_light_wall_angle;
if(lightlevel < 0) lightlevel = 0;
if(lightlevel > 255) lightlevel = 255;
}
Expand Down

0 comments on commit a7e9e32

Please sign in to comment.