Skip to content

Instantly share code, notes, and snippets.

Avatar
😇

EsProgram EsProgram

😇
View GitHub Profile
@EsProgram
EsProgram / UVChecker.cs
Last active Sep 30, 2016
UnityでUVを確認するエディタ拡張
View UVChecker.cs
using System.Collections;
using System.Text;
using UnityEditor;
using UnityEngine;
public class UVChecker : EditorWindow
{
private GameObject targetGameObject;
private MeshFilter targetMeshFilter;
private Texture2D tex;
@EsProgram
EsProgram / RaymarchingRenderer.cs
Last active Mar 21, 2016
UnityでRaymarchingする際にカメラに取り付けるスクリプト[http://esbrog.hatenablog.com/]
View RaymarchingRenderer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Rendering;
[ExecuteInEditMode, RequireComponent(typeof(Camera))]
public class RaymarchingRenderer : MonoBehaviour, IDisposable
{
private const CameraEvent RENDER_PASS = CameraEvent.AfterGBuffer;
@EsProgram
EsProgram / SceneViewCamera.cs
Last active Dec 12, 2021
Unityのカメラ用スクリプト。Sceneビューのようなマウス操作でカメラを移動可能にする。
View SceneViewCamera.cs
using UnityEngine;
/// <summary>
/// GameビューにてSceneビューのようなカメラの動きをマウス操作によって実現する
/// </summary>
[RequireComponent(typeof(Camera))]
public class SceneViewCamera : MonoBehaviour
{
[SerializeField, Range(0.1f, 10f)]
private float wheelSpeed = 1f;
@EsProgram
EsProgram / GBufferVariant.cginc
Created Mar 17, 2016
G-Bufferを見てみる
View GBufferVariant.cginc
#ifndef GBUFFER_VARIANT
#define GBUFFER_VARIANT
sampler2D _CameraGBufferTexture0;
sampler2D _CameraGBufferTexture1;
sampler2D _CameraGBufferTexture2;
sampler2D _CameraGBufferTexture3;
#endif //GBUFFER_VARIANT
@EsProgram
EsProgram / file0.txt
Last active Dec 19, 2016
UnityのShader Variantについて調べてみた ref: http://qiita.com/Es_Program/items/79edf9f8fca786b365aa
View file0.txt
#pragma multi_compile _ Lighting_ON Lighting_OFF
@EsProgram
EsProgram / NextPage.shader
Created Mar 12, 2016
ページめくる感じのアニメーションできるシェーダー
View NextPage.shader
Shader "MBL/NextPage"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
_PageTex("PageTexture", 2D) = "white" {}
_AlphaMask("AlphaMask", Range(0, 1)) = 0.1
_Flip("Flip",Range(-1, 1)) = 0
}
SubShader
@EsProgram
EsProgram / Repeat.shader
Created Mar 12, 2016
背景リピート(Target依存)
View Repeat.shader
Shader "MBL/Repeat"
{
Properties
{
[NoScaleOffset]
_MainTex("Texture", 2D) = "white" {}
_OffsetX("OffsetX", Float) = 0.0
_OffsetY("OffsetY", Float) = 0.0
}
SubShader
@EsProgram
EsProgram / ExecutionOrderManager.cs
Created Mar 8, 2016 — forked from Skybladev2/ExecutionOrderManager.cs
Explicit script exection order for Unity scripts
View ExecutionOrderManager.cs
using System;
using UnityEditor;
[InitializeOnLoad]
public class ExecutionOrderManager : Editor
{
static ExecutionOrderManager()
{
foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts())
{
@EsProgram
EsProgram / UIFade1.shader
Last active Mar 6, 2016
それぞれ同じようなエフェクト(もとのマスク画像を加算するかどうかの違い)
View UIFade1.shader
Shader "MBL/UI/UIFade"
{
Properties
{
[HideInInspector]
_MainTex ("Texture", 2D) = "white" {}
_BGTex("BGTexture", 2D) = "white" {}
_Clip ("Clip", Range(0,1)) = 0
_SrcCol ("SourceColor", Color) = (0,0,0,1)
_DstCol ("DestinationColor", Color) = (1,1,1,1)
@EsProgram
EsProgram / AudioKey.cs
Last active Mar 21, 2017
Unity Audio Manager
View AudioKey.cs
/*手動で変更しないでください*/
public enum AudioKey
{
}