StereoKit Versions Save

An easy-to-use XR engine for building AR and VR applications with C# and OpenXR!

v0.3.9

2 months ago

Another release wrapped up! This time around, I'm extremely thankful for last release's CI/CD, which made shipping preview builds joyful, and made this release much easier to put together! I'm also really thankful to @ponugotimanasaqc @austinbhale and @0y8w1x, who all contributed to this release.

This release we spent a lot of time working on UI and theming! SK's UI has never looked better, and grows increasingly more customizable by the day! A spatial anchor API was added in this release for those devices that support the MSFT anchor extensions (sorry Quest, next release!). We also did a lot of meaningful refactors to the platform code to enable the new SKSettings.mode options, as well as some exciting graphics features still down the road!

You can see the raw changelog here, but here's the high level overview:

Anchor API

  • Added an Anchor API for persistent spatial anchors! See here for an example of how to use them. Right now this only supports MSFT anchors and a stage space fallback. FB (Quest) anchors will be coming soon.

UI

  • Reworked the default StereoKit theme! #821 No layout values were changed, just art assets and shaders. If you still need the previous theme, it can be recovered like so.
  • Added UI.HSpace and UI.VSpace. UI.Space is now deprecated. #751
  • UI.ButtonImg now has an overload that allows tinting the image. #811
  • Added a "Grab Aura" to UI.Window elements that makes it easier to grab windows. #784
  • Added UI.Push/PopGrabAura to turn the aura on and off, and UI.GrabAuraEnabled to check the current state.
  • Added UI.SetElementColor, allowing you to override the default color category of UI elements. #795
  • Added UI.SetElementSound, allowing customization of UI element sounds. #795
  • Added UI.GenQuadrantMesh, a tool for generating more complex UI meshes easily.
  • Added sk_eye_offset to global shader variables for determining which eye is currently being rendered. #862

New API Features

  • Added SKSettings.mode, this replaces SKSettings.displayPreference, which is now deprecated. This change comes with a big rework of platform code, and new ways of running StereoKit! AppMode.Window allows for a simulator free flat window, and AppMode.Offscreen allows for running StereoKit without a display surface at all.
  • Added SKSettings.omitEmptyFrames, which tells SK to skip submitting a frame to the compositor if nothing has been drawn. This can be useful for performance of overlay applications that want to be listening for input, but don't always need to draw. #745
  • Added Device.Runtime, for the current OpenXR runtime's name. #871
  • Added signed/unsigned/float variants for the Tex.R16 texture format. #841
  • Added Tex.GetColorData for more format flexibility, this replaces Tex.GetColors, which is now deprecated. #859
  • Added a collection of built-in default Sprites. Sprite.ArrowLeft/Right/Up/Down, Sprite.Backspace, Sprite.Shift, and Sprite.Close.
  • Added Renderer.SkyMaterial for easy overriding of the skybox material. #863
  • Added World.Tracked, to tell if the device itself is currently tracking. #851

Changes

  • Fallback file-picker now has a list-mode, and uses a scroll bar! #834
  • Fallback keyboard has been refactored, and includes some visual improvements. #806
  • Updated to OpenXR Loader v1.0.34. #865
  • StereoKit threads now have an ID attached to them in debuggers.
  • Major overhaul of platform code to increase sharing of platform code and enable future features. #802
  • Platform.ForceFallbackKeyboard now applies even in the presence of a physical keyboard. #847
  • UI.Handle now will always FaceUser from the center of the Handle. #826
  • Log tool now shows performance graphs in addition to debug logs. #808
  • Overlay app now obeys explicit blend mode selection. #756, #757

Fixes

  • Fix for Tex.R8g8 textures on OpenGL platforms. #868
  • Various texture format/size fixes for OpenGL. #841
  • Fix Font.FromFile when referencing fonts in the Assets folder. #853
  • Fix UI.ButtonImgAt binding calling the incorrect native function. #850
  • Fix for no final audio effect when a UI element vanishes. #773
  • Fix an EGL attribute error for NVIDIAs Jetson Orin NX #838
  • Fix JNI cleanup errors on shutdown. #832
  • Fix for MSFT secondary view configuration. #750, #830
  • Fix for some bounds calculation issues. #769
  • Fix for model_node_info_get when key does not exist. #736, #737

Install or Update

Installation is via the dotnet templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.8

7 months ago

It's finally here! After more than a year of development, v0.3.8 is ready at last! This release took way longer than expected, but includes a lot of really good work. Many thanks to all the contributors here with quite a variety of fixes and features!

Templates

New dotnet powered templates are now available, and are the recommended way to develop going forward! These templates work both for Visual Studio 2022 as well as CLI environments like VSCode. And most notably, the templates now include an official Android compatible template! The getting started guide on stereokit.net has also been updated to use these templates.

Nightly Builds and CI / CD

StereoKit now uses GitHub Actions for nightly builds, releases, and verification of PRs! This helps catch and prevent certain bugs and build issues before they happen, and helps get you features and fixes sooner. All changes on the /develop branch will be available the next day as a .preview build on NuGet! To get nightly builds, make sure to enable Include prerelease in your Visual Studio NuGet Package Manager.

To help facilitate this, StereoKit's build tooling was also completely overhauled to make it easier to build the SDK from scratch. If you're interested in contributing to the core, things just got a bit easier for you :)

Demos, Samples and Tools

API Additions

Highlights

  • Added the ability to change StereoKit's spatial reference point! Stage and Floor are now valid options in addition to Local. See: SKSettings.origin, World.OriginMode and World.OriginOffset.
  • Added a Device info class. Name, GPU, DeviceTracking, DisplayBlend, DisplayType, ValidBlend, HasEyeGaze, HasHandTracking.
  • Added Material.Chain for multi-pass materials.
  • Added UI.LayoutPush, UI.LayoutPushCut, and UI.LayoutPop for more flexible UI layouts.

UI

  • Added overload to UI.SetThemeColor that allow for specifying separate colors for different element states. #506
  • Added overload to UI.ButtonBehavior to provide the interacting hand.
  • Added parameter to UI.Handle and UI.HandleBegin to allow configuration of the activating gesture. #601
  • Added UI.SystemMoveType for configuring how SK provided UI windows move. #479
  • Added UIVisual.ButtonRound, UIVisual.Panel, and UIVisual.Carat for customizing a few more UI elements. #484
  • Added UI.Toggle overload with sprite arguments. #514
  • Added a UINotify property to UI.HSlider to change notification behavior between 'on changed' and 'on finalized'. #321
  • Added UI.VSlider and UI.VSliderAt.
  • Added UI.TextAt and UI.Text with size. #540
  • Added a read only UI.TextStyle for peeking the current style.
  • Added a getter for UI.Settings.
  • Added a UIBtnLayout.None option to image button UI elements.
  • Added UISettings.rounding and UISettings.margin. #556
  • Added UIVis.SliderLineActive and SliderLineInactive.
  • Added overload for UI.ButtonBehavior that takes a depth and activation depth.
  • Added image overloads for UI.Radio, and added UI.RadioAt. #571
  • Added UI.LastElementHandActive and UI.LastElementHandFocused.
  • Added UI.PopupPose, a function for getting a good popup location between the user and what they're interacting with. #478
    • Fallback soft keyboard and file picker popup now use UI.PopupPose for their location. #478
  • Deprecated UI.LastElementHandUsed.

Assets

  • Added Assets.All, Assets.Type, get/set properties for Id on assets, and all asset types now inherit from the IAsset interface. #432
  • Added Mesh.SetData for setting vertices and indices at the same time.
  • Added Mesh.GenerateCircle, and added doubleSided to Mesh.GeneratePlane, thanks jackdaus! #503
  • Added calculateBounds parameter to Mesh.SetVerts.
  • Added Tex.Mips, Tex.GetNativeSurface, and a new overload for Tex.GetColors. #466
  • Added Tex.GenParticle.
  • Added Tex.SetMemory, thanks Austin!. #574
  • Added the ability to control ownership of a native texture resource when calling Tex.SetNativeSurface, thanks technobaboo! #459
  • Added a Material constructor that takes a shader filename.
  • Added getters for Material shader properties: GetTexture, GetFloat, GetInt, GetUInt, GetBool, GetMatrix, GetVector2, GetVector3, GetVector4, GetColor.
  • Added Material.Chain for multi-pass materials.
  • Added ModelNode.Info for storing per-node key/value pair data. GLTF also loads "extras" here #447
  • Added Model.RecalculateBoundsExact, thanks Paul! #578
  • Added overload to Model.Draw that allows for overriding the Materials used.
  • Added Sprite.Find.
  • Added TextStyle.FromFont, a more consistent replacement for Text.MakeStyle.
  • Added a setter for TextStyle.CharHeight.
  • Deprecated the Solid asset. Reactphysics3d will be removed in v0.4. Please see this sample project for how to use a 3rd party library such as Bepu.

Math

  • Added Matrix.Transpose and Matrix.Transposed.
  • Added Vec3.Direction and Vec2.Direction, #476 thanks Ethan Merchant!
  • Added Quat.Delta and Quat.Relative, deprecated Quat.Difference, #479 thanks Ethan Merchant!
  • Added a Pose constructor that defaults to Quat.Identity for orientation.
  • Added Matrix.Perspective overload for camera perspectives. #577, thanks Austin!
  • Added Pose.LookAt.

Backend

  • Added Backend.OpenXR.SystemId, Backend.OpenXR.OnPreCreateSession, Backend.OpenXR.OnPollEvent(#513, thanks jackdaus! ), and Backend.OpenXR.AddEndFrameChain.
  • Added Backend.OpenXR.UseMinimumExts to only load critical extensions by default, and Backend.OpenXR.ExcludeExt to exclude specific extensions. #444
  • Added Backend.OpenXR.SetHandJointScale for scaling joint sizes that come from the hand tracking extension, for #337
  • Added Backend.OpenGL_WGL, OpenGL_GLX, and OpenGLES_EGL, along with related enum values to Backend.Graphics. #382

Input

  • Added Input.HandSource for figuring out what type of hand data is currently present.
  • Added Input.Mouse.Ray.
  • Added customizable poses for the hand simulation: Input.HandSimPoseAdd, Input.HandSimPoseRemove, and Input.HandSimPoseClear. #149
  • Added Input.KeyInjectPress/Release and Input.TextInjectChar to the public API. #630
  • Added OpenXR controller profile for Pico. #603, #632, thanks Ray!
  • Added support for XR_EXT_hand_tracking_data_source. When present, this allows SK to properly handle controllers that pretend to be hands. #667
  • Added support for XR_EXT_hand_interaction. Prevents an error popup on HoloLens 2. #490
  • Added support for XR_EXT_palm_pose, controller simulated hands may show up with a 'better' orientation.

Miscellaneous

  • Added SK.GetStepper and SK.GetOrCreateStepper.
  • Added overload for Renderer.Screenshot that takes a Pose instead of 2 Vec3s. #628
  • Added Renderer.Scaling, Multisample, SKSettings.renderScaling and renderMultisample. May not work on some runtimes, use carefully! #483
  • Added PNG support and JPEG quality to Renderer.Screenshot. #629
  • Added overloads for Renderer.Screenshot that provide raw color buffers in custom formats. #618, #622, thanks Austin!
  • Added RenderLayer.FirstPerson, ThirdPerson, AllFirstPerson, and AllThirdPerson enum values.
  • Default RenderLayer is now RenderLayer.AllFirstPerson.
  • Added IntPtr overloads for Sound.Read / WriteSamples.
  • Added Time.Frame.
  • Added Time.Step and deprecated Time.Elapsed, and added time_total instead of time_get in the C API.
  • Added extra operator overloads for doing math on Color.
  • Added backend_opengl_egl_get_config to C API. Thanks technobaboo! #451

Improvements and Changes

  • Mesh and Model bounds now update during animations.
  • Improved performance of Model.AddNode for large numbers of nodes. #383
  • Added support for multimaterial skinned meshes, thanks cameronfr! #495
  • Text material now uses DepthTest.LessEq, should help reduce z-fighting artifacts on far text.
  • Sprites now use DepthTest.LessEq by default.
  • Added auto-compile for shaders in the Assets folder.
  • Increased log verbosity for D3D11 calls and Linux/Win file loading.
  • Shaders now use filename instead of meta name for their id. #529
  • UI.Input now hides passwords. #552
  • UI.Input now scrolls when typing or moving past the end of the visible area.
  • Added a sound when dragging a UI.H/VSlider.
  • Added images to UI.Toggle and UI.Radio.
  • UI.Input now uses ButtonBehavior code, gaining backpress prevention. #600.
  • UI.Slider's push confirm mode can now also be pinched.
  • Improved layout for larger, custom sized image buttons. #571
  • Improved layout of multiline UI.Labels.
  • Improvements to UI.Panel's behavior.
  • Added extra functionality to UI.Input, now supports carat navigation and keyboard-based text selection. No finger based selection or multi-line yet. #434
  • Android will no longer fall back to flatscreen if MixedReality is specified.
  • Closing the SK Window when OpenXR+Win32 is running will now also close the SK app.
  • StereoKit can now run and shut down multiple times in the same process. #386
  • Added tex_scale property to the builtin Unlit shader.
  • Improved SK's hash table implementation for ~10x speed improvement.
  • D3D platforms now generate mip-maps for non-power-of-two textures.
  • Single Sprites now pick their id based on the Texture's id.
  • .obj loader now generates normals if none are found in the file.
  • Threadsafe add/remove for ISteppers. #542, #538
  • OpenXR initialization now only happens once.
  • SK.Initialize now picks an assembly based name if none is provided.
  • In stereokit.h, empty () parameter lists were switch to the more appropriate (void).
  • Added an improvement to the pinch point that prevents most "travel" when placing handles. #676
  • Improved logging for OpenGL shader compile issues.
  • Transparent displays no longer force a specific clear color, and the default clear color went from (0,0,0,1) to (0,0,0,0).
  • When using SK.Step, calling StereoKit functions in the loop instead of the callback is now valid.

SDK and Build Systems

  • .NET Core projects now obey ApplicationIcon.
  • Added auto-copy of Assets folder SKCopyAssets true/false, SKAssetFolder path, and SKAssetDestination path
  • Added ability to switch between the standard and Oculus version of the OpenXR Loader, SKOpenXRLoader.
  • Added SKOpenXRLoaderFolder and SKShaderStandardInclude to the SK MSBuild properties.
  • Lots of build improvements for StereoKit's core code, /develop should be much nicer to build from scratch! #392
  • Built-in shader files are now zipped, saves ~100kb.
  • skshaderc no longer requires GLEW on Linux, #291
  • Shader binary builds are now repeatable.
  • Removed Linux dependencies on libjsoncpp and libglew. #507 and #485
  • Cmake now works with Android, thanks Malek! #516
  • Updated OpenXR Loader to v1.0.30
  • Updated cgltf to v1.13
  • Updated miniaudio to v0.11.9.
  • Replaced TinyCThread with engine specific code.
  • StereoKit now targets Android v32 with a minimum of v29.
  • No longer define a JNI_OnLoad when built as a static Android library. #666
  • Added Android x64 and Win32 ARM64 binaries to the NuGet package.
  • Docs are now in their own repository.
  • OpenXR custom loader system now supports multiple binaries.
  • OpenXR custom loader system will now also search in the openxr_loader folder in your project.
  • On Android, StereoKitC and openxr_loader libraries are now automatically loaded by StereoKit.
  • Simulator window on Win32 will now restore its location from the last session.

Fixes

  • Fixed an issue with paths in skshaderc. #390
  • Fixed a bug in PassthroughFBExt.cs where it was still enabled even when the extension was absent. #392
  • Fixed a crash with GLTF files that don't have index buffers. #398
  • Fixed rotation correction of linear/step mode animations on root nodes. Cubic still may have issues.
  • Fixed a crash when switching to animations with more curves.
  • Fixed 'blinking' animations with Models that had single frame animation curves. #399
  • Fixed an issue with Windows style file paths preventing Android from locating a file. #399
  • Fixed crash when destroying assets that are currently in the draw queue (C side issue). #403
  • Fixed strange behavior of sound stream sample info. #427
  • Fixed SKG_LINUX_EGL option failing to compile, thanks technobaboo! #426
  • Fixed Model.Find / PlayAnim returning a valid result on failure. #422
  • Fixed mouse look on Wayland #428, thanks slitcch!
  • Fixed a number of multithreaded asset load bugs.
  • Fixed Solid's deconstructor not releasing the asset properly.
  • Fixed performance report giving wrong values for shutdown time.
  • Fixed mouse-based hand overshooting with movement during long frames.
  • Fixed an issue with the fallback file picker with paths that have no folders.
  • Fix for UI.ButtonImg's glitchy alpha fade. #440
  • Fixed extra padding on UI.ButtonImg with explicit size. #448
  • Fixed WASDQE during UI.Input text entry no longer moves the camera in the Simulator. #365
  • Fixed extra asset thread CPU usage. #467
  • Fixed a number of dangling asset references. #471
  • Fixed crash when failing to compile shaders.
  • Fix for EGL crashing in XR mode on Linux, thanks technobaboo! #458
  • Fixed issue with Platform.WriteFile adding an extra \0 character on Windows, #477
  • Fixed an issue with a missing library on UWP ARM via cmake, #501
  • Fixed an issue with parsing certain URIs in GLTF files.
  • Fixed an issue with the simulated hand's wrist joint not matching real hand data.
  • UI.Panel now uses the correct visual element. #484
  • Fixed an issue where ISteppers would sometimes Step before Initialize when added from a separate thread. #528
  • Fixed an issue with C# projects not gathering shaders for build. #537
  • Fixed an issue with asset reference counting where multithreaded dereferencing could occasionally cause an asset to be inappropriately destroyed. #535
  • Fixed crash with material.Shader = null, now falls back to Unlit.
  • Fixed a crash when assigning a Material's Shader a Shader with no global parameters.
  • Fixed UI using padding instead of gutter for spacing at the end of a Window.
  • Fixed UI.Text using the wrong depth.
  • Fixed UI.Label sizing wrong when not using padding.
  • Fixed a crash with multithreaded calls to Tex.SetColors. #528
  • Fixed a crash with multithreaded Shader creation. #561
  • Fixed multithreaded calls to SK.ExecuteOnMain. #568
  • Fixed an issue with not finding assets when invoking from dotnet run.
  • Fixed an issue with Model calculating incorrect bounds for some assets. #567
  • Fixed .obj loader crashing when faces pointed to invalid data indices.
  • Fix for custom GLX loader issue with Monado, thanks Moshi! #581
  • Fixed a Maui hack related to UWP library references. #586
  • Fixed glyph corruption bug when resizing font atlas. #575
  • Fixed bug with UIWin.Empty not being grabbable.
  • Fixed UIMove.None handles/windows showing far ray and focus highlighting.
  • Fixed shader build issue on Linux. #589
  • Fixed shader build issue with nested folders. #588
  • Fixed issue with auto-layout windows growing under certain settings. #593
  • Fixed issue with capabilities not being detected on the Holographic Remoting runtime.
  • Fixed facing UI Windows "flailing" when too close to the viewer.
  • Fixed UI.Popup offset when Renderer.CameraRoot was not identity.
  • Fixed a padding issue for explicit size labels.
  • Fixed an issue where untracked hands could interact with UI handles. Related to #599
  • Fixed a performance issue when submitting many small chunks of text all at once.
  • UI focus no longer changes over the course of the frame. #599
  • Fix occasional issue when drawing text in zero width sized boxes. #446
  • Fix return value for World.FromPerceptionAnchor when getting the pose was invalid. #616, thanks Austin!
  • Fixed an issue with mouse scroll on UWP. #655, thanks Austin!
  • Fix for crash when submitting a null image to a button and a non-none layout option.
  • Fix reference space not getting properly updated during space changes when using stage fallback for Floor origin mode. #715.
  • Fixed an issue with transparent textures not downsampling properly when creating mip-maps.
  • Various fixes for Snapdragon Spaces OpenXR runtime.

Internal Changes

  • Changed ids for some internal assets
    • render/skybox_mesh -> sk/render/skybox_mesh
    • render/skybox_material -> sk/render/skybox_material
    • platform/swapchain -> sk/platform/swapchain
    • platform/swapchain_zbuffer -> sk/platform/swapchain_zbuffer

Install or Update

Installation is via the dotnet templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.6

1 year ago

Another chonky update, v0.3.6 weighs in at over 200 commits! The primary focus for this update was adding asynchronous asset loading. This applies only to textures for now, but this helps significantly when trying to decode large and expensive .png or .jpeg files! A staged loading process will display temporary textures, and smartly load textures in order of importance. All of this is automatic in the background, with no breaking API changes. But that's definitely not all that we've been up to, check out the Feature Highlights below for a list of notable items!

A big thanks to all the contributors that have features is this release, as well as the Discord community's valuable feedback and testing! StereoKit is much better thanks to all of your contributions :)

Quick plugs

Just to highlight some related items here, there will be 3 StereoKit presentations at Mixed Reality Dev Days on June 8th! These won't be streamed, but will be made available online sometime after the event. If you'll be present at the event, do stop by and say hello! There will probably still be a few StereoKit stickers left :)

Also, Microsoft is hosting another MR hackathon that includes StereoKit! Plenty of prize money there too, so be sure to check it out if you have the time. We're very excited to see what you'll make!

Feature Highlights

Additions

Misc. Improvements

  • Updated OpenXR Loader to v1.0.22.
  • Updated ReactPhysics3D to v0.9.
  • Added support for Unicode in window titles, Win32 and Linux, #346, #347. Thanks @slitcch!
  • UI.HSlider pinch has better hit volumes now, should mean less window grabs. #335
  • Disabled UI elements now dim.
  • Improved UI shader finger ring visuals.
  • Increased vert count on default UI meshes for smoother corners.
  • System initialization log now happens before initialization, so crashes obviously show what system was initializing.
  • ISteppers can now be added before SK.Initialize, their Initialize call is deferred until after SK's initialization.
  • A number of docs updates from @paulmelis, @Zee2, @TopperDEL, and @Strepto!

Fixes

  • Tex.Rough is now (1,0,1,1) instead of (0,0,1,1).
  • Fixed Material.Copy crashing when provided null.
  • Fixed a bug in converting C# filenames to UTF-8.
  • Fixed the MR fallback FilePicker failing to parse Unicode text. #374
  • Fixed an issue where FilePicker would add a trailing \0 to C# strings.
  • Fixed a bug where the FilePicker would crash on cancel.
  • Fix for NRE when GLTF texture failed to load.
  • GLTF loader now supports interlaced data. #320
  • Fixed incorrect sprite alignment mixing up left and right.
  • Added a warning for when SK.Initialize and SK.Run happen on separate threads, or execution is transferred to a blocking asset. #361
  • Fixed an issue with UVs on non-unit sized rounded cubes.
  • Fixed incorrect alpha values getting written to the screen buffer, causing compositing artifacts.
  • Fixed an issue with Tex.GetColors returning black on separate threads.
  • Fixed a bug in Sound stream's ring buffer.
  • Fixed a bug in ui_quadrant_size_mesh.
  • Fix for fallback keyboard not accounting for Renderer.CameraRoot.
  • Fixed SK using unavailable stage bounds. Thanks @slitcch! #331
  • Fix for stage (World.BoundsPose) not locating when stage bounds weren't available.
  • Fix for crash when loading unavailable OpenXR functions via Backend.OpenXR.GetFunction.
  • Fix for a bug with UI.Push/PopPreserveKeyboard not working with elements downstream a UI.Input element.
  • Fix for simulated hand's palm pose being in the incorrect location.
  • Fix for ModelNode.Mesh improperly returning empty Mesh objects. #302, Thanks @Strepto !
  • Fix for Mesh references not releasing properly. #303, Thanks @Strepto!
  • Fix for UI.HSeparator sometimes adding an extra empty layout line.
  • Fix for empty layout line adding unwanted padding at the end of UI Windows.
  • File picker handles different filter formats better (*.x, .x, or just x). #309
  • SK handles audio playback failure more gracefully now.
  • Fix for non-msvc compilers complaining about SK_CONST's weird attributes, now it's just static const for those compilers.
  • Fix for improper capitalization in Linux shader compiler paths, thanks @slitcch!
  • Fix a number of issues related to loading libdl on .NET/Linux.
  • Fixed a GLX issue in the Linux graphics binding. #359, Thanks @ChristophHaag!
  • No longer request Monado's EGL extension when using GLX.
  • Fix for a surface resize failure on UWP flatscreen, #298.
  • Fixed an issue with loading StereoKitC.dll in C# when starting in a working directory different from the exe.
  • Fix for Win32 Windows not correctly restoring the mouse cursor sprite.
  • Fixed SK crashing when the flatscreen app starts with a window too large for the screen's resolution.

SDK and Sample Updates

  • Related StereoKit GitHub repositories were moved to the StereoKit organization!
  • Added a Windows desktop mirroring demo to C++.
  • Added a Windows window mirroring demo to C++.
  • Added environment map demo to C++.
  • Added point cloud rendering demo to C#.
  • Updated skshaderc to provide better errors to VS, generate files in folders that don't exist yet, and no longer treat warnings as errors. May fix #329
  • Added a "Dream Dev Template" C# project that includes Windows desktop duplication and Facebook's Passthrough extension.
  • Moved the Cmake and XPlat templates to their own repositories with some light revisions.
  • Updated StereoKit to VS 2022.
  • Cleaned up directory structure, less items in the root.
  • Added cmake option for removing physics, #354. Thanks @technobaboo and @slitcch!
  • Improved StereoKit's Visual Studio dependency build process.
  • Added StereoKit logo in .glb format.
  • Added StereoKit logo with background for GitHub dark mode.
  • Documenter support for operator overloads, #349.
  • Contributor's guide.
  • Updated samples for V and Zig.
  • Added oculus-openxr option to xmake for using non-oculus OpenXR loader.
  • Documented StereoKit's Row-Major matrix status, #352. Thanks @paulmelis!

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.5

2 years ago

v0.3.5 is a big, general improvement update composed of more than two months, ~185 commits, and code from 4 different people! This was also during the StereoKit hackathon, and many improvements here come from suggestions and reports from the participants. If you participated in the hackathon, thank you so much for the feedback! Everyone else should check out the awesome projects the hackers put together!

You won't find any huge features in this update, but there's a lot of smaller ones, and a ton of excellent fixes! I think everyone should find something in here to enjoy :) In particular, I'm pleased to have added SourceLink support! With a few easy tweaks, you can debug and step through StereoKit's source code, just from the NuGet package!

I'd also like to specifically thank @Faolan for their work on the fallback soft keyboard, among other things, @opl- for a couple of really great fixes, and @slitcch for catching a sneaky OpenXR input issue!

New Features

  • Added template support for VS 2022.
  • Added .qoi image format support.
  • Added MSAA to flatscreen UWP.
  • Added SourceLink, allows for stepping through SK's source in Debug!
  • Added fallback soft keyboard, thanks Faolan! Check out the demo code here.
  • Added Ctrl+Shift in the Simulator to swap between right and left hands.
  • Added a small debugging guide to the docs.
  • Added limited direct access to the OpenXR backend. #231

API additions

C/C++ API additions

  • Added vert_create.
  • Added matrix_t, matrix_r, matrix_s, and matrix_ts shorthands.
  • Added vec3_project, vec4_magnitude, vec4_normalize, and a few vector operators.
  • Added render_global_texture.

Fixes and improvements

  • Improved cubemap Spherical Harmonics calculation speed.
  • Improved .hdr load speed.
  • UI interaction glow is brighter.
  • Far interact auto-disable behavior was tweaked.
  • GLTF loader now supports emissionFactor.
  • Fixed support for Unicode in asset file paths on Windows. #254
  • Fixed an issue where the C# debugging data wasn't getting copied into projects.
  • Fixed a GLTF issue with multiple UV channels stomping on each-other.
  • Fixed a mouse issue on UWP related to DPI and UI scaling.
  • Fixes for header C compatibility.
  • Lines.AddAxis now draws lines on unit vectors, with a white line for Z Forward. #231
  • World.Bounds are now available immediately after SK.Initialize.
  • Fixed a bug in SKMath.AngleDist. #232
  • Fixed a bug with UI.Space. #248
  • Fixed issues with Renderer.CameraRoot related to latency and drifting World.Bounds.
  • Fixed rare phantom UI presses for purely axis locked motion.
  • Fixed an issue with mouse/keyboard input lag on Win32.
  • Fixed an issue with 'tracked' state with OpenXR controllers. Thanks Moses! #241
  • Fixed an issue with GLTF animations using cubic interpolation.
  • Fixed an issue with GLTF node based animations on root nodes being incorrectly rotated. #240
  • Fix for skinned meshes not updating when no animation is playing.
  • Reduced GLTF warning count on models with warnings.
  • Fixed a simulator position offset being applied when simulator is off.
  • Fixed Linux defaulting mouse to available at first load.
  • Fixed Linux not obeying window size settings.
  • Fixed refcount issue with ModelNodes.
  • Fixed an HSlider bug on Android.
  • Fixed a UWP file reference issue.
  • Fix for a Potential bug with auto-sizing labels
  • Fix for Linux/C#, where SK would prefer system SK libraries instead of its own
  • Matrix's internal System.Vector type is now public.
  • Miniaudio update that fixes an issue with mics on Linux, thanks opl-!
  • Fixed a Mixed Reality Capture compositing issue on HoloLens. #216
  • Fixed a bug in GL screenshots.

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.4

2 years ago

v0.3.4 brings skinned animation to StereoKit! I hope you'll enjoy using it as much as I've enjoyed making it :) Along with that comes a solid collection of bug-fixes, and some polish to the UI layout system. Plus a whole bunch more! A big thanks to @slitcch, @maxgolov, @sjando, and @aprilspeight, who all made contributions to this release!

In other big news, Microsoft is hosting a StereoKit hackathon for the month of November! It's a great moment to try StereoKit out, and maybe win some cash prizes along the way. Along with that, we'll be hosting some online social events and AMAs, so keep your eyes peeled for those, even if you aren't participating in the hack!

For those getting started with StereoKit, @aprilspeight has created a list of getting started videos! These are also embedded in the docs site, and should help ease new StereoKit devs into their first StereoKit application. Many thanks April!

And check out the new documentation guides for Drawing and Working with Materials! Keep your eyes peeled in November for more docs like these :)

New Additions

GLTF Additions

  • GLTF loader now supports skinning and animation data. Doesn't include morph targets yet.
  • Added support for GLTF mask transparency.
  • .vrm files are now recognized as GLTF files. This does not include VRM specific extensions.
  • Added a fallback for Specular/Glossy GLTF materials, not a full implementation, but an improvement.
  • Additional logging surrounding some cases that aren't supported yet.

Bug Fixes

  • Fixed Unicode entry on Win32 while in VR.
  • Fixed right arrow key and del key on Linux. By @slitcch #192
  • Fixed some UI elements not sizing properly with custom text styles.
  • Fixed crash with mip-maps on unsupported formats. #195
  • Fixed a render sort issue when compiling for ARM. By @maxgolov #197
  • Fixed a crash on Windows devices lacking the Win10 SDK. #205
  • Fixed crash when Linux tried to read a folder as if it were a file. #183
  • Fixed an Android issue with Radio and Toggle buttons.
  • Fixed an issue with WMR and SteamVR where the system would provide insufficiently simulated articulated hands.

Development Tool Updates

  • VS Template was updated to use .Net Core 3.1 by default.
  • Added a new shader compiler backend that works on both Windows and now Linux.

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.3

2 years ago

Another two months and over 100 commits! Some really awesome features for this update including Unicode support, revamped Model inspection API, UI updates, anti-aliased flatscreen, and a whole bunch more! For a high level look at this update with some flashy gifs, check out the accompanying blog post!

I also really wanted to thank @ClonedPuppy for their input during this update, a good number of features and fixes came from their feedback!

New Additions

  • Added ModelNode API to the Model assets for detailed exploration of a Model's contents. Check here for some examples.
  • Added Model.Copy.
  • Added Model.Intsersect and a Ray.Intersect(Model) overload.
  • Added static and instance Vec2.InRadius and Vec3.InRadius methods.
  • Added Hand.pinchPt, a stable, non-sliding pinch location indicator.
  • Added UI.Model.
  • Added UI.PushSurface and UI.PopSurface for more control over placing UI layouts within the scene.
  • Added UI.HSlider confirmation mode VariablePinch, for more fine tuned manipulation of slider values.
  • Added UI.SetElementVisual to override UI Meshes and Materials, along with UI.QuadrantSizeVerts and UI.QuadrantSizeMesh to aid in working with 'quadrant sizing' meshes.
  • New UI panel look
  • Material now works with Vec2 and Vec3 material parameter types.
  • Material will now warn the developer if they try to set a parameter with the wrong type.
  • Unicode support in text rendering and entry.
  • Fonts are now composed of a series of font files, which will be searched in-order for any glyph.
  • Antialiasing in Flatscreen mode.
  • Removed partial FBX support, which was a little too partial.
  • Improved pointer ray based on shoulder estimate.
  • UWP ARM binaries added to the NuGet package.
  • Text shader now combines tint color alpha into the final alpha value.
  • Added texture sampler support for GLTF files.
  • Added a DemoWorldAnchor to the main collection of demos.

Bug Fixes

  • Fixed bug where Win32 file picker would change working directory.
  • Handles no longer slide when releasing the pinch gesture when pinch is driven by controllers/mouse, see Hand.pinchPt.
  • Poke interactions now account for finger radius.
  • Fixed issue with id overlap from equirect textures and regular textures created from the same file .
  • Renderer.Blit renders upside-right now.
  • GLTF material tint colors now use the correct color space.
  • Fixed Stepper initialization causing issues with late load libraries. #182
  • Fixed an issue with hand meshes and occlusion meshes not obeying the camera root transform. #184
  • OpenXR time is now available on the first frame, this affects a number of calls, such as World.Bounds. #188
  • Fixed a number of reference counting issues.
  • Fixed issue with xrCreateInstance failure not reporting the correct issue.
  • Fixed Android asset loading prefix issue.
  • Fixed a crash when using UWP with the Oculus runtime.

Native Specific Additions

C# methods and properties all have an equivalent C++ function, but here are some additional changes that are of interest specifically to the native developer.

  • Partial cmake support (Windows and Linux).
  • Native cmake based C++ template.
  • Asset types now have _addref functions.
  • Added color_hex, color32_hex, and color32_to_128.
  • Added material_set_vector2, material_set_vector3, material_set_vector4.
  • Unicode support for UTF-8 and UTF-16, see the text_* and text_*_16 functions, as well as ui_* and ui_*_16.
  • Added a complex lighting demo to StereoKitCTest.
  • Default text_style_t is now 0 instead of -1.

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.2

2 years ago

This update brings in support for a couple new extensions, as well as a steady march of general improvements! In particular, the recently added XR_MSFT_scene_understanding extension makes world occlusion and raycasting just a line of code away for HoloLens 2 devices. Also, the file picker is now integrated into StereoKit's core, and works properly with native pickers and permissions when available!

Many thanks to @slitcch and @technobaboo for their contributions to this update!

Additions

Changes/Improvements

  • Updates to the docs site, added additional information and improved some formatting.
  • Added new confirmation options to UI.HSlider, should allow for fewer accidental activations. #171
  • Diagnostic logging is now on by default.
  • Improved line rendering visuals. #156
  • Linux now loads the system's default font.
  • STL now loads as flat-shaded instead of smooth.
  • If a GLTF comes in without normals, they'll be automatically calculated.

Fixes

  • Fixed a bug where the Alt key was going unrecognized in Win32
  • Fixed a bug where the Perception Bridge extension was incorrectly disabled. #151
  • Fixed a bug where out-of-focus UWP apps were still receiving inputs.
  • Fixed a UI.Text layout issue.
  • StereoKit now recognizes absolute paths on Linux.
  • Cursor now properly reports unavailable when leaving window on Linux.

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

v0.3.1

3 years ago

A new API to interact with controller input was added. Hands are still the primary input device, whether simulated or articulated, but you can now get detailed information about the controller directly! A lot of work was also done to audio: a new Microphone API, streaming audio support, and and API for sound play instances.

Another big visual change was a new default lighting! The previous one was a little dim, and had a lot of extra color in it. The new one is much brighter and a lot less colorful, making it much easier to make white objects look white! If you want the old lighting back, see the bottom of this page for a code snippet.

UI also got a bunch of polish, a lot of small details were fixed, improved, or made prettier! An initial 2-handed grab was added, and a number of useful new UI functions were added. The HSeparator and Push/PopTextStyle methods allow for some extra styling of your UI, and UI.Text enables you to display large blocks of text! UI.Input also got an overhaul that makes it look better, and behave far nicer!

During this update, Varjo also shipped a conformant OpenXR runtime! StereoKit worked with it out of the box, and the SKSettings.blendPreference option was added to hook into their passthrough AR capabilities. A pass was also done on Quest to make the experience there nicer, it's now more stable, supports hand tracking, and brings back a few features that had been temporarily disabled for the v0.3 release.

Enjoy :)

Interactive Demo

To see a number of these new features in action, check out the interactive release notes demo!
https://github.com/maluoi/StereoKitReleaseNotes/tree/main/v0.3.1

Additions

Changes/Improvements

  • Improved the default lighting: brighter, less saturated, and white objects now feel white.
  • UI.Input text entry improvements, now spawns the OS virtual keyboard on UWP. #110
  • UIMove.FaceUser elements now account for hand's vertical position on the UI.
  • Button interaction is now a capsule->bounds intersection test instead of a line segment->bounds intersect, making hit detection more reliable.
  • Far Interact ray visual and behavior improvements. #125
  • Extra consistency and improvements in UI activation animations.
  • Monado now uses a rgb10a2 display surface.
  • Rounder fingertips with a new fingernail shape on the hand mesh.
  • Improved switching between hand tracking and controllers, this makes Quest much nicer to work with.
  • GLTF models now support multiple materials per-mesh, null materials, sparse vertex data, and additional data formats.
  • PBR shader now also uses the AO map.
  • DX11 now picks best graphics card on load.
  • Android systems use the OS default font.
  • Improved spatial audio fallback on Android/Linux, better falloff and stereo panning.
  • Improved UVs and geometry layout of procedural 3d shape types.
  • Default.MeshQuad was changed to be a normal quad, Default.MeshScreenQuad was added to contain the replaced mesh.
  • Improved performance reporting: now excludes vsync time, and includes app init time.

Fixes

  • Fix for Oculus color banding bug. #138
  • Fix for SphericalHarmonics missing when loading an already loaded cubemap.
  • Fixed a number of UI layout inconsistencies.
  • UI.AreaRemaining is accurate now.
  • Fixed a number of issues with UI.HSlider.
  • Fixed a crash on Android when loading sounds from file. #126
  • PBR shader now works on Quest. #127
  • Exit button on Quest now shuts down properly.
  • Fixed some loss of mouse movement on flatscreen UWP while look-rotating.
  • Fixed an issue preventing .Net Core 5 projects from working on Windows. #133
  • Fixed equirect cubemap conversion on Linux.
  • Fixed Renderer.CameraRoot not working on Linux.
  • Fix for equirect cubemap conversion failing before first frame on HoloLens.
  • Fixed some visual bleed on the second mip of text.
  • Fixed a near clipping plane issue on DX systems.

Install or Update

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

If you already have a project using StereoKit, go to Project->Manage NuGet Packages, and update to this version! Do a full rebuild of your project afterwards.

Old Lighting

If you need the old lighting/skybox back, stick this after SK.Initialize:

Renderer.SkyLight = new SphericalHarmonics(new Vec3[] {
    new Vec3( 0.27f,  0.26f,  0.25f),
    new Vec3( 0.07f,  0.09f,  0.11f),
    new Vec3(-0.06f, -0.06f, -0.04f),
    new Vec3(-0.06f, -0.04f, -0.01f),
    new Vec3(-0.04f, -0.05f, -0.06f),
    new Vec3( 0.15f,  0.16f,  0.16f),
    new Vec3(-0.04f, -0.05f, -0.05f),
    new Vec3( 0.05f,  0.05f,  0.04f),
    new Vec3(-0.11f, -0.13f, -0.13f),
});
Renderer.SkyTex = Tex.GenCubemap(Renderer.SkyLight);

v0.3

3 years ago

I would describe v0.3 as the platform compatability update! This big update has been a lot of work, but brings in initial support for Oculus Quest 1 & 2 on Android, as well as Linux! This meant a complete overhaul of the graphics pipeline, and even resulted in the development of a new single-header cross platform graphics library, sk_gpu.h!

Additions

Changes

  • The StereoKitApp class is now SK, and the initialization flow has been re-worked to better accomodate Android.
  • C# math types (Vec/Matrix/Quat etc.) are now based on System.Numerics, allowing for easier interop with other libraries.
  • Shader meta syntax has been changed, additional details about this will be in an upcoming guide, see the builtin shaders for now.
  • Instanced rendering pattern changed, and now renders more than 2x the previous number of instances at once.
  • Removed direct Leap support in favor of Leap's OpenXR layer.

There's a lot more, but I'll say these are most of the big items! This update has been in the works for 8 months, and you can see all the changes over in this commit :)

Install

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html

v0.2.1

3 years ago

Exciting update! StereoKit now works on SteamVR's OpenXR runtime! Also, a number of features finally land as OpenXR 1.0.9 brings a couple cool extensions out of preview. Which means StereoKit also now supports OpenXR's hand tracking instead of UWP's, 3rd eye render for more accurate screenshots/video, as well as QR code support!

Additions / Changes

  • SteamVR support!
  • Updated to OpenXR 1.0.9.
  • QR Code support through the OpenXR Spatial Bridge extension. See Pose.FromSpatialNode.
  • 3rd eye render on HoloLens 2 though the OpenXR Secondary View extension! Now your holograms will line up with the real world :)
  • Articulated hand tracking through OpenXR. Previously was platform specific through UWP functions.
  • Flatscreen options to set FOV and background clear color
  • stereokit.h is now fully C compatible, allowing for easier interop with other languages. See here for basic V and Zig examples.
  • Default asset ids are now available as constants in C.

Fixes

  • Fixed OpenXR implementation ignoring near/far clip planes.

Install

Installation is via Visual Studio templates and NuGet, please refer here for instructions! https://stereokit.net/Pages/Guides/Getting-Started.html