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
| #define PI acos(-1.0) | |
| struct Note | |
| { | |
| float freq; | |
| }; | |
| Note GetNote(int index) | |
| { | |
| Note n; |
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
| #define PI acos(-1.0) | |
| #define VOLUME pow(10.0, -5.0/10.0) | |
| float DB(float db) { return pow(10.0, db/10.0); } | |
| float random(float co) { return fract(sin(co*(91.3458)) * 47453.5453); } | |
| struct Note | |
| { | |
| float freq; | |
| }; |
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
| #define TAU (2.*3.14159265) | |
| float DB(float db) { return pow(10.0, db/10.0); } | |
| float sawWave(float phase) | |
| { | |
| return fract(TAU*phase); | |
| } | |
| float chordWave(float phase, int chord, int key) | |
| { |
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 DG.Tweening; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public class DOTweenMoveWindow : EditorWindow | |
| { | |
| #region Class | |
| /// <summary> | |
| /// Tweenの状態 | |
| /// </summary> |
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.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering.Universal; | |
| public class DrawMeshFeature : ScriptableRendererFeature | |
| { | |
| [SerializeField] private Material materialAsset; | |
| [System.NonSerialized] private Mesh _mesh; | |
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 MYTOON_BASE_INCLUDED | |
| #define MYTOON_BASE_INCLUDED | |
| #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" | |
| float4x4 _LightVP; // Projection * View | |
| float4 _LightPos; // ライト位置 | |
| sampler2D _SelfShadowMap; | |
| sampler2D _MainTex; | |
| float _DepthOffset; |
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 "Zenn/Character-Body" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| [Header(Stencil)] | |
| [Space] | |
| _StencilRef("Stencil Ref", Int) = 0 | |
| [Enum(UnityEngine.Rendering.CompareFunction)]_StencilComp("Stencil Comp", Int) = 0 | |
| [Enum(UnityEngine.Rendering.StencilOp)]_StencilPassOp("Stencil Pass", Int) = 0 |
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 "Hidden/CustomImageEffect" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| } | |
| SubShader | |
| { | |
| // No culling or depth | |
| Cull Off ZWrite Off ZTest Always |
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 "Unlit/SimpleTess" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _TessFactor ("Tess Factor", Vector) = (1, 1, 1, 1) // テセレーション係数 (メッシュをどれくらい分割するかを決定する) | |
| } | |
| SubShader | |
| { | |
| Tags |
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 UnityEngine.Rendering; | |
| | |
| namespace Study | |
| { | |
| public class ColorAndDepthPipeline : RenderPipeline | |
| { | |
| private static readonly int ColorAttachmentId = Shader.PropertyToID("_CameraColorAttachment"); | |
| private static readonly int DepthAttachmentId = Shader.PropertyToID("_CameraDepthAttachment"); | |
| private static UnityEngine.Experimental.Rendering.GraphicsFormat ColorFormat = SystemInfo.GetGraphicsFormat(UnityEngine.Experimental.Rendering.DefaultFormat.LDR); |