Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / noscript-tracking.go
Created May 8, 2019 12:10 — forked from wybiral/noscript-tracking.go
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
// make the SteamVR_LaserPointer.scene actually work
// https://answers.unity.com/questions/1600790/how-to-implement-steamvr-laser-pointer.html?childToView=1622254#answer-1622254
using UnityEngine;
using UnityEngine.EventSystems;
using Valve.VR.Extras;
public class SteamVRLaserWrapper : MonoBehaviour
{
private SteamVR_LaserPointer steamVrLaserPointer;
@unitycoder
unitycoder / Rendering.txt
Last active May 6, 2019 11:40
Rendering Notes - Lighting SRGB HDR LDR
blender srgb + aces:
https://www.youtube.com/watch?v=m9AT7H4GGrA
http://vizguy.com/resources/linear-workflow/
@unitycoder
unitycoder / RayMarchingSpheres.cs
Last active April 19, 2024 08:17
Unity Ray Marching with Sphere Tracing
// unity ray marching with sphere marching : https://unitycoder.com/blog/2019/05/06/ray-marching/
// based on Ray Marching tutorial from The Coding Train https://www.youtube.com/watch?v=-6iIc6-Y-kk
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RayMarchingSpheres : MonoBehaviour
{
// place spheres under this root gameobject
@unitycoder
unitycoder / steamvr.txt
Last active May 17, 2023 06:49
SteamVR HTC Vive notes VR
// No ui interaction action has been set on this component.
Need to use correct(custom) SteamVR_LaserPointer.cs ??
// view steamvr plugin version
check Assets/SteamVR/readme.txt
// hands are not moving
check if missing StreamingAssets\SteamVR\ json files?
// clear teleport marker, after teleport (using separate invisible highlight material as default)
@unitycoder
unitycoder / RenderToTextureWithoutCamera.cs
Created April 24, 2019 08:59
Render To Texture Without Camera
// https://forum.unity.com/threads/render-to-texture-without-a-camera.235053/#post-4464151
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RenderToTextureWithoutCamera : MonoBehaviour
{
public Material material;
public RenderTexture rt;
@unitycoder
unitycoder / Coordinate.cs
Created April 17, 2019 08:13
Lat Lon Coordinate Tools Unity - Haversine Distance - Rect - Latitude Longitude
// https://forum.unity.com/threads/how-can-i-show-real-time-gps-coordinates-on-a-terrain-created-at-unity.643471/#post-4437667
using System.Collections.Generic;
using UnityEngine;
using Unity.Mathematics;
[System.Serializable]
public struct Coordinate
{
#region FIELDS
@unitycoder
unitycoder / RansacLines.cs
Last active August 22, 2019 19:43
RANSAC line fitting 2D Unity C#
// RANSAC line fitting 2D
// converted to unity from this pseudocode http://www.visual-experiments.com/demo/ransac.js/
// USAGE: add some gameobjects as a child of this gameobject, those are considered as the points, then adjust threshold
// https://unitycoder.com/blog/2019/04/04/ransac-2d-line-fitting/
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class RansacLines : MonoBehaviour
@unitycoder
unitycoder / effects.txt
Last active May 13, 2019 21:12
Effects
sprite parallax
https://old.reddit.com/r/Unity3D/comments/b5rd4o/simple_parallax_effect_to_use_in_your_games_full/
screenspace
https://github.com/haolange/Unity_ScreenSpaceTechStack