Search Issue Tracker
By Design
Votes
0
Found in
6000.0.56f1
6000.2.2f1
6000.3.0a6
Issue ID
UUM-114994
Regression
No
Custom terrain lighting is inverted compared to Unity Terrain when rotating directional light on X axis
How to reproduce:
1. Open the “IN-110952_HDRP_Terrain“ project
2. Open the “TestScene”
3. In the Inspector expand the “Continent Lighting” GameObject and select “Sun”
4. In the Inspector set the “Sun” Transform Rotation X,Y,Z values to 0
5. Rotate the “Sun” on the X axis until the value is around 25
6. Observe the terrain on the left
Expected result: The terrain appears bright
Actual result: The terrain appears dark
Reproducible with: 2023.3.0b6, 6000.0.56f1, 6000.2.2f1, 6000.3.0a6
Could not test with: 2023.3.0b5 (Compilation errors)
Reproducible on: macOS 15.6 (M1 Max), Windows 11 (by user)
Not reproducible on: no other environments tested
Note: The custom terrain on the left is expected to appear similar to the Unity Terrain on the right
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Capacity-size memory is copied instead of Length-size when using UnsafeUtility.memCpy()
- Console displays "SerializedObjectNotCreatableException: Object at index 0 is null" error during Unity theme change while "Tile Palette" window is opened
- Details are not shown when Error Message is still selected after changing Log Entry Count in the Console
- Disabling Unity VCS in Project Settings unfocuses the Project Settings Window
- Help box icon in "Tile Palette" window is blurry in both Unity themes
Resolution Note:
Hi.
In general, we do not offer support on custom shaders, but taking a quick look, I believe the problem is the math you use to calculate normals in your custom shader being incorrect.