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; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace OccaSoftware | |
| { | |
| public class FPSCounter : MonoBehaviour | |
| { | |
| float deltaTime; |
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; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Video; | |
| namespace OccaSoftware | |
| { | |
| [RequireComponent(typeof(VideoPlayer))] | |
| public class VideoPlayerManager : 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
| #ifndef GETCAMERAMOTIONVECTORS_INCLUDE | |
| #define GETCAMERAMOTIONVECTORS_INCLUDE | |
| #if defined(USING_STEREO_MATRICES) | |
| float4x4 _PrevViewProjMStereo[2]; | |
| #define _PrevViewProjM _PrevViewProjMStereo[unity_StereoEyeIndex] | |
| #define _ViewProjM unity_MatrixVP | |
| #else | |
| float4x4 _ViewProjM; | |
| float4x4 _PrevViewProjM; |
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
| // This method is called from the Vertex stage of Unity's Visual Effect Graph shader. | |
| // This function scales the size of the VFX Particle such that it occupies at least one pixel on screen. | |
| // It also modifies the alpha such that the alpha is inversely faded according to the change in size. | |
| void SubpixelAA(float3 position, inout float alpha, float size, inout float scaleX, inout float scaleY) | |
| { | |
| float2 localSize = size * float2(scaleX, scaleY); | |
| float clipPosW = TransformPositionVFXToClip(position).w; | |
| float minSize = clipPosW / (0.5f * min(abs(UNITY_MATRIX_P[0][0]) * _ScreenParams.x, abs(UNITY_MATRIX_P[1][1]) * _ScreenParams.y)); // max size in one pixel | |
| float2 clampedSize = max(localSize,minSize); | |
| float fade = (localSize.x * localSize.y) / (clampedSize.x * clampedSize.y); |
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; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // Note that the Halton bases must consist of coprime integers. | |
| // Learn more about the Halton sequence: https://en.wikipedia.org/wiki/Halton_sequence | |
| // Learn more about low discrepancy sequences: https://en.wikipedia.org/wiki/Low-discrepancy_sequence | |
| // Learn more about coprime numbers: https://en.wikipedia.org/wiki/Coprime_integers |
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
| // See manual: https://www.occasoftware.com/manual/altos | |
| using UnityEngine; | |
| using OccaSoftware.Altos.Runtime; | |
| [ExecuteAlways] | |
| public class DemoAltosAPI : MonoBehaviour | |
| { | |
| [SerializeField] | |
| private SkyDefinition skyDefinition; |