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; | |
| using System.Collections; | |
| using UnityEngine; | |
| namespace UnityStandardAssets.Utility | |
| { | |
| public class DragRigidbody : MonoBehaviour | |
| { | |
| public LayerMask draggableLayerMask; |
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://answers.unity.com/questions/1479418/how-to-rotate-columns-of-a-rubiks-cube.html | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public enum ELayer | |
| { | |
| F, // front face (around z axis) | |
| R, // right face (around x axis) | |
| U, // upper face (around y axis) |
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
| //#if !defined(SHADER_API_OPENGL) | |
| float4 tex = tex2Dlod (_MainTex, float4(v.texcoord.xy,0,0)); | |
| v.vertex.y += tex.r * 2.0; | |
| //#endif | |
| https://forum.unity.com/threads/how-to-use-vertex-texture-fetch.63231/#post-405266 |
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 "Custom/StandardSurfaceShaderWithVertexColor" { | |
| Properties { | |
| _MainTint("Global Color Tint", Color) = (1,1,1,1) | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 200 | |
| CGPROGRAM | |
| #pragma surface surf Lambert vertex:vert |
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 "Custom/StandardSurfaceVertex" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,1,1,1) | |
| _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
| _Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
| _Metallic ("Metallic", Range(0,1)) = 0.0 | |
| } | |
| SubShader |
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/texture-bombing-lets-tackle-this-one.185724/#post-1278100 | |
| Shader "Annihlator/Raindrop TextureBomber" { | |
| Properties { | |
| _MainTex("Texture (RGB)", 2D) = "black" {} | |
| _BumpMap ("Normalmap", 2D) = "bump" {} | |
| _BombTex("Bomb Texture (RGB)", 2D) = "black" {} | |
| _RandomTex("Random Texture (RGB)", 2D) = "black" {} | |
| _Slider("Slider", Range(0,1)) = 1 | |
| _Params("Params, Z = Scale",Vector) = (0.037, 0.119, 5, 0) | |
| _ReflectionTex ("Reflection", 2D) = "white" { TexGen ObjectLinear } |
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/unity-vs-ipc.1162754/#post-7474082 | |
| using System; | |
| using UnityEngine; | |
| using TMPro; | |
| using System.Diagnostics; | |
| using System.IO.Pipes; | |
| using System.IO; | |
| using System.Threading; | |
| public class NamedPipeClient : MonoBehaviour |
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://farfarer.com/blog/2012/09/11/translucent-shader-unity3d/ | |
| Shader "Custom/Translucent" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _BumpMap ("Normal (Normal)", 2D) = "bump" {} | |
| _Color ("Main Color", Color) = (1,1,1,1) | |
| _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) | |
| _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 | |
| //_Thickness = Thickness texture (invert normals, bake AO). |
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
| #ifndef __MATRIX_INCLUDED__ | |
| #define __MATRIX_INCLUDED__ | |
| #define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
| float4x4 inverse(float4x4 m) { | |
| float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
| float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
| float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
| float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
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 "Test/SmoothZoomTexture" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| [KeywordEnum(Basic,Manual,Blend,Compare)]Mode("Mode", Int) = 0 | |
| _Blend("Blend", Range(0,1)) = 1 | |
| [Header(Mip Map)] | |
| _MipMapMin("MipMap Min", Int) = 4 |