Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted HDRP Directional light size

Discussion in 'Scripting' started by DvCTO, Jun 2, 2020.

  1. DvCTO

    DvCTO

    Joined:
    Apr 28, 2020
    Posts:
    2
    Good day everyone,

    I'm trying to create night lighting scene where the moon (directional light in a physically based sky) varies in distance over time (getting larger and smaller). In the editor I can set angular diameter (e.g. 0.5 on average) but I need to be able to modify this value during runtime. I have not been able to find a code attribute that gives me access to this parameter. Anybody have any ideas or workarounds?
     
  2. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    122
  3. arvindchetu

    arvindchetu

    Joined:
    Jun 3, 2020
    Posts:
    8
    HRDP Directional light is depending upon the Angular diameter of the emissive celestial body represented by the light as seen from the camera (in degrees). Used to render the sun/moon disk.
     
unityunity