Skip to content

Instantly share code, notes, and snippets.

Yannick Comte demonixis

Block or report user

Report or block demonixis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
demonixis / XRSubSystemTest.cs
Created Jan 13, 2020
A demonstration of how to use the all new XRSubsystem with Unity 2019.3+
View XRSubSystemTest.cs
using UnityEngine;
using UnityEngine.XR;
using UnityEngine.XR.Management;
public class XRSubSystemTest : MonoBehaviour
public void Start()
var xrSettings = XRGeneralSettings.Instance;
if (xrSettings == null)
demonixis / RudderVirtualDevice.cs
Created Feb 21, 2018
An input driver for InControl using the 3DRudder controller.
View RudderVirtualDevice.cs
using InControl;
using ns3DRudder;
using Unity3DRudder;
using UnityEngine;
namespace Demonixis.MarsExtraction.Inputs
public class RudderVirtualDevice : InputDevice
private Axis m_Axis;
demonixis / FXAA-SPS.shader
Created Dec 14, 2017
An attempt to make this FXAA shader compatible with Single pass Stereo Rendering
View FXAA-SPS.shader
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Hidden/FXAA3" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
SubShader {
Pass {
ZTest Always Cull Off ZWrite Off
demonixis / PostProcessUWPShim.cs
Last active Nov 29, 2018
This WIP shim allows you to build the PostProcess Stack V2 for Unity with the Universal Windows Platform target. But before you have to add a little change in the `PostProcessEffectSettings.cs`. Please read the first comment.
View PostProcessUWPShim.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
You've to edit the file PostProcessEffectSettings.cs (~ line 27) and add a preprocessor instruction
demonixis / AsyncProcessTest.cs
Created Aug 31, 2017
Implementation example of a Task with C# 5+
View AsyncProcessTest.cs
using System;
using System.Threading.Tasks;
namespace ConsoleApp1
public class AsyncProcessTest
// This function is going to start an expensive process.
// Thanks to async/await the main Thread will not be blocked!
public async void Initialize()
demonixis / WindowsMixedRealityService.cs
Last active Sep 14, 2017
The service I use in GunSpinningVR to detect controllers availability. `GunController` is the object responsible to controll guns and `UnityVRController` is the object responsible to update position/rotation/button states.
View WindowsMixedRealityService.cs
using UnityEngine;
using UnityEngine.XR.WSA.Input;
namespace Demonixis.GunSpinningVR.Controllers
public sealed class WindowsMixedRealityService : MonoBehaviour
demonixis / OsvrGetDistortion.cs
Created Apr 1, 2017
A function to get the distortion parameters for an OSVR Application.
View OsvrGetDistortion.cs
public Vector3[] GetDistortionParams()
var displayConfig = _context.GetDisplayConfig();
var numViewers = displayConfig.GetNumViewers();
var distortionParams = new Vector3[2];
if (numViewers != 1)
return -1;
for (uint viewer = 0; viewer < numViewers; viewer++)
demonixis / OsvrDistortion.cs
Last active Jan 3, 2018
A distortion correction effect for Unity.
View OsvrDistortion.cs
using UnityEngine;
namespace OSVR.Unity
public sealed class OsvrDistortion : MonoBehaviour
private bool isSupported = true;
private Material distortionMaterial = null;
demonixis / PlayVideoUnity56beta.cs
Created Feb 7, 2017
Playing a video with the new VideoPlayer component with Unity 5.6 beta.
View PlayVideoUnity56beta.cs
public class VideoManager : MonoBehaviour
private RenderTexture _renderTexture = null;
private VideoClip _videoClip = null;
private IEnumerator Start()
Application.runInBackground = true;
demonixis / OculusTouchVirtualDevice.cs
Created Dec 26, 2016
An input device for InControl for the Oculus Touch Controllers
View OculusTouchVirtualDevice.cs
using InControl;
using UnityEngine;
namespace Demonixis.Toolbox
public class OculusTouchVirtualDevice : InputDevice
private Vector2 _leftTouch =;
private Vector2 _rightTouch =;
You can’t perform that action at this time.