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

Fake Additional Lights #180

Closed
16 tasks done
Delt06 opened this issue Dec 19, 2023 · 0 comments · Fixed by #184
Closed
16 tasks done

Fake Additional Lights #180

Delt06 opened this issue Dec 19, 2023 · 0 comments · Fixed by #184
Labels
Lighting/Shadows Lighting, shadows, GI, etc. Performance Shader Graph Relates to Unity's Shader Graph support
Milestone

Comments

@Delt06
Copy link
Owner

Delt06 commented Dec 19, 2023

Similar to blob shadows, this should draw additional lights into a separate low-res texture.
As an authoring tool, we can still use the built-in light component.

Pass a uniform light array (can't use the already existing one since it assumes the usual additional lights are disabled).

Create a shader graph sub graph:

  • Takes albedo and occlusion value, outputs the color sample, to be plugged into the emission field.
  • Idea: input blob shadow samples into the occlusion value

Support several light types:

  • Point
    • Tighter meshes based on plane/sphere section radius
  • Spot?
    • Tighter meshes for spot lights: won't do, vertex shader will be too complicated if we want to keep it tigher than the quad approach
  • Distance fade
  • Height fade
  • Optionally apply the global ramp or use other threshold+smoothness values
  • Change property strings to IDs
  • Make sub graph output distance attenuation - for custom ramp computation
  • Cull lights
    • By Y
    • By camera distance
  • Optimize light collection
  • Test on WebGL with non-full batches
  • Profile
  • Wiki Page
@Delt06 Delt06 added Lighting/Shadows Lighting, shadows, GI, etc. Shader Graph Relates to Unity's Shader Graph support Performance labels Dec 19, 2023
@Delt06 Delt06 modified the milestones: v0.8.0, Wishlist, v0.9.0 Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lighting/Shadows Lighting, shadows, GI, etc. Performance Shader Graph Relates to Unity's Shader Graph support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant