bevy/crates
Matty 528ca4f95e
Eliminate redundant clamping from sample-interpolated curves (#15620)
# Objective

Currently, sample-interpolated curves (such as those used by the glTF
loader for animations) do unnecessary extra work when `sample_clamped`
is called, since their implementations of `sample_unchecked` are already
clamped. Eliminating this redundant sampling is a small, easy
performance win which doesn't compromise on the animation system's
internal usage of `sample_clamped`, which guarantees that it never
samples curves out-of-bounds.

## Solution

For sample-interpolated curves, define `sample_clamped` in the way
`sample_unchecked` is currently defined, and then redirect
`sample_unchecked` to `sample_clamped`. This is arguably a more
idiomatic way of using the `cores` as well, which is nice.

## Testing

Ran `many_foxes` to make sure I didn't break anything.
2024-10-03 18:26:41 +00:00
..
bevy_a11y Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_animation Eliminate redundant clamping from sample-interpolated curves (#15620) 2024-10-03 18:26:41 +00:00
bevy_app Documentation for variadics (#15387) 2024-10-02 12:48:36 +00:00
bevy_asset move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00
bevy_audio Migrate audio to required components (#15573) 2024-10-01 22:43:29 +00:00
bevy_color Eliminate redundant clamping from sample-interpolated curves (#15620) 2024-10-03 18:26:41 +00:00
bevy_core Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_core_pipeline Migrate motion blur, TAA, SSAO, and SSR to required components (#15572) 2024-10-01 22:45:31 +00:00
bevy_derive move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00
bevy_dev_tools Rename observe to observe_entity on EntityWorldMut (#15616) 2024-10-03 17:05:26 +00:00
bevy_diagnostic Runtime required components (#15458) 2024-09-30 19:20:16 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs System param for dynamic resources (#15189) 2024-10-03 18:20:34 +00:00
bevy_encase_derive Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_gilrs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
bevy_gizmos Use circle gizmos for capsule (#15602) 2024-10-02 19:47:56 +00:00
bevy_gltf Migrate scenes to required components (#15579) 2024-10-01 22:42:11 +00:00
bevy_hierarchy Add try_despawn methods to World/Commands (#15480) 2024-10-03 16:21:05 +00:00
bevy_input Revert "Have EntityCommands methods consume self for easier chaining" (#15523) 2024-10-02 12:47:26 +00:00
bevy_internal Add features to switch NativeActivity and GameActivity usage (#12095) 2024-10-01 22:23:48 +00:00
bevy_log Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_macro_utils Modify derive_label to support no_std environments (#15465) 2024-09-27 20:23:26 +00:00
bevy_math Eliminate redundant clamping from sample-interpolated curves (#15620) 2024-10-03 18:26:41 +00:00
bevy_mikktspace Add no_std support to bevy_mikktspace (#15528) 2024-09-30 18:17:03 +00:00
bevy_pbr Added visibility bitmask as an alternative SSAO method (#13454) 2024-10-02 13:43:35 +00:00
bevy_picking Rename observe to observe_entity on EntityWorldMut (#15616) 2024-10-03 17:05:26 +00:00
bevy_ptr Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_reflect Documentation for variadics (#15387) 2024-10-02 12:48:36 +00:00
bevy_remote Allow access a method handler (#15601) 2024-10-02 19:45:18 +00:00
bevy_render Better warnings about invalid parameters (#15500) 2024-10-03 13:16:55 +00:00
bevy_scene Migrate scenes to required components (#15579) 2024-10-01 22:42:11 +00:00
bevy_sprite Revert "Have EntityCommands methods consume self for easier chaining" (#15523) 2024-10-02 12:47:26 +00:00
bevy_state Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_tasks bump async-channel to 2.3.0 (#15497) 2024-09-28 19:21:59 +00:00
bevy_text Fix extract_text2d_sprite entity leak (#15625) 2024-10-03 18:15:36 +00:00
bevy_time Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_transform Migrate visibility to required components (#15474) 2024-09-27 19:06:16 +00:00
bevy_ui Fix entity leak in extract_uinode_borders (#15626) 2024-10-03 18:15:32 +00:00
bevy_utils Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
bevy_window move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00
bevy_winit move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00