Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL2: Dlight behavior close to surface #626

Open
WHS-Phoenix opened this issue Dec 1, 2023 · 1 comment
Open

OpenGL2: Dlight behavior close to surface #626

WHS-Phoenix opened this issue Dec 1, 2023 · 1 comment
Labels

Comments

@WHS-Phoenix
Copy link

With cl_renderer OpenGL2 and r_dlightmode 1 or higher, dynamic lights close to or at a surface cause the light to draw extremely dim, while lighting adjacent surfaces. Examples:

Dlight in flight open air:

shot0022

Dlight impacting wall (floor lights, wall lights badly):

shot0021

Dlight impacting floor (wall lights, floor lights badly):

shot0020

Comparison to Quake 2 (Kex Engine):

Dlight in flight open air:

20231130215906_1

Dlight impacting wall:

20231130215859_1

Dlight impacting floor:

20231130215902_1

@zturtleman zturtleman changed the title Dlight behavior close to surface OpenGL2: Dlight behavior close to surface Dec 1, 2023
@WHS-Phoenix
Copy link
Author

WHS-Phoenix commented Dec 30, 2023

Update on this behavior:

In the Quake3e engine, this is a result of a specularity program being run on the dynamic lights.

r_dlightSpecPower "8" yields this when shooting the wall (the light intensity is diminished on the wall surface when the source is near the wall plane).

shot-20231229-203429

r_dlightSpecPower "1" yields the desired result:

shot-20231229-203406

In the Quake3e engine this is controlled by ARB_BuildDlightFP in tr_arb.c, specifically this line:

if ( r_dlightSpecColor->value > 0 )
	strcat( program, va( "PARAM specRGB = %1.2f; \n", r_dlightSpecColor->value ) );

I cannot find an analogue within the IOQuake3 source but the behavior looks to be similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants