mirror of
https://github.com/DerTyp7/grow-ai-unity.git
synced 2025-11-01 13:52:29 +01:00
started work on place obj
This commit is contained in:
8
Assets/Objects.meta
Normal file
8
Assets/Objects.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cf8bd164ca6aa794cbd8ae67acd1061b
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
86
Assets/Objects/way_normal.prefab
Normal file
86
Assets/Objects/way_normal.prefab
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &3420327930372171564
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3420327930372171566}
|
||||||
|
- component: {fileID: 3420327930372171567}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: way_normal
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3420327930372171566
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3420327930372171564}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &3420327930372171567
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3420327930372171564}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 1
|
||||||
|
m_Sprite: {fileID: 21300000, guid: d569a0c6db8568848a2a9ac7954225b5, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 2}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
7
Assets/Objects/way_normal.prefab.meta
Normal file
7
Assets/Objects/way_normal.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1b0d9211d89253549b71b121b268c59b
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -145,7 +145,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7365408954618877744, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
- target: {fileID: 7365408954618877744, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 0
|
value: -1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7365408954618877744, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
- target: {fileID: 7365408954618877744, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
||||||
propertyPath: m_LocalRotation.w
|
propertyPath: m_LocalRotation.w
|
||||||
@@ -194,7 +194,7 @@ PrefabInstance:
|
|||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: bba65a6ddff46b740a482e11b8970dae, type: 3}
|
||||||
--- !u!1 &1006363046
|
--- !u!1 &1522634444
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@@ -202,36 +202,37 @@ GameObject:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1006363048}
|
- component: {fileID: 1522634446}
|
||||||
- component: {fileID: 1006363047}
|
- component: {fileID: 1522634445}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: TestGrid
|
m_Name: GridBuildingSystem
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!114 &1006363047
|
--- !u!114 &1522634445
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1006363046}
|
m_GameObject: {fileID: 1522634444}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 29730cb0d1ffeb247be75654297759f2, type: 3}
|
m_Script: {fileID: 11500000, guid: a9e8b2a885476754e9652c90137f91bc, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
--- !u!4 &1006363048
|
testTransform: {fileID: 3420327930372171566, guid: 1b0d9211d89253549b71b121b268c59b, type: 3}
|
||||||
|
--- !u!4 &1522634446
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1006363046}
|
m_GameObject: {fileID: 1522634444}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: -0.6227665, y: 1.3887606, z: 1.0594857}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|||||||
@@ -1,23 +1,40 @@
|
|||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Grid
|
public class Grid<TGridObject>
|
||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
float cellSize;
|
float cellSize;
|
||||||
Vector3 originPosition;
|
Vector3 originPosition;
|
||||||
int[,] gridArray;
|
TGridObject[,] gridArray;
|
||||||
|
|
||||||
public Grid(int _width, int _height, float _cellSize, Vector3 _originPosition)
|
bool showDebug = true;
|
||||||
|
|
||||||
|
public int GetWidth() => width;
|
||||||
|
public int GetHeight() => height;
|
||||||
|
public float GetCellSize() => cellSize;
|
||||||
|
|
||||||
|
public Grid(int _width, int _height, float _cellSize, Vector3 _originPosition, Func<Grid<TGridObject>, int, int, TGridObject> createGridObject)
|
||||||
{
|
{
|
||||||
width = _width;
|
width = _width;
|
||||||
height = _height;
|
height = _height;
|
||||||
cellSize = _cellSize;
|
cellSize = _cellSize;
|
||||||
originPosition = _originPosition;
|
originPosition = _originPosition;
|
||||||
|
|
||||||
gridArray = new int[width, height];
|
gridArray = new TGridObject[width, height];
|
||||||
|
|
||||||
|
for (int x = 0; x < gridArray.GetLength(0); x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < gridArray.GetLength(1); y++)
|
||||||
|
{
|
||||||
|
gridArray[x, y] = createGridObject(this, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (showDebug)
|
||||||
|
{
|
||||||
for (int x = 0; x < gridArray.GetLength(0); x++)
|
for (int x = 0; x < gridArray.GetLength(0); x++)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < gridArray.GetLength(1); y++)
|
for (int y = 0; y < gridArray.GetLength(1); y++)
|
||||||
@@ -30,18 +47,20 @@ public class Grid
|
|||||||
Debug.DrawLine(GetWorldPosition(width, 0), GetWorldPosition(width, height), Color.white, 100f);
|
Debug.DrawLine(GetWorldPosition(width, 0), GetWorldPosition(width, height), Color.white, 100f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 GetWorldPosition(int x, int y)
|
}
|
||||||
|
|
||||||
|
public Vector3 GetWorldPosition(int x, int y)
|
||||||
{
|
{
|
||||||
return new Vector3(x, y) * cellSize + originPosition;
|
return new Vector3(x, y) * cellSize + originPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetXY(Vector3 worldPosition, out int x, out int y)
|
public void GetXY(Vector3 worldPosition, out int x, out int y)
|
||||||
{
|
{
|
||||||
x = Mathf.FloorToInt((worldPosition - originPosition).x / cellSize);
|
x = Mathf.FloorToInt((worldPosition - originPosition).x / cellSize);
|
||||||
y = Mathf.FloorToInt((worldPosition - originPosition).y / cellSize);
|
y = Mathf.FloorToInt((worldPosition - originPosition).y / cellSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetValue(int x, int y, int value)
|
public void SetGridObject(int x, int y, TGridObject value)
|
||||||
{
|
{
|
||||||
if(x >= 0 && y >= 0 && x < width && y < height)
|
if(x >= 0 && y >= 0 && x < width && y < height)
|
||||||
{
|
{
|
||||||
@@ -50,14 +69,14 @@ public class Grid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetValue(Vector3 worldPosition, int value)
|
public void SetGridObject(Vector3 worldPosition, TGridObject value)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
GetXY(worldPosition, out x, out y);
|
GetXY(worldPosition, out x, out y);
|
||||||
SetValue(x, y, value);
|
SetGridObject(x, y, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetValue(int x, int y)
|
public TGridObject GetGridObject(int x, int y)
|
||||||
{
|
{
|
||||||
if (x >= 0 && y >= 0 && x < width && y < height)
|
if (x >= 0 && y >= 0 && x < width && y < height)
|
||||||
{
|
{
|
||||||
@@ -65,14 +84,14 @@ public class Grid
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return default(TGridObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetValue(Vector3 worldPosition)
|
public TGridObject GetGridObject(Vector3 worldPosition)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
GetXY(worldPosition, out x, out y);
|
GetXY(worldPosition, out x, out y);
|
||||||
return GetValue(x, y);
|
return GetGridObject(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
57
Assets/Scripts/Grid/GridBuildingSystem.cs
Normal file
57
Assets/Scripts/Grid/GridBuildingSystem.cs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class GridBuildingSystem : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] Transform testTransform;
|
||||||
|
|
||||||
|
Grid<GridObject> grid;
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
int gridWidth = 20;
|
||||||
|
int gridHeight = 20;
|
||||||
|
float cellSize = 2f;
|
||||||
|
|
||||||
|
grid = new Grid<GridObject>(gridWidth, gridHeight, cellSize, Vector3.zero, (Grid<GridObject> g, int x, int y) => new GridObject(g, x, y));
|
||||||
|
}
|
||||||
|
public class GridObject
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
Grid<GridObject> grid;
|
||||||
|
Transform transform;
|
||||||
|
public GridObject(Grid<GridObject> _grid, int _x, int _y)
|
||||||
|
{
|
||||||
|
grid = _grid;
|
||||||
|
x = _x;
|
||||||
|
y = _y;
|
||||||
|
}
|
||||||
|
public void SetTransform(Transform _transform) => transform = _transform;
|
||||||
|
public Transform GetTransform() => transform;
|
||||||
|
public void ClearTransform() => transform = null;
|
||||||
|
|
||||||
|
public bool CanBuild()
|
||||||
|
{
|
||||||
|
return transform == null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
Vector3 mousePosition = new Vector3(Camera.main.ScreenToWorldPoint(Input.mousePosition).x, Camera.main.ScreenToWorldPoint(Input.mousePosition).y);
|
||||||
|
grid.GetXY(mousePosition, out int x, out int y);
|
||||||
|
|
||||||
|
GridObject gridObject = grid.GetGridObject(x, y);
|
||||||
|
if (gridObject.CanBuild())
|
||||||
|
{
|
||||||
|
Transform builtTransform = Instantiate(testTransform, grid.GetWorldPosition(x, y), Quaternion.identity);
|
||||||
|
gridObject.SetTransform(builtTransform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Cannot build here!" + " " + mousePosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 29730cb0d1ffeb247be75654297759f2
|
guid: a9e8b2a885476754e9652c90137f91bc
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
18
Assets/Scripts/Grid/PlacedObjectTypeSO.cs
Normal file
18
Assets/Scripts/Grid/PlacedObjectTypeSO.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class PlacedObjectTypeSO : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Grid/PlacedObjectTypeSO.cs.meta
Normal file
11
Assets/Scripts/Grid/PlacedObjectTypeSO.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ed4c766e9f0dd454da548c672fa99b65
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class TestGrid : MonoBehaviour
|
|
||||||
{
|
|
||||||
Grid grid;
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
grid = new Grid(100, 100, 1, new Vector3(0, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
if (Input.GetMouseButtonDown(0))
|
|
||||||
{
|
|
||||||
grid.SetValue(Camera.main.ScreenToWorldPoint(Input.mousePosition), 44);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Input.GetMouseButtonDown(1))
|
|
||||||
{
|
|
||||||
Debug.Log(grid.GetValue(Camera.main.ScreenToWorldPoint(Input.mousePosition)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BIN
Assets/Sprites/way.png
Normal file
BIN
Assets/Sprites/way.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 678 B |
99
Assets/Sprites/way.png.meta
Normal file
99
Assets/Sprites/way.png.meta
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7a8196617b05c074e8ff2812157c3a3a
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sprites/way_normal.png
Normal file
BIN
Assets/Sprites/way_normal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 313 B |
135
Assets/Sprites/way_normal.png.meta
Normal file
135
Assets/Sprites/way_normal.png.meta
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d569a0c6db8568848a2a9ac7954225b5
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 0
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 6
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 32
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 4096
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Windows Store Apps
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -78,7 +78,6 @@ Material:
|
|||||||
- _BumpOutline: 0
|
- _BumpOutline: 0
|
||||||
- _BumpScale: 1
|
- _BumpScale: 1
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _CullMode: 0
|
|
||||||
- _Cutoff: 0.5
|
- _Cutoff: 0.5
|
||||||
- _DetailNormalMapScale: 1
|
- _DetailNormalMapScale: 1
|
||||||
- _Diffuse: 0.5
|
- _Diffuse: 0.5
|
||||||
@@ -162,7 +161,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
hashCode: -1699145518
|
hashCode: -1699145518
|
||||||
material: {fileID: 2180264}
|
material: {fileID: 2180264}
|
||||||
materialHashCode: 462855346
|
materialHashCode: -1183942120
|
||||||
m_Version: 1.1.0
|
m_Version: 1.1.0
|
||||||
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||||
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
|
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
|
||||||
@@ -194,8 +193,6 @@ MonoBehaviour:
|
|||||||
m_AtlasTextures:
|
m_AtlasTextures:
|
||||||
- {fileID: 28268798066460806}
|
- {fileID: 28268798066460806}
|
||||||
m_AtlasTextureIndex: 0
|
m_AtlasTextureIndex: 0
|
||||||
m_IsMultiAtlasTexturesEnabled: 0
|
|
||||||
m_ClearDynamicDataOnBuild: 1
|
|
||||||
m_UsedGlyphRects: []
|
m_UsedGlyphRects: []
|
||||||
m_FreeGlyphRects:
|
m_FreeGlyphRects:
|
||||||
- m_X: 0
|
- m_X: 0
|
||||||
@@ -232,9 +229,6 @@ MonoBehaviour:
|
|||||||
m_glyphInfoList: []
|
m_glyphInfoList: []
|
||||||
m_KerningTable:
|
m_KerningTable:
|
||||||
kerningPairs: []
|
kerningPairs: []
|
||||||
m_FontFeatureTable:
|
|
||||||
m_GlyphPairAdjustmentRecords: []
|
|
||||||
fallbackFontAssets: []
|
|
||||||
m_FallbackFontAssetTable: []
|
m_FallbackFontAssetTable: []
|
||||||
m_CreationSettings:
|
m_CreationSettings:
|
||||||
sourceFontFileName:
|
sourceFontFileName:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ #
|
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇〉》」$⦆¥₩ #
|
||||||
@@ -25,7 +25,6 @@ Material:
|
|||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _CullMode: 0
|
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
- _StencilComp: 8
|
- _StencilComp: 8
|
||||||
- _StencilOp: 0
|
- _StencilOp: 0
|
||||||
@@ -51,26 +50,6 @@ MonoBehaviour:
|
|||||||
material: {fileID: 2103686}
|
material: {fileID: 2103686}
|
||||||
materialHashCode: 0
|
materialHashCode: 0
|
||||||
m_Version: 1.1.0
|
m_Version: 1.1.0
|
||||||
m_FaceInfo:
|
|
||||||
m_FamilyName:
|
|
||||||
m_StyleName:
|
|
||||||
m_PointSize: 0
|
|
||||||
m_Scale: 0
|
|
||||||
m_LineHeight: 0
|
|
||||||
m_AscentLine: 0
|
|
||||||
m_CapLine: 0
|
|
||||||
m_MeanLine: 0
|
|
||||||
m_Baseline: 0
|
|
||||||
m_DescentLine: 0
|
|
||||||
m_SuperscriptOffset: 0
|
|
||||||
m_SuperscriptSize: 0
|
|
||||||
m_SubscriptOffset: 0
|
|
||||||
m_SubscriptSize: 0
|
|
||||||
m_UnderlineOffset: 0
|
|
||||||
m_UnderlineThickness: 0
|
|
||||||
m_StrikethroughOffset: 0
|
|
||||||
m_StrikethroughThickness: 0
|
|
||||||
m_TabWidth: 0
|
|
||||||
spriteSheet: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3}
|
spriteSheet: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3}
|
||||||
m_SpriteCharacterTable:
|
m_SpriteCharacterTable:
|
||||||
- m_ElementType: 2
|
- m_ElementType: 2
|
||||||
@@ -146,11 +125,11 @@ MonoBehaviour:
|
|||||||
m_Name: 1f609
|
m_Name: 1f609
|
||||||
m_HashCode: 57188264
|
m_HashCode: 57188264
|
||||||
- m_ElementType: 2
|
- m_ElementType: 2
|
||||||
m_Unicode: 0
|
m_Unicode: 128536
|
||||||
m_GlyphIndex: 12
|
m_GlyphIndex: 12
|
||||||
m_Scale: 1
|
m_Scale: 1
|
||||||
m_Name: .notdef
|
m_Name: 1f618
|
||||||
m_HashCode: -600915428
|
m_HashCode: 57188168
|
||||||
- m_ElementType: 2
|
- m_ElementType: 2
|
||||||
m_Unicode: 129315
|
m_Unicode: 129315
|
||||||
m_GlyphIndex: 13
|
m_GlyphIndex: 13
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ MonoBehaviour:
|
|||||||
m_EnableRaycastTarget: 1
|
m_EnableRaycastTarget: 1
|
||||||
m_GetFontFeaturesAtRuntime: 1
|
m_GetFontFeaturesAtRuntime: 1
|
||||||
m_missingGlyphCharacter: 0
|
m_missingGlyphCharacter: 0
|
||||||
m_warningsDisabled: 0
|
m_warningsDisabled: 1
|
||||||
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
m_defaultFontAssetPath: Fonts & Materials/
|
m_defaultFontAssetPath: Fonts & Materials/
|
||||||
m_defaultFontSize: 36
|
m_defaultFontSize: 36
|
||||||
@@ -34,13 +34,10 @@ MonoBehaviour:
|
|||||||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
|
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_defaultSpriteAssetPath: Sprite Assets/
|
m_defaultSpriteAssetPath: Sprite Assets/
|
||||||
m_enableEmojiSupport: 1
|
|
||||||
m_MissingCharacterSpriteUnicode: 0
|
|
||||||
m_defaultColorGradientPresetsPath: Color Gradient Presets/
|
m_defaultColorGradientPresetsPath: Color Gradient Presets/
|
||||||
|
m_enableEmojiSupport: 1
|
||||||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
|
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
|
||||||
type: 2}
|
type: 2}
|
||||||
m_StyleSheetsResourcePath:
|
|
||||||
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
|
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
|
||||||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
|
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
|
||||||
type: 3}
|
type: 3}
|
||||||
m_UseModernHangulLineBreakingRules: 0
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Shader "TextMeshPro/Bitmap Custom Atlas" {
|
|||||||
Properties {
|
Properties {
|
||||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||||
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
|
_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||||
|
|
||||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||||
@@ -19,7 +19,6 @@ Properties {
|
|||||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode("Cull Mode", Float) = 0
|
|
||||||
_ColorMask("Color Mask", Float) = 15
|
_ColorMask("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 48bb5f55d8670e349b6e614913f9d910
|
guid: 48bb5f55d8670e349b6e614913f9d910
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Shader "TextMeshPro/Mobile/Bitmap" {
|
|||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||||
[HDR]_Color ("Text Color", Color) = (1,1,1,1)
|
_Color ("Text Color", Color) = (1,1,1,1)
|
||||||
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
|
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
|
||||||
|
|
||||||
_VertexOffsetX("Vertex OffsetX", float) = 0
|
_VertexOffsetX("Vertex OffsetX", float) = 0
|
||||||
@@ -18,7 +18,6 @@ Properties {
|
|||||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode("Cull Mode", Float) = 0
|
|
||||||
_ColorMask("Color Mask", Float) = 15
|
_ColorMask("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +36,7 @@ SubShader {
|
|||||||
|
|
||||||
|
|
||||||
Lighting Off
|
Lighting Off
|
||||||
Cull [_CullMode]
|
Cull Off
|
||||||
ZTest [unity_GUIZTestMode]
|
ZTest [unity_GUIZTestMode]
|
||||||
ZWrite Off
|
ZWrite Off
|
||||||
Fog { Mode Off }
|
Fog { Mode Off }
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1e3b057af24249748ff873be7fafee47
|
guid: 1e3b057af24249748ff873be7fafee47
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Shader "TextMeshPro/Bitmap" {
|
|||||||
Properties {
|
Properties {
|
||||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||||
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
|
_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||||
|
|
||||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||||
@@ -18,7 +18,6 @@ Properties {
|
|||||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode("Cull Mode", Float) = 0
|
|
||||||
_ColorMask("Color Mask", Float) = 15
|
_ColorMask("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 128e987d567d4e2c824d754223b3f3b0
|
guid: 128e987d567d4e2c824d754223b3f3b0
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ Properties {
|
|||||||
_FaceTex ("Face Texture", 2D) = "white" {}
|
_FaceTex ("Face Texture", 2D) = "white" {}
|
||||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
@@ -21,7 +21,7 @@ Properties {
|
|||||||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
||||||
|
|
||||||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
||||||
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
|
_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||||
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
||||||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
||||||
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
||||||
@@ -37,13 +37,13 @@ Properties {
|
|||||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||||
@@ -80,7 +80,6 @@ Properties {
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dd89cf5b9246416f84610a006f916af7
|
guid: dd89cf5b9246416f84610a006f916af7
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Simplified SDF shader:
|
// Simplified SDF shader:
|
||||||
// - No Shading Option (bevel / bump / env map)
|
// - No Shading Option (bevel / bump / env map)
|
||||||
// - No Glow Option
|
// - No Glow Option
|
||||||
// - Softness is applied on both side of the outline
|
// - Softness is applied on both side of the outline
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
|
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||||
@@ -54,7 +54,6 @@ Properties {
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,10 +217,10 @@ SubShader {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||||
//#if UNITY_UI_CLIP_RECT
|
#if UNITY_UI_CLIP_RECT
|
||||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||||
c *= m.x * m.y;
|
c *= m.x * m.y;
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
|
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
|
||||||
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
|
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: bc1ede39bf3643ee8e493720e4259791
|
guid: bc1ede39bf3643ee8e493720e4259791
|
||||||
|
timeCreated: 1463704911
|
||||||
|
licenseType: Pro
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
|
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||||
@@ -49,7 +49,6 @@ Properties {
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a02a7d8c237544f1962732b55a9aebf1
|
guid: a02a7d8c237544f1962732b55a9aebf1
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Simplified SDF shader:
|
// Simplified SDF shader:
|
||||||
// - No Shading Option (bevel / bump / env map)
|
// - No Shading Option (bevel / bump / env map)
|
||||||
// - No Glow Option
|
// - No Glow Option
|
||||||
// - Softness is applied on both side of the outline
|
// - Softness is applied on both side of the outline
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
Shader "TextMeshPro/Mobile/Distance Field" {
|
Shader "TextMeshPro/Mobile/Distance Field" {
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||||
@@ -49,7 +49,6 @@ Properties {
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: fe393ace9b354375a9cb14cdbbc28be4
|
guid: fe393ace9b354375a9cb14cdbbc28be4
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
|
|||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
_FaceTex ("Fill Texture", 2D) = "white" {}
|
_FaceTex ("Fill Texture", 2D) = "white" {}
|
||||||
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
|
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
|
||||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||||
@@ -42,7 +42,6 @@ Properties {
|
|||||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
|
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
|
||||||
//_MaskSoftness ("Mask Softness", float) = 0
|
//_MaskSoftness ("Mask Softness", float) = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 85187c2149c549c5b33f0cdb02836b17
|
guid: 85187c2149c549c5b33f0cdb02836b17
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ Properties {
|
|||||||
_FaceTex ("Fill Texture", 2D) = "white" {}
|
_FaceTex ("Fill Texture", 2D) = "white" {}
|
||||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
@@ -28,12 +28,12 @@ Properties {
|
|||||||
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
|
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
|
||||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||||
[HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
|
_SpecColor ("Specular Color", Color) = (0,0,0,1)
|
||||||
|
|
||||||
_FaceShininess ("Face Shininess", Range(0,1)) = 0
|
_FaceShininess ("Face Shininess", Range(0,1)) = 0
|
||||||
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
|
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||||
@@ -59,8 +59,6 @@ Properties {
|
|||||||
|
|
||||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
|
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
|
||||||
//_MaskSoftness ("Mask Softness", float) = 0
|
//_MaskSoftness ("Mask Softness", float) = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f7ada0af4f174f0694ca6a487b8f543d
|
guid: f7ada0af4f174f0694ca6a487b8f543d
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ Properties {
|
|||||||
_FaceTex ("Face Texture", 2D) = "white" {}
|
_FaceTex ("Face Texture", 2D) = "white" {}
|
||||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||||
|
|
||||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||||
@@ -21,7 +21,7 @@ Properties {
|
|||||||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
||||||
|
|
||||||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
||||||
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
|
_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||||
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
||||||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
||||||
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
||||||
@@ -37,13 +37,13 @@ Properties {
|
|||||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||||
|
|
||||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||||
@@ -80,7 +80,6 @@ Properties {
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 68e6db2ebdc24f95958faec2be5558d6
|
guid: 68e6db2ebdc24f95958faec2be5558d6
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Shader "TextMeshPro/Sprite"
|
|||||||
{
|
{
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||||
_Color ("Tint", Color) = (1,1,1,1)
|
_Color ("Tint", Color) = (1,1,1,1)
|
||||||
|
|
||||||
_StencilComp ("Stencil Comparison", Float) = 8
|
_StencilComp ("Stencil Comparison", Float) = 8
|
||||||
@@ -11,7 +11,6 @@ Shader "TextMeshPro/Sprite"
|
|||||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||||
|
|
||||||
_CullMode ("Cull Mode", Float) = 0
|
|
||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ Shader "TextMeshPro/Sprite"
|
|||||||
WriteMask [_StencilWriteMask]
|
WriteMask [_StencilWriteMask]
|
||||||
}
|
}
|
||||||
|
|
||||||
Cull [_CullMode]
|
Cull Off
|
||||||
Lighting Off
|
Lighting Off
|
||||||
ZWrite Off
|
ZWrite Off
|
||||||
ZTest [unity_GUIZTestMode]
|
ZTest [unity_GUIZTestMode]
|
||||||
@@ -47,11 +46,9 @@ Shader "TextMeshPro/Sprite"
|
|||||||
|
|
||||||
Pass
|
Pass
|
||||||
{
|
{
|
||||||
Name "Default"
|
|
||||||
CGPROGRAM
|
CGPROGRAM
|
||||||
#pragma vertex vert
|
#pragma vertex vert
|
||||||
#pragma fragment frag
|
#pragma fragment frag
|
||||||
#pragma target 2.0
|
|
||||||
|
|
||||||
#include "UnityCG.cginc"
|
#include "UnityCG.cginc"
|
||||||
#include "UnityUI.cginc"
|
#include "UnityUI.cginc"
|
||||||
@@ -64,43 +61,43 @@ Shader "TextMeshPro/Sprite"
|
|||||||
float4 vertex : POSITION;
|
float4 vertex : POSITION;
|
||||||
float4 color : COLOR;
|
float4 color : COLOR;
|
||||||
float2 texcoord : TEXCOORD0;
|
float2 texcoord : TEXCOORD0;
|
||||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct v2f
|
struct v2f
|
||||||
{
|
{
|
||||||
float4 vertex : SV_POSITION;
|
float4 vertex : SV_POSITION;
|
||||||
fixed4 color : COLOR;
|
fixed4 color : COLOR;
|
||||||
float2 texcoord : TEXCOORD0;
|
half2 texcoord : TEXCOORD0;
|
||||||
float4 worldPosition : TEXCOORD1;
|
float4 worldPosition : TEXCOORD1;
|
||||||
UNITY_VERTEX_OUTPUT_STEREO
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler2D _MainTex;
|
|
||||||
fixed4 _Color;
|
fixed4 _Color;
|
||||||
fixed4 _TextureSampleAdd;
|
fixed4 _TextureSampleAdd;
|
||||||
float4 _ClipRect;
|
float4 _ClipRect;
|
||||||
float4 _MainTex_ST;
|
|
||||||
|
|
||||||
v2f vert(appdata_t v)
|
v2f vert(appdata_t IN)
|
||||||
{
|
{
|
||||||
v2f OUT;
|
v2f OUT;
|
||||||
UNITY_SETUP_INSTANCE_ID(v);
|
OUT.worldPosition = IN.vertex;
|
||||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
|
||||||
OUT.worldPosition = v.vertex;
|
|
||||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||||
|
|
||||||
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
OUT.texcoord = IN.texcoord;
|
||||||
|
|
||||||
OUT.color = v.color * _Color;
|
#ifdef UNITY_HALF_TEXEL_OFFSET
|
||||||
|
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
OUT.color = IN.color * _Color;
|
||||||
return OUT;
|
return OUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
|
||||||
fixed4 frag(v2f IN) : SV_Target
|
fixed4 frag(v2f IN) : SV_Target
|
||||||
{
|
{
|
||||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||||
|
|
||||||
#ifdef UNITY_UI_CLIP_RECT
|
#if UNITY_UI_CLIP_RECT
|
||||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cf81c85f95fe47e1a27f6ae460cf182c
|
guid: cf81c85f95fe47e1a27f6ae460cf182c
|
||||||
|
timeCreated: 1450517184
|
||||||
|
licenseType: Pro
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 407bc68d299748449bbf7f48ee690f8d
|
guid: 407bc68d299748449bbf7f48ee690f8d
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 3997e2241185407d80309a82f9148466
|
guid: 3997e2241185407d80309a82f9148466
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ void VertShader(inout appdata_full v, out Input data)
|
|||||||
data.param.y = scale;
|
data.param.y = scale;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//float opacity = v.color.a;
|
||||||
|
|
||||||
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
|
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
|
||||||
|
|
||||||
v.texcoord1.xy = UnpackUV(v.texcoord1.x);
|
v.texcoord1.xy = UnpackUV(v.texcoord1.x);
|
||||||
@@ -34,10 +36,26 @@ void VertShader(inout appdata_full v, out Input data)
|
|||||||
void PixShader(Input input, inout SurfaceOutput o)
|
void PixShader(Input input, inout SurfaceOutput o)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if USE_DERIVATIVE | BEVEL_ON
|
||||||
|
float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0);
|
||||||
|
|
||||||
|
float4 smp4x = { tex2D(_MainTex, input.uv_MainTex - delta.xz).a,
|
||||||
|
tex2D(_MainTex, input.uv_MainTex + delta.xz).a,
|
||||||
|
tex2D(_MainTex, input.uv_MainTex - delta.zy).a,
|
||||||
|
tex2D(_MainTex, input.uv_MainTex + delta.zy).a };
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_DERIVATIVE
|
#if USE_DERIVATIVE
|
||||||
float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y));
|
// Screen space scaling reciprocal with anisotropic correction
|
||||||
pixelSize *= _TextureWidth * .75;
|
float2 edgeNormal = Normalize(float2(smp4x.x - smp4x.y, smp4x.z - smp4x.w));
|
||||||
float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
|
float2 res = float2(_TextureWidth * input.param.y, _TextureHeight);
|
||||||
|
float2 tdx = ddx(input.uv_MainTex)*res;
|
||||||
|
float2 tdy = ddy(input.uv_MainTex)*res;
|
||||||
|
float lx = length(tdx);
|
||||||
|
float ly = length(tdy);
|
||||||
|
float s = sqrt(min(lx, ly) / max(lx, ly));
|
||||||
|
s = lerp(1, s, abs(dot(normalize(tdx + tdy), edgeNormal)));
|
||||||
|
float scale = rsqrt(abs(tdx.x * tdy.y - tdx.y * tdy.x)) * (_GradientScale * 2) * s;
|
||||||
#else
|
#else
|
||||||
float scale = input.param.y;
|
float scale = input.param.y;
|
||||||
#endif
|
#endif
|
||||||
@@ -58,14 +76,8 @@ void PixShader(Input input, inout SurfaceOutput o)
|
|||||||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
|
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
|
||||||
faceColor.rgb /= max(faceColor.a, 0.0001);
|
faceColor.rgb /= max(faceColor.a, 0.0001);
|
||||||
|
|
||||||
|
|
||||||
#if BEVEL_ON
|
#if BEVEL_ON
|
||||||
float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0);
|
|
||||||
|
|
||||||
float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a,
|
|
||||||
tex2D(_MainTex, input.uv_MainTex + delta.xz).a,
|
|
||||||
tex2D(_MainTex, input.uv_MainTex - delta.zy).a,
|
|
||||||
tex2D(_MainTex, input.uv_MainTex + delta.zy).a };
|
|
||||||
|
|
||||||
// Face Normal
|
// Face Normal
|
||||||
float3 n = GetSurfaceNormal(smp4x, input.param.x);
|
float3 n = GetSurfaceNormal(smp4x, input.param.x);
|
||||||
|
|
||||||
@@ -83,6 +95,8 @@ void PixShader(Input input, inout SurfaceOutput o)
|
|||||||
float3 emission = float3(0, 0, 0);
|
float3 emission = float3(0, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if GLOW_ON
|
#if GLOW_ON
|
||||||
float4 glowColor = GetGlowColor(sd, scale);
|
float4 glowColor = GetGlowColor(sd, scale);
|
||||||
glowColor.a *= input.color.a;
|
glowColor.a *= input.color.a;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: d930090c0cd643c7b55f19a38538c162
|
guid: d930090c0cd643c7b55f19a38538c162
|
||||||
ShaderImporter:
|
ShaderImporter:
|
||||||
externalObjects: {}
|
|
||||||
defaultTextures: []
|
defaultTextures: []
|
||||||
nonModifiableTextures: []
|
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 72 KiB |
Reference in New Issue
Block a user