Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
140 stars 2 forks source link

Cookies for directional lights #2443

Open mpmxyz opened 4 months ago

mpmxyz commented 4 months ago

Is your feature request related to a problem? Please describe.

Lasers are essentially a beam of parallel light, similar to the approximation we have for sunlight. But we can't emulate them with directional light unless we use a very high-resolution cookie texture with a small dot at the center.

This is the currently fixed size of the cookie (grid only): grafik

Describe the solution you'd like

Create scale and offset properties to modify the cookie.

Describe alternatives you've considered

I tried using RaycastDrivers and Spot/Point lights for lasers but it only really works if collider and visuals match exactly.

Additional Context

Unity seems to have that features built-in and it just needs to be exposed. (I don't remember the version Resonite currently uses.) https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@15.0/manual/light-component.html#Emission

Requesters

No response

Banane9 commented 4 months ago

I suppose having a cookie on a directional light would make sense, but it wouldn't be useful for a laser as directional lights don't have a source point 🤔

mpmxyz commented 4 months ago

True. Who creates the a matching feature request?

Geenz commented 4 months ago

Unity light cookies for directional lights have been busted like this for as far back as I remember. We'll likely not be doing this until after Sauce.

shiftyscales commented 4 months ago

Marking as blocked by #1401.