2639 Commits

Author SHA1 Message Date
aliasbinman
4753f6fb8d Add mip map lod bias and bilinear types (#10701) 608fb2781f
* Add mip map lod bias and bilinear types

* minor updates

* Removed MAX enums

* Added Image Mesh LOD Bias

* Add metal support

* Add VK support

* WebGPU filter

* Remove lodbias from metal

* clang format

* clang format

* turn off bilinear on GL as a test

* Remove trilinear and miplodbias from sampler states

* Moved miplodbias into shader instructions

* removed trilinear from webgpu

* clang the shaders

* Update image_filter_options.cpp

* fix missing $ in metal.glsl

* fix lua WRT trilinear

* fix missing flushuniforms in metal.glsl for image draw

* Remove lodbias from FRAG_DATA_MAIN

* fix #define

* Update rive_lua_libs.cpp

* Update metal.glsl

* Removed lodbias from image mesh as a test

* Update atomic_draw.glsl

* Update draw_image_mesh.glsl

* Fix unit tests

* Remove whitespace

* Update draw_image_mesh.glsl

* Update image_sampler.hpp

* Update bindings_c2d.cpp

* clang format

* Update render_context_d3d_impl.cpp

* Readd lodbias to draw image mesh

* Update glsl.glsl

* Update draw_image_mesh.glsl

* Update glsl

* Update glsl.glsl

* Update glsl.glsl

* Update glsl.glsl

* Update rhi.glsl

* more lodbias removal

* more lodbias removal

* Update glsl.glsl

* Update glsl.glsl

* Update glsl.glsl

* Remove one image call lodbias

* Update glsl.glsl

* Update glsl.glsl

* Update glsl.glsl

* Update glsl.glsl

* Update glsl.glsl

* Update draw_image_mesh.glsl

* clang format

* Update hlsl.glsl

* Update metal.glsl

* Update rhi.glsl

* clang format

* Update Goldens

* update golden

* more goldens

* Test for metal

* goldens

* metal test fix

* Update gpu.cpp

* revert changes

* Update gpu.cpp

* Update linux golden

* Metal test

* metal test

* Update gpu.cpp

* Update gpu.cpp

* clang format and ios goldens

* Update goldesn

* linux goldens

* move mipmaplodbias in uniforms

* Addres Chris' comments

* More comments addressed

* clang format

Co-authored-by: John White <aliasbinman@gmail.com>
2025-10-07 16:43:45 +00:00
JoshJRive
2c75fcb604 Restructure Vulkan bootstrapping (#10721) 9c66afdd2a
This redoes the Vulkan bootstrapping used by our test apps to use our own internal bootstrapping (rather than VkBootstrap), as well as fixes swapchain issues with a subtly incorrect use of fences.

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-10-07 16:14:16 +00:00
philter
f8787ac93a cpp(fix): Update scroll friction at edges (#10719) 36a2a4b4db
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-10-06 21:38:12 +00:00
bodymovin
129076c675 fix: cache and reset pointer events (#10707) fd286173b1
* fix: cache and reset pointer events

Co-authored-by: hernan <hernan@rive.app>
2025-10-04 00:10:51 +00:00
philter
2fc9456dc0 fix: Check for nullptr in Axis::offsetChanged (#10708) d79a44ba26
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-10-03 21:40:25 +00:00
blakdragan7
e0b08d44ad Ue fixes (#10705) e6ba6e329a
* Added custom draw function to render targets. Made saving on reimports for rivs not crash. Made generating blueprints 5.6 compatable

* view models now unsettle the state machine.

* now command q gets the view model type name for properties. UE also uses stores this information

* made viewModelProperty work with slashes.

* undo slash support

* removed test slash vm from data_bind_test_cmdq and updated unit tests to match

* updated draw commands

* better saving without crash

* automatic defaults are now working

* don't generate enums every noade. Make them inside the file and cache them.

* make enums public to allow referencing in blueprints

* removed defaults ready delegate

* removed unused class

* PR changes

* missed

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-10-03 19:53:21 +00:00
JoshJRive
abd68ec89e fix(vulkan): Correctly support Vulkan 1.0 on Android (#10679) 8e0fadf978
VkBootstrap will incorrecty error with `vulkan_version_1_1_unavailable` on Vulkan 1.0 systems that do not have the vkEnumerateInstanceVersion function, even when we specifically said that it was fine to fall back to 1.0. To work around this, we will detect that error and then try again to create the Vulkan instance, specifically requesting version 1.0.

Additionally fix a "function must return" error when building in MSVC on Windows, and update LOG_ERROR to be LOG_ERROR_LINE to make it clear that it writes lines (and update its use of fprintf to match what the android logging does)

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-10-01 23:33:25 +00:00
csmartdalton
d03c6773b1 chore: Rename draw_clockwise_* shaders to draw_clockwise_atomic_* (#10689) 7e676124de
The interlock mode these shaders implement is clockwiseAtomic. Let's be
more specific with the naming so we can support other clockwise modes.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-10-01 21:15:37 +00:00
bodymovin
89fcbd1e25 Feature: add support for multitouch (#9581) 12764e9a3b
add support for multitouch

Co-authored-by: hernan <hernan@rive.app>
2025-09-30 21:29:34 +00:00
bodymovin
d0faf6e011 feature: add toggle to make scroll constraint not interactive (#10680) 0b069a9936
* feature: add toggle to make scroll constraint not interactive

Co-authored-by: hernan <hernan@rive.app>
2025-09-30 20:23:54 +00:00
bodymovin
001594b951 chore: improve iteration of data bound list (#10625) 8385ec62ed
improve iteration of data bound list

Co-authored-by: hernan <hernan@rive.app>
2025-09-30 15:53:12 +00:00
bodymovin
6362192a61 data bind artboards rcp file (#10214) c542b9b7ac
* make file ref counted

* migrate File to refcnt

* add bindable artboard class to keep file reference

* feat(unity): support rcp file and BindableArtboard class (#10228)

* refactor(apple): use updated file bindable artboard apis (#10229)

* update command queue to support bindable artboards

* use bindable artboards on command queue

* self manage view model instances in js runtime

* change remaining viewModelInstanceRuntimes to rcp

* refactor(apple): update view model instances to use rcp (#10298)

* refactor(unity): support rcp ViewModelInstanceRuntime (#10309)

* rebase fix

* deprecate getArtboard in favor of getBindableArtboard

* fix merge

* remove unused lambda capture

* fix rive binding

* feat(Android): RCP File, VMI, and add bindable artboards (#10456)

* refactor: C++ refactors

- Import from long (incorrect) -> jlong
- Header clang-tidy fix
- Use reinterpret_cast instead of C-style cast
- Break out some variables instead of long one liners
- Use auto
- Remove unused env and thisObj

# Conflicts:
#	packages/runtime_android/kotlin/src/main/cpp/src/helpers/general.cpp

* docs: Improve documentation on the File class

* feat: Support bindable artboard type and RCP VMIs

# Conflicts:
#	packages/runtime_android/kotlin/src/androidTest/java/app/rive/runtime/kotlin/core/RiveDataBindingTest.kt

* feat: Support RCP files

* refactor: Change from +1/-1 ref to just release

* fix: Moved to the more appropriate null pointer for GetStringUTFChars

* replace unref with release

Co-authored-by: Adam <67035612+damzobridge@users.noreply.github.com>
Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Erik <erik@rive.app>
Co-authored-by: hernan <hernan@rive.app>
2025-09-30 00:01:40 +00:00
csmartdalton
080ae94b7c test: Add an android_gms_vulkan run to browserstack (#10669) f7613dbf35
Vulkan is ready to stabilize. Let's get it on our nightly runs.

Also disable "atomic" mode on Android unless requested explicitly.
Barriers tend to be expensive on Android and MSAA is usually cheap;
let's stabilize MSAA first.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-29 16:25:14 +00:00
csmartdalton
badcdad8dd fix(vk): Properly preserve render targets when using MSAA (#10630) 5df1a42463
* fix(vk): Properly preserve render targets when using MSAA

Unfortunately, Vulkan does not provide a mechanism to initialize our
(transient) MSAA texture with the contents of the (non-MSAA)
renderTarget texture at the beginning of a render pass. To work around
this limitation while supporting LoadAction::preserveRenderTarget, we
literally draw the previous render target contents into the framebuffer
at the beginning of the pass.

* Fix one more barrier

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-27 07:54:28 +00:00
JoshJRive
73d6ccbe26 fix(vk, d3d12): Properly apply draw batch barriers on pipeline failures (#10667) 5efb71a88a
If a pipeline failed to acquire for a draw batch that required barriers of any kind, we were skipping the barriers as well as attempting to draw.
Now the code will apply the barriers and only skip drawing.

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-27 04:10:33 +00:00
bodymovin
6b729b79e6 chore: add pointer exit support (#10595) d999d6a22c
* add pointer exit support

Co-authored-by: hernan <hernan@rive.app>
2025-09-26 15:42:26 +00:00
susan101566
448877c406 scripting: color and string view model property (#10663) 3acbdfcba7
Description
Adds support for passing a string and color vm property to the scripting engine.
Adds support for defining color and string as inputs.

Co-authored-by: Susan Wang <susan@rive.app>
2025-09-25 21:15:26 +00:00
csmartdalton
fec00ac453 feat: Integrate glfw into the premake build (#10656) 653c8c6040
Build GLFW with premake instead of requiring the user to call out into a
custom script thatbuses their cmake.

feat(scripting): split code panels (#10655) 9d8b49152e
* feature(scripting): command palette

* feature: adding split pane saving

* chore: update to latest luau

* fix: pixel correct scrollbars

* feature: reload scroll position of script pane

* feature: module titles on panes

* chore: merging command palettes

* fix: cleanup

* chore: refactor searchbar tests

* fix: failing test

* chore: cleanup

* chore: cleanup

* chore: cleanup unused commented code

* feature: hover for command palette items

* chore: cleanup mocks

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-09-25 20:42:43 +00:00
JoshJRive
f15f139dce Fix MSVC toolchain path_fiddle builds (#10661) 0f0d7c5f81
Our MSVC builds are building with C++latest (instead of C++17), and what that means is that filesystem::path::u8string returns a std::u8string instead of std::string (see https://en.cppreference.com/w/cpp/filesystem/path/string.html), causing a compilation failure for the shader hotload rebuild command. This change adds back in the reinterpret_cast to a char pointer (but still stores the temp string correctly).

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-25 18:58:46 +00:00
aliasbinman
1197a7f42c Add loop option to GM (#10649) 0121fd0174
* add loopCount

* add static

* Update gmmain.cpp

* Change while to for

Co-authored-by: John White <aliasbinman@gmail.com>
2025-09-25 18:07:10 +00:00
aliasbinman
50a8007dc8 Fix dangling pointer in pathfiddle (#10654) 439848a8d9
Fix dangling pointer

Co-authored-by: John White <aliasbinman@gmail.com>
2025-09-24 20:28:32 +00:00
csmartdalton
abf64c01c1 feat: Web/android testing tweaks and features (#10621) 8cd4d40440
And add a "webserverandroid" target to deploy_tests.py that sets
up reverse port forwarding over ADB so we don't have to rely on the
network.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-24 18:00:26 +00:00
JoshJRive
473f030658 fix(vulkan): get MSAA working on systems without ClipDistance support (#10624) d1c02a29aa
Referencing ClipDistance (via gl_ClipDistance) in a SPIR-V shader, even if it is in a specialization branch that is not taken, is a validation error on systems that don't support ClipDistance. To get around this, there are now noclipdistance variations of the shaders that use it, and they (along with the MSAA shaders that never use ClipDistance) all define `DISABLE_CLIP_RECT_FOR_VULKAN_MSAA`, which ensures that it never tries to compile it in except where it matters.

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-23 19:34:09 +00:00
JoshJRive
928ec58a4e fix: path_fiddle now shuts down without crashing on Vulkan (#10631) 4d3770866f
The order of destroying the vulkan device and destroying all of the assets in the riv data was backwards - a loaded riv scene needs to be fully destructed before the Vulkan fiddle context can be, otherwise you'll get validation failures on fiddle context destruction (Because there are still buffers held by things in the artboards) or, if validation is off, crashes when trying to destroy the buffers using a now-defunct vulkan context.

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-22 17:26:49 +00:00
philter
28399e8446 Use markHostTransformDirty instead of markHostingLayoutDirty when appropriate (#10632) af3f673d77
Address a couple of issues:

When an artboard has a host, at the time the artboard has a layout marked dirty, we mark the hosting layout dirty (if it is a LayoutNodeProvider such as a NestedArtboardLayout or ArtboardComponentList). In cases where the host is not a LayoutNodeProvider (ie, NestedArtboardLeaf) we should also mark the host's transform dirty so it can redraw itself using the Artboard's updated size. This surfaced recently when we started using the artboard's hugged size with NestedArtboardLeaf mode.
In Artboard xChanged/yChanged we should mark the host's transform dirty rather than marking layout dirty (because we don't want to recompute layout at that time).

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-09-20 18:24:27 +00:00
bodymovin
d6bb26fd98 feature: make override properties bindable (#10627) 540fab92b6
Co-authored-by: hernan <hernan@rive.app>
2025-09-19 15:16:03 +00:00
csmartdalton
e54883d909 fix(webgpu): Fix Y orientation on GL zero and nonzero FBOs (#10623) 454b0d2db1
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-19 02:18:27 +00:00
JoshJRive
724e157c07 Add --core command-line option to path_fiddle (#10619) ec8b00c206
This also improves its parameter validation.

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-18 23:50:56 +00:00
luigi-rosso
b4f3bf9cc5 fix: link rml and then rive for rml cli (#10620) 48b39fe42e
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-09-18 23:26:09 +00:00
philter
4978b05b7d (fix): Artboard list item hit order (#10618) f95ef8fdc5
Since Artboard list items are rendered with z index increasing as the item index increases (ie, later children will sit above earlier children), when doing hit testing, we need to traverse the items in reverse order in order to capture the property z ordering. This is only important when items have overlap.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-09-18 23:05:29 +00:00
JoshJRive
a298c3be23 Add asynchronous shader and pipeline creation to Vulkan renderer (#10591) 3b6e2b6bc4
This gets the Vulkan runtime running with the async pipeline manager.

This required moving a bunch of the internal render context impl classes up to the header, which made the header a bit unwieldy so they got moved out to their own files.

Additionally, this has some changes to the async pipeline manager:
- Vulkan's pipelines have additional information that the other renders' do not, so PipelineProps is now a property of the pipeline type so that it can have its own pipeline type
- Similarly, Vulkan uses a 64-bit index for its pipeline key (so that it can use 32 bits of it as the standard shader key) so that had to be generalized as well
- Moved the vertex shader manager functionality into the pipeline manager because every pipeline should share vertex shaders
- Generalized it so that vulkan can also use it to share other things. This includes fragment shaders which are now managed as shared like vertex shaders were, because on Vulkan multiple pipelines can share the same fragment shader.
- Changed the std::maps to std::unordered_map because the lookup speed should be better (it's a hash map vs. a binary tree)

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-18 21:55:53 +00:00
philter
36a807339c chore: Add start/end/offset properties to List follow path (#10606) b2aed6839d
Adds distinct start, end and offset properties for List's follow path as requested by Creative team, to behave similarly to Trim paths. This also fixes an issue where modifying strength wouldn't modify its rotation accordingly.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-09-18 16:26:43 +00:00
bodymovin
37adde5d6b fix(UAT): listener with triggers work correctly (#10614) c42858eb74
Co-authored-by: hernan <hernan@rive.app>
2025-09-18 01:39:15 +00:00
luigi-rosso
fcf74b0b1e feature(scripting): artboard:advance should return boolean (#10582) 665b84f01d
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-09-17 20:42:22 +00:00
philter
ab70997c1a Add silvers for follow path (previously rive_flutter goldens) (#10611) 67f20bfc31
Noticed that the old rive_flutter goldens were removed. With some updates to follow path coming with List follow path, I wanted to make sure those old goldens were captured as silvers prior to the new changes landing. We may want to go back and covert the other goldens in the future.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-09-17 20:08:43 +00:00
philter
fb007ca874 Exclude items from scroll snap if hidden (#10602) 0704ed0f7e
When items contained in a scroll constraint's layout are scrolled with snapping enabled, we exclude the hidden items from the snap list so they will not be settled on when the user swipes.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-09-17 15:33:01 +00:00
bodymovin
d7cdf4f76a chore: compare previous list to new list (#10604) 9072781123
* compare previous list to new list

Co-authored-by: hernan <hernan@rive.app>
2025-09-17 15:04:11 +00:00
bodymovin
7fe208c53c feature: prioritize viewmodel direction from flag (#10514) 4d8e0a9719
* prioritize viewmodel direction from flag

Co-authored-by: hernan <hernan@rive.app>
2025-09-16 21:45:07 +00:00
csmartdalton
fb16b2fb14 feat(webgpu): Wagyu 39 (#10603) 7ac418480c
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-16 21:04:45 +00:00
csmartdalton
edae0548c3 feat(wgpu): Add a wgpu backend to the test suite (#10586) 48bb6538bd
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-16 18:32:10 +00:00
csmartdalton
c8bda51ecd fix: Vulkan validation on desktop (#10600) 7220599bb1
Don't build the Vulkan instance until after we've enabled validation.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-16 18:16:40 +00:00
aliasbinman
5591fac1b3 Add profiler Tag macro (#10593) 859d6283c9
Update profiler_macros.h

Co-authored-by: John White <aliasbinman@gmail.com>
2025-09-16 17:31:47 +00:00
JoshJRive
e76d509727 Some vulkan testing fixes (#10597) 21af6591da
- deploy_tests on windows should use `where` which is built in (vs `which` which is not)
- vk bootstrap now displays shaderClipDistance, which was missing from the printing of available features
- vkcore and vksrgb backends now do the correct thing
- added vkmsaacore backend (which currently fails due to a validation error)

Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-16 17:08:11 +00:00
bodymovin
b70719a157 fix: target to source converter (#10584) 9366e9acea
* feature: add support for color interpolation in converter

* fix: target to source with different types with converter applied

Co-authored-by: hernan <hernan@rive.app>
2025-09-15 20:11:19 +00:00
csmartdalton
1a5b7cdc1a fix(webgpu): Revert the pls2 workaround for PowerVR 1.10 (#10585) fa6ac73d94
This workaround came with an unacceptable performance cost. Let's revert
while we work out a better solution.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-13 03:17:04 +00:00
csmartdalton
66b7376190 fix(gl): Apply ANGLE workarounds in WebGL as well (#10581) 1931264636
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-12 21:11:23 +00:00
bodymovin
c71f93176f feature: add support for color interpolation in converter (#10545) b0f6516eec
* feature: add support for color interpolation in converter

Co-authored-by: hernan <hernan@rive.app>
2025-09-12 19:36:02 +00:00
aliasbinman
5eac000d64 Fix D3D warning (#10580) a3e22e1322
* Always set sampler even if no texture

* Add scope block to sampler setting

* remove empty line

Co-authored-by: John White <aliasbinman@gmail.com>
2025-09-12 19:17:29 +00:00
luigi-rosso
a729a7337e feature: scripting prevent infinite exec (#10570) 3afebf3d4f
* feature: working on fullscreen code

* feature(scripting): prevent infinite execution

* fix: missing method for ScriptingTest context

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-09-12 18:02:51 +00:00
csmartdalton
804a5bbda5 fix(gl): Only do memory barrier workarounds on Mali (#10575) 8494dda792
fix(gl): Only do memory barrier workarouns on Mali

We introduced a spurious memory barrier per flush in order to work
around corruption on Mali-G78. But ironically, this barrier introduced
corruption on Adreno 610. Add some logic to only do the barrier on
Mali.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-12 17:33:51 +00:00