Fix cosine calculation and improve pdf stability in Emissive light im…#75
Fix cosine calculation and improve pdf stability in Emissive light im…#75doubleailes wants to merge 2 commits intomainfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
crates/crust-render/src/material/emissive.rs:81
- Reducing the epsilon from 1e-4 to 1e-8 could potentially lead to numerical instability when cosine values are near zero. Please review this change to ensure that it maintains adequate protection against division by very small numbers.
distance_squared / (cosine * area + 1e-8)
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
User description
…plementation
PR Type
Bug fix, Enhancement
Description
Fixed cosine calculation in
pdfmethod for accuracy.Improved numerical stability by adjusting denominator epsilon.
Enhanced light sampling by correcting geometric relationships.
Changes walkthrough 📝
emissive.rs
Fix and enhance PDF calculation in Emissive materialcrates/crust-render/src/material/emissive.rs
pdfmethod.