Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/unity 1451 shader unification #1612

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "FlatColor"{
Shader "Ultraleap/FlatColor"{
Properties
{
_Color("Color", Color) = (1.0,1.0,1.0,1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Outline
m_Shader: {fileID: 4800000, guid: c5b35a4c19d643f4f87637cdd8587b98, type: 3}
m_ShaderKeywords: _USEFRESNEL_ON _USELIGHTING_ON _USEOUTLINE_ON
m_ValidKeywords: []
m_InvalidKeywords:
- _USEFRESNEL_ON
- _USELIGHTING_ON
- _USEOUTLINE_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand Down Expand Up @@ -55,6 +59,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
Expand All @@ -79,7 +84,7 @@ Material:
- _useLighting: 1
- _useOutline: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.7490196, g: 0.7490196, b: 0.7490196, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _FresnelColor: {r: 0.7490196, g: 0.7490196, b: 0.7490196, a: 0.078431375}
- _MainColor: {r: 0.7490196, g: 0.7490196, b: 0.7490196, a: 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Shader "Ultraleap/Teleport Anchor"
Properties
{
_MainTex ("Texture", 2D) = "white" {}
[HDR]_MainColor("Main Color", Color) = (1,1,1,1)
[HDR]_Color("Main Color", Color) = (1,1,1,1)
}
SubShader
{
Expand Down Expand Up @@ -38,7 +38,7 @@ Shader "Ultraleap/Teleport Anchor"
};

sampler2D _MainTex;
float4 _MainColor;
float4 _Color;
float4 _MainTex_ST;

v2f vert (appdata_t v)
Expand All @@ -54,7 +54,7 @@ Shader "Ultraleap/Teleport Anchor"

fixed4 frag (v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord) * _MainColor;
fixed4 col = tex2D(_MainTex, i.texcoord) * _Color;
UNITY_APPLY_FOG(i.fogCoord, col);
return col;
}
Expand Down
2 changes: 2 additions & 0 deletions Packages/Tracking/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Hard Contact Parent settings access levels to public
- Prefab Create Menu uses Physical Hands prefabs as opposed to Interaction Engine
- Prefab Create Menu chooses URP hands where available
- Shaders use _Color as the default color property name
- Shaders all come under the Ultraleap folder

### Fixed
-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "Unlit/TransparentColorUnlit"
Shader "Ultraleap/TransparentColorUnlit"
{
Properties
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "LeapMotion/Passthrough/Background" {
Shader "Ultraleap/Passthrough/Background" {
Properties
{
[Toggle] _MirrorImageHorizontally ("MirrorImageHorizontally", Float) = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "Hidden/Runtime Gizmos" {
Shader "Ultraleap/Runtime Gizmos" {
Properties{
_Color("Color", Color) = (1,1,1,1)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Shader "Gradient Skybox"
Shader "Ultraleap/Gradient Skybox"
{
Properties
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Shader "Ultraleap/URP/Transparent Lit"
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_BaseColor("Base Color", color) = (1,1,1,1)
_Color("Base Color", color) = (1,1,1,1)

[Space(20)]
_Smoothness("Smoothness", Range(0,1)) = 0
Expand Down Expand Up @@ -73,7 +73,7 @@ Shader "Ultraleap/URP/Transparent Lit"
sampler2D _MainTex;
float4 _MainTex_ST;

float4 _BaseColor;
float4 _Color;
float _Smoothness, _Metallic;

float _useFresnel;
Expand Down Expand Up @@ -114,14 +114,14 @@ Shader "Ultraleap/URP/Transparent Lit"
inputdata.bakedGI = SAMPLE_GI( i.lightmapUV, i.vertexSH, inputdata.normalWS );

SurfaceData surfacedata;
surfacedata.albedo = mainTex * _BaseColor;
surfacedata.albedo = mainTex * _Color;
surfacedata.specular = 0;
surfacedata.metallic = _Metallic;
surfacedata.smoothness = _Smoothness;
surfacedata.normalTS = 0;
surfacedata.emission = 0;
surfacedata.occlusion = 1;
surfacedata.alpha = mainTex.a * _BaseColor.a;
surfacedata.alpha = mainTex.a * _Color.a;
surfacedata.clearCoatMask = 0;
surfacedata.clearCoatSmoothness = 0;

Expand Down