Skip to content

HDRP project configuration

Configure HDRP before opening the demos in Unity 2022.3.52f1 with HDRP 14.0.11. HDRP height fog can strongly dim direct illumination from a Directional Light aimed up at a planet. This setting preserves that illumination while keeping the Volume’s Fog in use.

The setting applies to the whole Unity project. It changes how HDRP evaluates direct Directional and punctual lights in fog, so it can also change other scenes and how their volumetric fog is lit. The planet materials and Volume Profiles stay as supplied. For other HDRP versions, use the instructions supplied with your download and verify the setting for that version before applying it.

  1. Before embedding, keep a copy of your project’s Packages/manifest.json and Packages/packages-lock.json if you want to restore the original package setup later.

  2. Open Window > Rendering > HDRP Wizard and click Embed Configuration Editable Package. This puts an editable copy of HDRP Config in your project’s Packages folder. If the project already has an embedded configuration, check that its version matches High Definition RP in Package Manager and use that copy.

  3. In the Project window, open Packages > High Definition RP Config > Runtime. In your project folder, the editable file is Packages/com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs.hlsl.

  4. Open that file in a text editor. Add this line once between #define SHADERCONFIG_CS_HLSL and the first existing SHADEROPTIONS_ definition. Leave the existing definitions in place.

    #define LIGHT_EVALUATION_NO_HEIGHT_FOG
  5. Save the file, return to Unity and let the import and shader compilation finish.

Confirm the directive is still present in the file under your project’s Packages folder. After importing Planets HDRP, open Demo 01 and let automatic exposure settle in Game view. With the supplied camera, lights, Volume Profile and this configuration, the foreground planets should show surface detail and highlights while retaining their dark sides and colored rims. Compare the Demo 01 reference. A scene with Fog disabled, such as PlanetsDemoscene_03, can look the same before and after the change.

If the result stays dark, confirm you edited the embedded file, then use Assets > Refresh or reopen the project and wait for compilation. Check the Console for shader errors. If the include was regenerated, check whether the directive needs to be restored. Rebuild your Player if you’re checking a standalone build. See Troubleshooting for the camera and Volume checks.

Remove the added line, save and let Unity reimport and recompile. This keeps any other changes in your editable config. If you embedded the package solely for this step, back up any changes you want to keep, close Unity, restore the package manifest and lock you saved, and remove the embedded com.unity.render-pipelines.high-definition-config folder from the project’s Packages directory. Reopen the project so Unity resolves its original package. Unity’s embedded package guide