- project settings, package manager, enable preview packages
- import openxr package
- https://docs.unity3d.com/Packages/com.unity.xr.openxr@1.0/manual/index.html#getting-started
- ...
- ...
- editor hangs on example scenes
- fall back to 2019.4 and steamVR legacy mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Bake Vertex Color Map" | |
| { | |
| SubShader | |
| { | |
| Pass | |
| { | |
| ZTest Off | |
| ZWrite Off | |
| Cull Off | |
| CGPROGRAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://stackoverflow.com/a/61267482/5452781 | |
| // ffplay rtp://0.0.0.0:your_port | |
| using System; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using UnityEngine; | |
| public static class RtpPacket |
from Landom Thomas https://landonthomas.net/docs/gpu_compute_model_terms_quick_ref.pdf
| Compute Abstraction Hierarchy | Microsoft HLSL | Khronos GLSL | Khronos OpenCL C | Nvidia,CUDA C | AMD,HIP | Apple,MSL |
|---|---|---|---|---|---|---|
| Entire Kernel/Shader Compute Space | Dispatch | Dispatch, Compute Space | NDRange, Index Space | Grid | Grid | Grid |
| Major Compute Group | Group, Thread Group | Workgroup, Local Workgroup | Work-group | Block, Thread Block | Block | Threadgroup |
| Minor Compute Group (& Device Minor SIMD Unit) | Wave | Subgroup | Sub-group | Warp | Wavefront, Wave, Warp | SIMD-group |
| Quad Compute Object | Quad Wave | Subgroup Quad | ? | Quad | Quad | Quad-group |
| Single Compute Object | Thread | Invocation | Work-item | Thread | Thread | Thread |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://forum.unity.com/threads/onaudiofilterread-question.170273/#post-1164846 | |
| using UnityEngine; | |
| using System; // Needed for Math | |
| public class SineWave : MonoBehaviour | |
| { | |
| // un-optimized version | |
| public double frequency = 440; | |
| public double gain = 0.05; | |
| private double increment; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://forum.unity.com/threads/toggle-between-2d-and-google-cardboard.902378/#post-6959573 | |
| Coroutine StartVR() | |
| { | |
| return StartCoroutine(startVRRoutine()); | |
| IEnumerator startVRRoutine() | |
| { | |
| // Add error handlers for both Instance and Manager | |
| var xrManager = XRGeneralSettings.Instance.Manager; | |
| if (!xrManager.isInitializationComplete) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // related topic https://forum.unity.com/threads/create-grid-in-mesh-triangle.1078211/ | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class TriangleDebugLines : MonoBehaviour | |
| { | |
| void Start() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| using UnityEngine; | |
| namespace NoiseCrimeStudios.Editor.Internal | |
| { | |
| /// <summary> | |
| /// Exposes the native Unity 'ScreenShotting' methods to Unity Menu & Shortcut keys. | |
| /// </summary> | |
| /// <remarks> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en-us"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://forum.unity.com/threads/texture2d-loadrawtexturedata.223997/ | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class GrabTextureFromAsset | |
| { |