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

Add Lights Component #59

Merged
merged 37 commits into from
Jun 12, 2022
Merged

Add Lights Component #59

merged 37 commits into from
Jun 12, 2022

Conversation

JamesTKhan
Copy link
Owner

@JamesTKhan JamesTKhan commented Jun 3, 2022

No review expected on this PR due to the size of it.

This PR add a Light Component and lighting overhaul.

  • Lighting overhaul for Directional and Ambient lighting
  • Add new Light Component and accompanying Light Shader which prefixes shaders with additional shader lighting code.
  • Add new Add Component Dialog which only supports Light Components for now.
  • LightComponents are duplicated when duplicating a GameObject
  • Update water shader to fade out water foam over distance, to minimize ugly 1 pixel white lines from a distance.
  • Add new Gizmo feature for displaying decal Icons over objects like Light sources.
  • When max point and spot lights are reached, no more can be added. Will adjust the values as we go, or possibly make these configurable down the road.

Note: With this lighting overhaul (based on OGLDev tutorials) the scene may appear brighter, and you can adjust ambient/directional intensity as needed.

Note: Adding lights on android combined with water does create a noticeable performance hit when tested on a Note 8 phone (2017) but this is expected. Android support is limited right now but optimization could be looked into down the road like a simplified water that uses textures instead of frame buffer reflections.

There are more enhancements I would like to make but this PR is big enough already.

Items left to do

  • Saving of light components
  • Clear gizmos on scene switch
  • handling max point and spot lights
  • Test Windows/Mac/HTML/Android
  • update CHANGES files
2022-06-10.10-40-32.mp4

@JamesTKhan JamesTKhan self-assigned this Jun 3, 2022
@JamesTKhan JamesTKhan linked an issue Jun 3, 2022 that may be closed by this pull request
@JamesTKhan JamesTKhan changed the title (Draft PR) Add Lights Component Add Lights Component Jun 10, 2022
@JamesTKhan JamesTKhan marked this pull request as ready for review June 10, 2022 14:35
@JamesTKhan JamesTKhan merged commit c276c65 into master Jun 12, 2022
@JamesTKhan JamesTKhan deleted the lights-experimental branch June 12, 2022 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Point Lights
2 participants