-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
RangeFog and DensityFog #17592
base: dev
Are you sure you want to change the base?
RangeFog and DensityFog #17592
Conversation
8b90e58
to
2f3b28f
Compare
No rush. I don't think merging this in that short amount if time is good. Better to target a later release. There are some other things that need to be fixed and tested for |
2f3b28f
to
1bd6e9d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1bd6e9d
to
39030ff
Compare
I think it's better to stick to the old style for now. I'm not sure how fast we move on with this topic. |
82dd31e
to
5eddba2
Compare
42e49f4
to
0dbf102
Compare
0dbf102
to
d6daef1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I normally don't do that if files in the core change. In this case, it's best to download your branch and test locally. |
This comment was marked as resolved.
This comment was marked as resolved.
9c002ac
to
2a938de
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Well this could fix things for me, I really hope this gets some traction again and not vanish in the deep dark. |
@EliasHasle Can you please update this PR? |
Done! I used a reset and a Yoda move (force push). The docs are not updated yet, though. |
…5498) * Nodes: Rework ShaderNodeElements and make some other refactorings * Fixes * fix add assign * Fix circular dependency and clean up * Rename addNode -> addNodeElement and LightsNode.setReference -> addLightNode, add addNodeClass and addNodeMaterial --------- Co-authored-by: sunag <sunagbrasil@gmail.com>
2a938de
to
36bcc71
Compare
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
18e57d1
to
1dd9f2a
Compare
The rationale for using only depth rather than Euclidean distance from a single point for fog with orthographic projection is that every pixel on the screen represents a parallel "eye beam", whereas with perspective projection, the camera position represents the focal point, ideally located at the position of the observer in front of the screen, where the screen is the projection plane (or "window" to the virtual world). (Nevermind that most demos and games inflate the FOV way beyond the typical eye-screen angle, for practical gameplay/immersion purposes.) |
8eb6655
to
042568b
Compare
Neither builds, docs, manual nor the FogExp2Node are updated in this commit. Work in progress. I think one should consider making `vViewPosition` a dependency for all shaders that use fog, instead of adding the new `vFogPosition`. Fixed dirtiness logic in WebGLRenderer and the automatically detected errors Also improved the example and added a thumbnail for it. Update src/Three.Legacy.js Shorter deprecation warning for `FogExp2`. Co-authored-by: Levi Pesin <35454228+LeviPesin@users.noreply.github.com> Fix JSON logic
042568b
to
57eeb7f
Compare
None of the `exp`s can return >1 or <0 given the new, necessarily non-positive, arguments.
57eeb7f
to
4bea924
Compare
@Feirell Do you mind testing the newest version? This PR should be ready for review now. @mrdoob @Mugen87 @LeviPesin Given the parameterisation with an optional |
@EliasHasle sorry to disappoint but the usecase I had has long moved on. I switched to a different approach entirely. Depending on if you believe that another tester is useful, I could cobble together a quick scene and test if it works as I would expect it to. Non the less, thank you for your work and effort! |
Replaces #17355.
RangeFog(color, near, far)
andDensityFog(color, density, squared)
, as requested in #17420 (comment)Includes the change to distance-based depth, as well as corrections to better support
mediump
andlowp
. Makes #17316 and #17324 obsolete.DensityFog
: To make sure a change tosquared
causes the necessary material update, aneedsUpdate
is used internally and handled by the renderer. (DoesneedsUpdate
also have to be declared inDensityFog.d.ts
?)The fog types example is live on my website.Test of legacy signatures
Test of mediump
Test of lowp
It looks suspiciously good with
mediump
andlowp
on my desktop, probably because the precision specifiers are minimal requirements. These ones must be tested on actualmediump
/lowp
devices.The editor works too. It is not perfectly user-friendly to only have an unlabeled checkbox to represent
squared
, though. (Unlabeled controls seems to be a global problem in the editor).