Skip to content
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

TSL: Improve fog approach. #30080

Merged
merged 1 commit into from
Dec 10, 2024
Merged

TSL: Improve fog approach. #30080

merged 1 commit into from
Dec 10, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Dec 9, 2024

Related issue: Fixes #30077

Description

Improve TSL fog apporach.
This allows you to manipulate the fog more easily, where the factor and colors are separated.

  • Added rangeFogFactor, densityFogFactor
  • fog() -> vec4( color, factor )

@sunag sunag changed the title improve fog approach TSL: Improve fog approach. Dec 9, 2024
@sunag sunag added this to the r172 milestone Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.21
79.01
339.21
79.01
+0 B
+0 B
WebGPU 485.99
134.91
485.82
134.88
-168 B
-31 B
WebGPU Nodes 485.45
134.81
485.29
134.78
-168 B
-31 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.1
112.06
465.1
112.06
+0 B
+0 B
WebGPU 555.39
150.39
554.93
150.31
-459 B
-86 B
WebGPU Nodes 511.24
140.09
510.78
140.01
-459 B
-76 B

@sunag sunag marked this pull request as ready for review December 10, 2024 00:42
@sunag sunag merged commit 8d55664 into mrdoob:dev Dec 10, 2024
12 checks passed
@sunag sunag deleted the dev-fog-rev branch December 10, 2024 03:53
@sunag sunag mentioned this pull request Dec 10, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting hardcoded vec values to a fogNode does not work, also Fn TSL does not work
1 participant