-
Notifications
You must be signed in to change notification settings - Fork 263
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
Wind Waker: Particle system improvements #739
Merged
Conversation
This file contains 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
Now `workData.volumeEmitCount` is always valid when it should be
The game uses these to consolidate commonly used emitters, such as flames. This fixes a big long-standing TODO in d_particle.ts, but the main goal is to fix the HACK related to indirect/projection particles
This is done almost the same as the game, but we modify the TEV settings at emitter creation time rather than at draw time (because generating the material is expensive)
Particles now keep the groupID that was assigned to them at creation. Projection particles are determined at simple emitter creation time, or if ParticleGroup.Projection is specified manually.
Actors such as d_a_ep must call `setSimple()` each frame
These should be handled by the d_a_lamp actor (e.g. in Beedle's ship shop), but that is not yet implemented. For now, let's handle them in d_a_ep
This TEV patching is now done in a more proper place, inside the the simple particle callback
Given a view matrix, return a Frustum which can be used for culling. In the original game, frustums are generated from proj matrices alone. Points were transformed by the view matrix before being tested against the frustum. But noclip typically expects viewProj frustums.
This aligns with the game and fixes sorting issues with the title screen emitters
magcius
reviewed
Jan 3, 2025
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.
(userID & 0x4000)
is true to be drawn in a particle group other thanProjection
/Indirect
Impetus here is that the emitters used in d_a_title need to draw into a new ParticleGroup that supports ortho view/proj matrices. Since those emitters have their 0x4000 ID bit set, fixing up the
simple
system seemed appropriate."Bomb Island" and "Beedle's Shop" are good scene's to analyze
d_a_ep
(flames) which are the first actor to use the new simple system. "Dragon Roost Cavern" featuresd_a_obj_flame
actors that haveuseSimpleEm
set. The "Title Screen" demo can be used to test 2D emitters.