Skip to content

Commit

Permalink
update shader
Browse files Browse the repository at this point in the history
  • Loading branch information
KimYC1223 committed Nov 25, 2022
1 parent 8c25a77 commit aa1100d
Show file tree
Hide file tree
Showing 223 changed files with 1,119 additions and 258 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/UnityPathGenerator/v17/.suo
Binary file not shown.
Binary file modified .vs/UnityPathGenerator/v17/Browse.VC.db
Binary file not shown.
396 changes: 317 additions & 79 deletions Assets/Editor/PathGenerator/PathGeneratorGUI.cs

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions Assets/Editor/PathGenerator/PathGeneratorGUILanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,53 +218,53 @@ static public void InitLocalization() {

key_text = "PG_TotalControl_SetZeroToX";
ENG_TEXT.Add(key_text, "X to 0");
KOR_TEXT.Add(key_text, "X값을 0으로");
KOR_TEXT.Add(key_text, "X값을\n0으로");
JAP_TEXT.Add(key_text, "X値を0に");

key_text = "PG_TotalControl_SetZeroToY";
ENG_TEXT.Add(key_text, "Y to 0;");
KOR_TEXT.Add(key_text, "Y값을 0으로");
ENG_TEXT.Add(key_text, "Y to 0");
KOR_TEXT.Add(key_text, "Y값을\n0으로");
JAP_TEXT.Add(key_text, "Y値を0に");

key_text = "PG_TotalControl_SetZeroToZ";
ENG_TEXT.Add(key_text, "Z to 0");
KOR_TEXT.Add(key_text, "Z값을 0으로");
KOR_TEXT.Add(key_text, "Z값을\n0으로");
JAP_TEXT.Add(key_text, "Z値を0に");

key_text = "PG_TotalControl_SetAvgToX";
ENG_TEXT.Add(key_text, "X equalization");
KOR_TEXT.Add(key_text, "X값 평준화");
JAP_TEXT.Add(key_text, "X値平準化");
ENG_TEXT.Add(key_text, "X\nequalization");
KOR_TEXT.Add(key_text, "X값\n평준화");
JAP_TEXT.Add(key_text, "X値\n平準化");

key_text = "PG_TotalControl_SetAvgToY";
ENG_TEXT.Add(key_text, "Y값 equalization");
KOR_TEXT.Add(key_text, "Y값 평준화");
JAP_TEXT.Add(key_text, "Y値平準化");
ENG_TEXT.Add(key_text, "Y\nequalization");
KOR_TEXT.Add(key_text, "Y값\n평준화");
JAP_TEXT.Add(key_text, "Y値\n平準化");

key_text = "PG_TotalControl_SetAvgToZ";
ENG_TEXT.Add(key_text, "Z equalization");
KOR_TEXT.Add(key_text, "Z값 평준화");
JAP_TEXT.Add(key_text, "Z値平準化");
ENG_TEXT.Add(key_text, "Z\nequalization");
KOR_TEXT.Add(key_text, "Z값\n평준화");
JAP_TEXT.Add(key_text, "Z値\n平準化");

key_text = "PG_TotalControl_SpecificValue";
ENG_TEXT.Add(key_text, "Specific value");
KOR_TEXT.Add(key_text, "특정값");
JAP_TEXT.Add(key_text, "特定の値");

key_text = "PG_TotalControl_SetSpecificToX";
ENG_TEXT.Add(key_text, "X to a specific value");
KOR_TEXT.Add(key_text, "X값을 특정값으로");
JAP_TEXT.Add(key_text, "Xから特定の値");
ENG_TEXT.Add(key_text, "X to ...");
KOR_TEXT.Add(key_text, "X값을 ...");
JAP_TEXT.Add(key_text, "X値をこの ...");

key_text = "PG_TotalControl_SetSpecificToY";
ENG_TEXT.Add(key_text, "Y to a specific value");
KOR_TEXT.Add(key_text, "Y값을 특정값으로");
JAP_TEXT.Add(key_text, "Yから特定の値");
ENG_TEXT.Add(key_text, "Y to ...");
KOR_TEXT.Add(key_text, "Y값을 ...");
JAP_TEXT.Add(key_text, "Y値をこの ...");

key_text = "PG_TotalControl_SetSpecificToZ";
ENG_TEXT.Add(key_text, "Z to a specific value");
KOR_TEXT.Add(key_text, "Z값을 특정값으로");
JAP_TEXT.Add(key_text, "Zから特定の値");
ENG_TEXT.Add(key_text, "Z to ...");
KOR_TEXT.Add(key_text, "Z값을 ...");
JAP_TEXT.Add(key_text, "Z値をこの ...");

key_text = "PG_H1_Rendering";
ENG_TEXT.Add(key_text, "Rendering");
Expand Down
411 changes: 391 additions & 20 deletions Assets/PathGenerator/DemoScene/SampleScene.unity

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Assets/PathGenerator/Materials.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions Assets/PathGenerator/Materials/Scrolling.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Scrolling
m_Shader: {fileID: 4800000, guid: e2fc3356e704e1849932a9a4d220b429, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _ArrowTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: acbb9e808e436d345a53495cf9f003ac, type: 3}
m_Scale: {x: 1, y: 20}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Alpha: 0.86
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Fill: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Repeat: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _Speed: 35
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/PathGenerator/Materials/Scrolling.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Assets/PathGenerator/Scripts/PathFollower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ void FixedUpdate() {
//===========================================================================================
if (Distance < distanceThreshold) {

//=======================================================================================
// If the end of the path list is not reached, set the next path by increase path Index
// path 리스트의 끝에 도달하지 못했다면, path Index ++ 를 통해 next path 설정
//=======================================================================================
if (pathIndex + 1 < path.PathList.Count) {
//=======================================================================================
// If the end of the path list is not reached, set the next path by increase path Index
// path 리스트의 끝에 도달하지 못했다면, path Index ++ 를 통해 next path 설정
//=======================================================================================
nextPath = path.PathList[++pathIndex];
} else {
//===================================================================================
Expand All @@ -127,10 +127,10 @@ void FixedUpdate() {
nextPath = path.PathList[0];
pathIndex = 0;

//==============================================================================
// If object move once, Stop move and if endEvent isn't null, run method.
// 물체가 한번만 움직이면 멈추고, endEvent!=null이 아니면, method를 실행
//==============================================================================
//==============================================================================
// If object move once, Stop move and if endEvent isn't null, run method.
// 물체가 한번만 움직이면 멈추고, endEvent!=null이 아니면, method를 실행
//==============================================================================
} else {
StopFollow();
if (endEvent != null) {
Expand Down
6 changes: 5 additions & 1 deletion Assets/PathGenerator/Scripts/PathGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
//=========================================================================================================================

namespace CurvedPathGenertator {

[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]

[System.Serializable]
public class PathGenerator : MonoBehaviour {
public bool isClosed = false; // is this path closed ?
public bool isLivePath = false; // is calculate the path in runtime ?
public bool isShowingIcons = true; // is showing icons ?
public int PathDensity = 30; // Density of guide objects between Nodes
public int PathDensity = 5; // Density of guide objects between Nodes

public int EditMode = 0; // (Editor) is individaul control mode?

Expand Down
23 changes: 13 additions & 10 deletions Assets/PathGenerator/Shader/ScrollingShader.shader
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ Shader "PathGenerator/ScrollingArrow"
{
Properties
{
_MainTex ( "Texture", 2D ) = "white" {}
_ArrowTex ( "Texture", 2D ) = "white" {}
_Fill ( "Fill", Range ( 0.0,1.0 ) ) = 0.5
_Speed ( "Speed", float ) = 5
_MainTex ( "Main Texture", 2D ) = "white" {}
[IntRange] _Speed ( "Speed", Range ( -100, 100 ) ) = 30
_Alpha ("Alpha", Range(0,1)) = 1
}

SubShader
{
Tags { "RenderType" = "Opaque" }
LOD 100
Tags { "RenderType" = "Transparent" }
ZWrite Off
Cull Off
Blend SrcAlpha OneMinusSrcAlpha

Pass
{
Expand All @@ -55,6 +56,7 @@ Shader "PathGenerator/ScrollingArrow"

sampler2D _MainTex;
float4 _MainTex_ST;
float _Alpha;
float _Fill;
float _Speed;

Expand All @@ -69,13 +71,14 @@ Shader "PathGenerator/ScrollingArrow"
fixed4 frag ( v2f i ) : SV_Target
{
// get scroll value
float2 scroll = float2(0, -1 + (frac ( _Time.x * _Speed ) * 2));
float2 scroll = float2(0, (frac ( _Time.x * _Speed )));

float4 _AlphaColor = float4 (1, 1, 1, _Alpha);
// sample texture
fixed4 col = tex2D ( _MainTex, i.uv - scroll );
fixed4 col = tex2D ( _MainTex, (i.uv - scroll) ) * _AlphaColor;

// discard if uv.y is below below cut value
clip ( step ( i.uv.y, _Fill* _MainTex_ST.y ) - 0.1 );
//// discard if uv.y is below below cut value
clip ( step ( i.uv.y, _MainTex_ST.y ) - 0.1 );

return col;

Expand Down
Binary file modified Assets/Resources/PathGenerator/Textures/PathTexture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Assets/Resources/PathGenerator/Textures/PathTexture.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Library/ArtifactDB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit aa1100d

Please sign in to comment.