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

Implement accurate lighting that honors level-specified values #7

Closed
rherriman opened this issue Sep 10, 2018 · 3 comments
Closed

Implement accurate lighting that honors level-specified values #7

rherriman opened this issue Sep 10, 2018 · 3 comments
Labels
graphics Problems with OpenGL or generally rendering related

Comments

@rherriman
Copy link
Member

From the Avara Level Design Manual:

  // Lights (default light settings are stored here)
  ambient = 0.4
  light[0].i = 0.4  light[0].a =  45  light[0].b = 20
  light[1].i = 0.3  light[1].a =  20  light[1].b = 200
  light[2].i = 0.0  light[2].a =  45  light[2].b = 90
  light[3].i = 0.0  light[3].a =  45  light[3].b = 180

There are four posible light sources in addition to ambient light. To place a lightsource, give it an intensity (the i component) between 0 and 1.0. The two angles indicate the direction that the light is coming from. The b angle is the compass reading and the a angle is the angle from the horizon. All lights are monochromatic white.

avara_frag.glsl should be modified to handle multiple (configurable) directional light sources, and similarly allow the ambient light to be configurable.

avara-3d-math

@assertivist assertivist added the graphics Problems with OpenGL or generally rendering related label Mar 3, 2019
@assertivist
Copy link
Member

  • Geometry shader is in shaders/
  • Shader is loaded in util/AvaraGL.cpp
  • The lighting configuration is loaded to src/bsp/CViewParameters.cpp (the internalLight structs)

@assertivist assertivist added good first issue Good for newcomers and removed good first issue Good for newcomers labels Mar 3, 2019
@rherriman
Copy link
Member Author

rherriman commented May 6, 2019 via email

@assertivist
Copy link
Member

this is probably as close as we're going to get:
image

assertivist pushed a commit to assertivist/Avara that referenced this issue May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphics Problems with OpenGL or generally rendering related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants