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
| # =============== # | |
| # Unity generated # | |
| # =============== # | |
| # temporary files that you do not want to share with other users | |
| Temp/ | |
| Obj/ | |
| UnityGenerated/ | |
| Library/ | |
| # optional, but you likely do not want to store | |
| # your builds in your git repo due to size |
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 UnityEngine; | |
| using UnityEngine.EventSystems; | |
| //by Ralph Barbagallo | |
| //www.flarb.com | |
| //www.ralphbarbagallo.com | |
| //@flarb | |
| public class VRInputModule : BaseInputModule { |
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
| 1) : VPOS not supported for pixel-position in fragment program | |
| NOT FUNCTIONAL workaround: (see https://gist.github.com/aras-p/8e0c061d4e2490c1f8e2 ) | |
| #if defined(SHADER_API_D3D11) | |
| #define VPOS_TYPE float4 | |
| #define VPOS_SEM WPOS | |
| #else | |
| #define VPOS_TYPE float2 | |
| #define VPOS_SEM VPOS | |
| #endif | |
| half4 frag( v2f IN, VPOS_TYPE in_vpos : VPOS_SEM ) : COLOR |
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
| void vert(inout appdata_full v, out Input o) | |
| { | |
| UNITY_INITIALIZE_OUTPUT(Input, o); | |
| // get the camera basis vectors | |
| float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22); | |
| float3 up = float3(0, 1, 0); //normalize(UNITY_MATRIX_V._m10_m11_m12); | |
| float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02); | |
| // rotate to face camera |
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
| sampler2D _CameraNormalsTexture; | |
| float4x4 _CameraToWorld; | |
| v2f vert (appdata v) | |
| { | |
| v2f o; | |
| o.pos = mul(UNITY_MATRIX_MVP, v.vertex); | |
| o.uv = ComputeScreenPos (o.pos); | |
| o.ray = mul (UNITY_MATRIX_MV, v.vertex).xyz * float3(-1,-1,1); | |
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 System.Collections.Generic; | |
| namespace UnityEngine.UI | |
| { | |
| [AddComponentMenu ("UI/Effects/Shadow", 14)] | |
| public class Shadow : BaseVertexEffect | |
| { | |
| [SerializeField] | |
| private Color m_EffectColor = new Color (0f, 0f, 0f, 0.5f); |
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
| /** | |
| * converts a XYZ vector3 to longitude latitude (Direct Polar) | |
| * @param lng longitude | |
| * @param lat latitude | |
| * @param vector3 optional output vector3 | |
| * @returns a unit vector of the 3d position | |
| */ | |
| function lonLatToVector3( lng, lat, out ) | |
| { | |
| out = out || new THREE.Vector3(); |
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 UnityEngine; | |
| public static class ConfigurableJointExtensions | |
| { | |
| /// <summary> | |
| /// Sets a joint's targetRotation to match a given local rotation. | |
| /// The joint transform's local rotation must be cached on Start and passed into this method. | |
| /// </summary> | |
| public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
| { |
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 UnityEngine; | |
| using UnityEditor; | |
| using System.Collections; | |
| using System; | |
| using System.Linq; | |
| using System.Reflection; | |
| [InitializeOnLoad] | |
| public class RXLookingGlass | |
| { |
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
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |