HowTo Explore Stride's Shaders without installing Stride Studio

Accessing Stride’s base shaders and the shaders VL.Stride provide can easily confusing. Finding the right shader files is hard as they are stored in folders which are not easily found. Due to the flexible shading language featuring multiple inheritance it oftenly it stays opaque where variables are defined but the interested programmer hardly finds the right origin of those. Moreover, many of the base shaders are not available directly (as far as I can tell they are inacessible in a DLL), so interested people are expected to install Stride Studio to explore them. Even then, one oftenly has to look for the right files in different folders which is a tedious process.

@tonfilm enhanced a wonderful tool called Stride.ShaderExplorer that makes exploring the stride shaders much easier. It allows for quick browsing of all the shaders, search for them, see where base classes are from and where they are being used. The learning curve increases enourmously this way as one gets all shaders in one place and makes browsing a breeze. Still, the shader explorer expects you to install Stride Studio which can be a multiple gigabyte deployment. Here is a quick overview what you have to do to only install the few files necessary (without installing Stride Studio) and still be able to get the whole shader browsing experience if you only use VVVV.

Disclaimer: these steps work for VVVV Gamma 2021.4.10. Later versions might need adaptions.

Step 1: Download Shader.Explorer

Step 2: Create a .nuget folder (in case it does not exist)

  • make sure the folder c:\Users\yourusername\.nuget\packages exists. if it does not, create these folders

grafik

Note: Stride.ShaderExplorer will throw an exception on startup if it cannot find this folder.

Step 3: Install relevant Stride nugets
Two Stride nugets contain most base shaders we need to understand the dependency hierarchy - Stride.Rendering and Stride.Graphics.

  • Open VVVV Gamma
  • Open the Quad-menu and select Manage Nugets / Commandline
    grafik
  • With this command window open, we have to navigate to the .nuget\packages folder from Step 2
    • this can be done by typing cd %userprofile%\.nuget\packages (and hit enter)

  • We need to install two nugets for all the base shaders - Stride.Rendering and Stride.Graphics . Since installing those usually also downloads plenty of dependencies (hundreds of megabytes, which we don’t need for just viewing the shaders), we will omit those.
    • the following commands will install Stride.Rendering and Stride.Graphics in version 4.0.1.1428, which is the Stride version used by VVVV Gamma 2021.4.10.
      • nuget install Stride.Rendering -Version 4.0.1.1428 -DependencyVersion ignore
      • nuget install Stride.Graphics -Version 4.0.1.1428 -DependencyVersion ignore

Output should look like this

Step 4: Run Stride.ShaderExplorer
After opening Stride.ShaderExplorer we should see already plenty of Stride’s shader classes listed

Step 5: Add VL.Stride Effects as an Additional Shader Dir
Still missing are the shaders coming with VL.Stride. Those can be found in
C:\Program Files\vvvv\vvvv_gamma_2021.4.10\lib\packs\VL.Stride.Runtime.2021.4.10\stride\Assets\Effects
(If your VVVV version differs, adjust accordingly)

  • Press the Add Shader Dir Button in the top bar of Shader.Explorer
  • Click Browse
  • Add the above mentioned path to the list of dirs by selecting this folder in the tree

After closing, you should be good to go.

Step 6: Check
An easy way to check if everything went right is to filter for the VS_PS_Base class, which is the base class for DrawFX shaders

  • Enter e.g. vs_ps_base in the Filter list field on top of the window
  • see the shader column turn gray (mostly) and scroll until you see the VS_PS_Base shader
  • select it. You should now see the shader itself and in the right column the dependencies (ShaderBase, ShaderBaseStream, etc.), which all can be clicked for quick navigation.

Hope this helps!

PS: Please give feedback if anything does not work as expected or I’m overseeing something. I’ll then update this post accordingly.

11 Likes

How is it possible to find out the required versions of Stride.Rendering and Stride.Graphics in newer versions than 4.10?

for stable releases you can find this info in the About section of the hamburger menu, in previews the info you see there might not be correct.