Updated (Unity 2021 LTS ed.) - The Definitive Guide to Lighting in the HDRP - e-book, available now


The definitive guide to lighting in the High Definition Render Pipeline is now updated with the latest graphics capabilities in Unity 2021 LTS. This e-book was first published late last year as we announced previously in the forum to demonstrate the power of physically based lighting in HDRP for creating high-end lighting effects across PC and console games.

What’s been added?
New content has been added for Light Anchors, Clouds, Lens Flares, Dynamic Resolution, and ray tracing updates among many other small tweaks throughout the book.


Here’s a quick overview of the topics the e-book covers:

  • HDRP concepts, settings, cameras, and Volumes frameworks
  • Exposure, modes, physical camera settings, and formulas
  • Light units, types, properties, and IES Profiles
  • Creating natural-looking skyscapes with the Physically Based Sky system
  • Refining and modifying shadows, reflections, and real-time lighting effects to add depth to your scenes
  • Best practices for using the Rendering Debugger
  • Ray tracing and post-processing

Who is the guide for?
The guide is intended to be a foundational, advanced-level resource for technical artists, lighting artists, and developers working in Unity.

If you have any feedback or encounter problems accessing the file let us know in this thread :slight_smile:



This guide helped me a lot to understand how to use lighting with HDRP.

I am currently working on a HDRP project with the objective of simulating real lights using IES files and being able to gather data on intensity, reflection and so on. But unfortunately there seems to be a slight difference between what I get through HDRP and what I got on my own data, the shape is overall the same but the distribution of intensity is a little off:

Distribution of intensity on the ground just below the light source (left: Unity, right: Official data)

I am no expert of Unity lighting and even less of HDRP lighting and I can’t seem to understand why the distribution is slightly off like that…

Do you have any idea of what may be the cause of this ?

Thanks in advance for your consideration !

1 Like

Can you describe how you’ve measured the intensity distribution in Unity compared to the official data ?
The shape indeed looks similar, maybe the issue is that there is some wrong “shift” in intensity happening ? Maybe a linear to gamma correction when reading out from Unity ?

Excellent, thank you very much. A few things for maybe an update that I miss:

  • diffusion profiles
  • how to create godrays ... getting them to even show up requires to fiddle around with very tiny settings ranges of various components (fog etc)

Would be nice if Unity would provide some defaults that one can try via drag & drop or some wizard to get different atmospheres.


Thanks for sharing those ideas, we took note for the 22 LTS update of the book for both topics.
In the meantime you can check this [forum post]( https://discussions.unity.com/t/833530 page-13#post-7940989) on how to create god rays.

For diffusion profiles, it’s usually eye balled. There is some physics involved behind the Radius value (in world space), but ultimately, it’s an artistic process because we use a very rough approximation (like everybody else). In any case, for 22 LTS there might be new features around this to cover in detail in the next book update.

1 Like

I personally prefer it like this:


But with dedicated presets that I can activate at a touch of a button. Sunny Midday, Dramatic Evening, Morning Sun, etc.

1 Like

I used a script to get RGB level and convert it to grey level:

I used GetPixels32 to get the RGB values and then write the level of grey on “colorfile.txt”.

I think there is indeed a gamma/linear conversion issue.

You’re creating tmpTexture as a linear texture, but temp2DTexture with the default width/height constructor, that by default creates a sRGB texture.
I suspect that this is the cause of the difference.

Small detail, but I doubt that the conversion to greyscale is needed, as ies are already greyscale with r=g=b, you could just output the value of the red channel.

Thanks a lot for your answer !

I just tried to change some lines in this script but have fallen quite short of any real change...

I would be delighted if you had any advice on how to measure and save light intensity values with the gamma/linear conversion issue in mind ?

What about changing this : Texture2D temp2DTexture = new Texture2D(m, n);
to : Texture2D temp2DTexture = new Texture2D(m, n, true, true);

This should create the texture in linear color space, and should be better ?

Maybe I missed it, but perhaps in the next one, it would be nice to mark new/changed features as such for those who are already familiar with HDRP and want to drill exactly at the changes.

good idea, noted for the 22 LTS update :writing_hand:


I don’t know what either of you were talking about, but it sounds cool.