stride3d / stride3d/stride

Directional Light intensity cant handle max input value

Open
#2,766 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Shaders bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release/GitHub (please choose appropriate option)
GitHub

Version: Version number and/or git branch
master branch
Commit ID: a1a513e7b80fbc6bb9685370f15eaad545900437

Platform(s): Does the problem occur on Windows, Android...?
Windows

Describe the bug
The Game Studio Edit Screen textures turns black when the default Directional light intensity is set just below max value.

Even with the post effect Bright Filter off the shader has a hard time dealing with the high values.

To Reproduce
Steps to reproduce the behavior:

  1. New Project
  2. Set intensity of Direction light to 3.4028234663852886E+38

Expected behavior
The scene is bright white and not generating a black spots.

Screenshots
Intensity 3.4028234663852886E+38
Image

Post Processing Bright Filter Off
Image

Intensity NaN
Image

Intensity 3.028234742258807E+38
Image

Intensity 3.000000106909804E+37 (Expected behavior)
Image

Log and callstacks
N/A

Additional context
I am trying to find the cause of multiple lighting bugs and stumble on this one that seemed unreported.
The image with Intensity 3.028234742258807E+38 maybe related to:
#2502
#325

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the Game Studio Edit Screen on Windows by setting Directional Light intensity to 3.4028234663852886E+38, with Bright Filter both enabled and disabled. Trace the directional-light shader and post-processing path from that entry point; done means the scene stays bright without black spots at the reported maximum value.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.