Complete Cook-Torrance BRDF Implementation with Quality-of-Life Improvements#9
Merged
Complete Cook-Torrance BRDF Implementation with Quality-of-Life Improvements#9
Conversation
… quality-of-life improvements ## Summary - Remove --silent-rays option completely, replace with --quiet mode - Implement comprehensive verbosity control throughout material and primitive constructors - Fix Cook-Torrance scene statistics display (was showing 0 spheres/materials) - Add 10% progress reporting granularity for --quiet mode - Complete pure Cook-Torrance BRDF with all mathematical components ## Key Changes - **Verbosity Control**: CookTorranceMaterial and Sphere constructors accept verbose flag - **Progress Reporting**: ProgressReporter supports quiet_mode with 10% granularity - **Scene Statistics Fix**: Special handling for Cook-Torrance direct rendering path - **Parameter Clamping**: Automatic validation and clamping to physically valid ranges - **Educational Features**: Comprehensive mathematical explanations and component breakdowns ## Files Modified - src/main.cpp: Remove --silent-rays, add Cook-Torrance statistics, verbosity control - src/materials/cook_torrance.hpp: Complete BRDF implementation with verbose parameter - src/core/sphere.hpp: Add verbose parameter to constructor and validation - src/core/progress_reporter.hpp: Add quiet_mode support with 10% reporting - docs/stories/3.1.pure-cook-torrance-brdf-implementation.md: Updated documentation ## Testing All manual test commands verified: - Basic functionality with different materials and parameters - Verbosity control (--quiet vs default) - Parameter validation and clamping - Performance and regression testing - Edge case handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes the pure Cook-Torrance BRDF implementation with comprehensive verbosity control, parameter clamping, and quality-of-life improvements for better user experience.
Key Features
--quietmode with 10% progress granularity, removes excessive constructor outputChanges Made
--silent-rays: Completely eliminated, replaced with intuitive--quietmodeProgressReportersupports quiet mode with minimal output ("Progress: X%")CookTorranceMaterialandSphereconstructors accept verbose parameterTesting
✅ All manual test commands verified:
Files Modified
src/main.cpp: CLI improvements, Cook-Torrance statistics fix, verbosity integrationsrc/materials/cook_torrance.hpp: Complete BRDF implementation with educational featuressrc/core/sphere.hpp: Verbosity control and parameter validationsrc/core/progress_reporter.hpp: Quiet mode support with configurable granularitydocs/stories/3.1.pure-cook-torrance-brdf-implementation.md: Complete documentationPhysical Accuracy
The implementation maintains physical plausibility through: