CesiumGS / CesiumGS/cesium-unity

`CesiumDefaultTilesetMaterial` not receiving proper directional lighting at certain angles

Open
#382 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
535
Forks
132
Avg merge
6h 45m
Merged PRs (30d)
1

Description

This might be an issue with the shader itself. As you can see below, lighting and shadows from a directional light are not properly received by the material at certain angles.

We are trying to a do a day and night cycle based on time, date and location so we are utilizing a wide range of rotations from a single directional light as if it is a real world sun light.

| **X > 140°** | **X < 140°** |
|--------------|---------------|
|![MoreThan140](https://github.com/CesiumGS/cesium-unity/assets/88642381/c1082906-0197-4210-b2a1-db7a67a32353)|![LessThan140](https://github.com/CesiumGS/cesium-unity/assets/88642381/bc471536-d4e1-4b10-975f-e0a4cf8ee254)|

*Note: "X" represents the angle value at X-Axis of rotation. Y and Z rotations on the preview is set to zero for simplicity.*

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with CesiumDefaultTilesetMaterial using a directional light and the X-axis rotations described in the report, comparing values above and below 140 degrees. Inspect the material's shader and verify that directional lighting and shadows are received consistently across the tested angles.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.