This file contains 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
{ | |
"m_SGVersion": 3, | |
"m_Type": "UnityEditor.ShaderGraph.GraphData", | |
"m_ObjectId": "846b720daa234189888e682ef96a9201", | |
"m_Properties": [ | |
{ | |
"m_Id": "f3154d49096f4a8aa3639b6bb9f1b958" | |
}, | |
{ | |
"m_Id": "b722c38c97db4218971d2ac3f6ee8964" |
This file contains 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
import dynamic from "next/dynamic"; | |
import p5Types from "p5"; | |
const Sketch = dynamic(import("react-p5"), { | |
loading: () => <></>, | |
ssr: false, | |
}); | |
const LinearColorSpaceGradient = () => { | |
let rectHeight: number; | |
let rectWidth: number; |
This file contains 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/HalfLambert" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_Color ("Color", Color) = (1,1,1,1) | |
[Toggle(IS_DARK)] _IsDark ("Is Dark", Float) = 0 | |
} | |
SubShader | |
{ |
This file contains 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/SpriteAnimation" | |
{ | |
Properties | |
{ | |
[NoScaleOffset] _MainTex ("Main Texture", 2D) = "white" {} | |
_Column ("Column",Int) = 0 | |
_Row ("Row",Int) = 0 | |
} | |
SubShader | |
{ |
This file contains 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/VertexColorAnimation" | |
{ | |
Properties {} | |
SubShader | |
{ | |
Pass | |
{ | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag |
This file contains 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
const Gravity = 9.8; | |
export const DegreeToRadian = (degree: number) => { | |
return degree * (Math.PI / 180); | |
}; | |
export const ProjectileMotionX = (v0: number, degree: number, time: number) => { | |
return v0 * Math.cos(DegreeToRadian(degree)) * time; | |
}; | |
export const ProjectileMotionY = (v0: number, degree: number, time: number) => { |
This file contains 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/FlagAnimation" | |
{ | |
Properties | |
{ | |
[NoScaleOffset] _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_WaveFreq ("Wave Freq",float ) = 1.0 | |
_TimeSpeed ("Time Speed",float ) = 1.0 | |
} | |
SubShader | |
{ |