Skip to content

Instantly share code, notes, and snippets.

@ArieLeo
ArieLeo / MaterialKhronosTranslucencyFeature.cs
Created November 18, 2026 11:37 — forked from w0wca7a/MaterialKhronosTranslucencyFeature.cs
Translucency Material Feature for Stride
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
// Distributed under the MIT license.
//
// Alternative to MaterialSubsurfaceScatteringFeature: implements subsurface translucency
// per the Khronos KHR_materials_subsurface reference model, entirely in the forward pass.
// No compositor node, no SubsurfaceScatteringRenderFeature, no MaterialIndex render target —
// see the .sdsl file in this folder for the shading math and rationale.
//
// Because this implements IMaterialSubsurfaceScatteringFeature (the same marker interface as
// the built-in feature), it shows up as a sibling option in the same "Subsurface Scattering"
@ArieLeo
ArieLeo / RadialArrayV2.cs
Created November 18, 2026 11:36 — forked from w0wca7a/RadialArrayV2.cs
Modifier Example
using Stride.Assets.Models;
using Stride.Core;
using Stride.Core.BuildEngine;
using Stride.Core.Mathematics;
using Stride.Extensions;
using Stride.Graphics;
using Stride.Graphics.Data;
using Stride.Rendering;
using System;
using System.Linq;
@ArieLeo
ArieLeo / RXLookingGlass.cs
Created February 6, 2025 19:15 — forked from MattRix/RXLookingGlass.cs
This class wraps an internal Unity method that lets you to check if a ray intersects a mesh. Place it in an Editor folder.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System;
using System.Linq;
using System.Reflection;
[InitializeOnLoad]
public class RXLookingGlass
{
@ArieLeo
ArieLeo / AutoFitBoxCollider.cs
Created July 26, 2024 09:20
Autofit Box collider to Mesh Renderer Bounds, usefull when you are trying to adjust box collider on multiple objects at once
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
public static class AutoFitBoxCollider
{
[MenuItem("Tools/Autofit BoxCollider")]
private static void AutoFitBoxCollider()
{
var gos = Selection.gameObjects;
@ArieLeo
ArieLeo / MeshExtensions.cs
Created February 13, 2024 15:23 — forked from Doprez/MeshExtensions.cs
Get Vertices and Indices from a mesh in Stride3d
using Stride.Games;
using Stride.Rendering;
using System;
using Stride.Core.Serialization;
using Stride.Core;
using Stride.Physics;
using System.Collections.Generic;
using Stride.Core.Mathematics;
public static class MeshExtensions
@ArieLeo
ArieLeo / YourGameDefinition.cs
Created February 13, 2024 15:21 — forked from Eideren/YourGameDefinition.cs
How to setup async shader compilation in stride, note that the game will still freeze initially to compile the fallback
public class YourGameDefinition : Stride.Engine.Game
{
protected override void BeginRun()
{
base.BeginRun();
foreach( var feature in SceneSystem.GraphicsCompositor.RenderFeatures )
{
if( feature is MeshRenderFeature meshRf )
{
meshRf.ComputeFallbackEffect += FallbackForAsyncCompilation;
@ArieLeo
ArieLeo / AnimationEvent.cs
Created February 9, 2024 13:58 — forked from Doprez/AnimationEvent.cs
Stride Animation event trigger
using ImmoApocalypse.Code.Core.Structs;
using Stride.Core;
using Stride.Engine;
using System;
using System.Windows.Media.Animation;
namespace Core;
[DataContract(nameof(AnimationEvent))]
[AllowMultipleComponents]
@ArieLeo
ArieLeo / RenderObjectsPass.cs
Created September 27, 2023 13:44 — forked from wonkee-kim/RenderObjectsPass.cs
Unity URP sample -RenderObjects's RenderPass
using System.Collections.Generic;
using UnityEngine.Rendering.Universal;
using UnityEngine.Rendering;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine.Experimental.Rendering.Universal
{
[MovedFrom("UnityEngine.Experimental.Rendering.LWRP")] public class RenderObjectsPass : ScriptableRenderPass
{
RenderQueueType renderQueueType;
@ArieLeo
ArieLeo / RenderObjects.cs
Created September 27, 2023 13:44 — forked from wonkee-kim/RenderObjects.cs
Unity URP sample -RenderObjects's RendererFeature
using System.Collections.Generic;
using UnityEngine.Rendering.Universal;
using UnityEngine.Rendering;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine.Experimental.Rendering.Universal
{
[MovedFrom("UnityEngine.Experimental.Rendering.LWRP")]public enum RenderQueueType
{
Opaque,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class getBonesPath : MonoBehaviour {
public Transform obj;
public AnimationClip _clip;
public bool isOn;