Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question 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:
    470
  3. arvindchetu

    arvindchetu

    Joined:
    Jun 3, 2020
    Posts:
    10
    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.