static const float PI = 3.14;
#define INV_FADE_DISTANCE 1.0 / (_FarFade - _NearFade)
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Diagnostics; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEditorInternal; | |
| using Debug = UnityEngine.Debug; |
| // Copyright 2020-2022 Andreas Atteneder | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| using System.Collections; | |
| using System.Collections.Generic; | |
| // using Sirenix.OdinInspector; | |
| using UnityEngine; | |
| using UnityEngine.Serialization; | |
| namespace BotaLab | |
| { | |
| /** | |
| * @brief A Unity Component to control position and rotation with PID controller |
| Shader "WorldNormalFromDepthTexture" | |
| { | |
| Properties { | |
| [KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
| LOD 100 |
| // Allows you to change the up vector in the scene view to the Z axis. | |
| // Y-up mode uses Unity's default implementation. | |
| // | |
| // Original code from Akulist on the Unity forums, modified by Freya Holmér: | |
| // • Fixed orbit+RMB zoom not working | |
| // • Toggling will now align the camera immediately to the new up vector | |
| // • When the camera is upside down in Z axis mode, left/right orbit will no longer be mirrored (pls fix this too Unity~) | |
| // • Moved toggle buttons to under the gizmo | |
| // • Fixed broken rotation state when focusing a different window in Unity and coming back to the scene view | |
| // |
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEditor.Overlays; | |
| using UnityEditor.SceneManagement; | |
| using UnityEditor.Toolbars; | |
| using UnityEngine; | |
| using UnityEngine.SceneManagement; | |
| using UnityEngine.UIElements; |
| //Author : https://github.com/seekeroftheball https://gist.github.com/seekeroftheball | |
| //Version : 1.0 | |
| //Updated : April 2023 | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| /// <summary> |
This is information that has been dug up by me and others in the Unity community. It's not official information from Unity (but most of the linked resources are). It is also not legal advise. I am not a lawyer.
Contrary to what Unity themselves are saying, for games made with these Unity versions, developers can elect not to be affected by a newer version of the Terms of Service that introduces the Unity Runtime Fee:
| Shader "Unlit/InfiniteGrid" | |
| { | |
| Properties | |
| { | |
| [Toggle] _WorldUV ("Use World Space UV", Float) = 1.0 | |
| _GridScale ("Grid Scale", Float) = 1.0 | |
| _GridBias ("Grid Bias", Float) = 0.5 | |
| _GridDiv ("Grid Divisions", Float) = 10.0 | |
| _BaseColor ("Base Color", Color) = (0,0,0,1) | |
| _LineColor ("Line Color", Color) = (1,1,1,1) |