-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
WebGLRenderer: Implement Sheen LUT #32149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| return [v[0] * s, v[1] * s, v[2] * s]; | ||
| } | ||
|
|
||
| function clamp(x, min, max) { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 5 hours ago
The best way to fix this problem is to remove the unused clamp function definition from the file utils/generateSheenLUT.js. This improves code quality and maintainability by eliminating dead code. This involves deleting the function code on lines 33-35. No additional changes, imports, or code definitions are needed, assuming clamp is truly not used in the remainder of the file.
-
Copy modified line R34
| @@ -30,10 +30,8 @@ | ||
|
|
||
|
|
||
|
|
||
| function clamp(x, min, max) { | ||
| return Math.max(min, Math.min(max, x)); | ||
| } | ||
|
|
||
|
|
||
| // ============================================================================ | ||
| // Random number generation | ||
| // ============================================================================ |
|
|
||
| function integrateBRDF(roughness, NoV, samples) { | ||
| const V = [Math.sqrt(1.0 - NoV * NoV), 0.0, NoV]; | ||
| const N = [0.0, 0.0, 1.0]; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 5 hours ago
The best way to fix the problem is to remove the initialization and declaration of the unused variable N on line 102 inside the integrateBRDF function in utils/generateSheenLUT.js. This change will ensure the code remains clean and maintainable, and it does not affect any functionality, as N is not used elsewhere in the function. No additional imports or modifications are needed.
| @@ -99,7 +99,6 @@ | ||
|
|
||
| function integrateBRDF(roughness, NoV, samples) { | ||
| const V = [Math.sqrt(1.0 - NoV * NoV), 0.0, NoV]; | ||
| const N = [0.0, 0.0, 1.0]; | ||
|
|
||
| let directionalAlbedo = 0.0; | ||
|
|
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rt, function or class Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Related issue: #32147