Skip to content

Instantly share code, notes, and snippets.

@michaelybecker
michaelybecker / openxr_program.cpp
Last active January 25, 2021 22:19
hello XR without cubes
// helloXR with cubes and gray bg removed (just lines 951, 971 & 903 commented out)
// replace openxr_program.cpp in OpenXR-SDK-Source\src\tests\hello_xr with this file, then build
// Copyright (c) 2017-2020 The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0
#include "pch.h"
#include "common.h"
#include "options.h"
@michaelybecker
michaelybecker / cloudSettings
Last active January 19, 2021 20:31
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-01-19T20:31:48.411Z","extensionVersion":"v3.4.3"}
@michaelybecker
michaelybecker / iqcloudsSPI.shader
Last active November 11, 2019 21:41
Raymarched shadertoy clouds in Unity (SPI ready)
Shader "Custom/Raymarcher4"
{
// based on MichaelPohoreski's no-noise texture variation of iq's brilliant https://www.shadertoy.com/view/XslGRr
// code is a mess. Reader beware.
// wanted to put it out there as a quick & dirty example of raymarching in Unity, since info is scarce.
// of particular note: SPI macros for instancing on stereoscopic devices, and the rewritten camera logic (no more rays-through-uvs, we're in "real" camera land now!)
// hope this is useful!
Properties
{
@michaelybecker
michaelybecker / StackDoFAutoFocus.cs
Last active October 16, 2021 22:01
DoF AutoFocus for Unity's new postprocessing stack
// An adaptaion of Frank Otto's AutoFocus script for Unity's new PostProcessing Stack
// Original at: http://wiki.unity3d.com/index.php?title=DoFAutoFocus
// Adapted by Michael Hazani
// For more info see: http://www.michaelhazani.com/autofocus-on-whats-important
using UnityEngine;
using System.Collections;
using System;
using UnityEngine.PostProcessing;