you can access free stuff with university, higher education email account. (if you have one, from attenting courses etc)
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://80.lv/articles/using-rendertexture-painting-shader/ | |
| Shader "Custom/Paint Diffuse" { | |
| Properties{ | |
| _MainTex("Main Texture", 2D) = "white" {} | |
| _PaintMap("PaintMap", 2D) = "white" {} // texture to paint on | |
| } |
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/keyboard-input-is-not-registered-when-unity-is-embedded-in-a-wpf-application.962928/ | |
| [StructLayout(LayoutKind.Sequential)] | |
| public struct RAWINPUTDEVICE | |
| { | |
| public ushort usUsagePage; | |
| public ushort usUsage; | |
| public uint dwFlags; | |
| public IntPtr hwndTarget; | |
| } | |
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://unitycoder.com/blog/2021/10/19/old-school-scrolling-text-with-shaders-rendertexture/ | |
| // this is for text mesh | |
| Shader "Unlit/TextFx" { | |
| Properties { | |
| _MainTex ("Texture", 2D) = "white" { } | |
| _Col1 ("Color 1", Color) = (1, 0.0, 0.0, 1.0) | |
| _Col2 ("Color 2", Color) = (0, 1, 0.0, 1.0) | |
| _Col3 ("Color 3", Color) = (0, 0, 1, 1.0) | |
| _Scale ("Scale", Float) = 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
| // I made an additional camera underneath my main camera, set the target texture to a render texture, | |
| // blit that texture through a material with a basic Image Effect Shader with: | |
| fixed4 frag(v2f i) : SV_Target | |
| { | |
| const float val = Linear01Depth(tex2D(_CameraDepthTexture, i.uv).r); | |
| return fixed4(val, val, val, 1); | |
| } | |
| // then used tex2dproj with my shadowPos to check if the |
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 UnityEngine.Timeline; | |
| using UnityEngine.Playables; | |
| using System.Collections.Generic; | |
| using UnityEditor.Timeline; | |
| using uOSC; | |
| using UnityEngine.Events; | |
| using EVMC4U; | |
| using VRM; |
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/soft-occlussion-shader.1188325/ | |
| Shader "CustomShader/Rim Light" { | |
| Properties { | |
| _Color ("Main Color", Color) = (1,1,1,1) | |
| _RimColor ("Rim Color", Color) = (1, 1, 1, 1) | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _RimWidth ("RimWidth", Range(0,20.0)) = 0.7 | |
| } | |
| 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/how-to-get-secondarytexture-at-runtime.980334/ | |
| public static class SpriteExtension | |
| { | |
| public static Texture2D GetSecondary(this Sprite sprite, int index) | |
| { | |
| var methods = sprite.GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic); | |
| foreach (MethodInfo methodInfo in methods) | |
| { | |
| if (methodInfo.Name == "GetSecondaryTexture") | |
| { |
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/1741279/right-way-to-receive-images-over-tcp.html?childToView=1741342#answer-1741342 | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Text; | |
| using System.Threading; |
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 System.Collections; | |
| using System.Collections.Generic; | |
| public class RandomPointOnMesh : MonoBehaviour | |
| { | |
| public MeshCollider lookupCollider; | |
| public bool bangGetPoint; | |
| private Vector3 randomPoint; |