[TASK] Initial commit with basic product setup

This commit is contained in:
2019-08-18 13:50:14 +02:00
commit 01a66a8e1f
2548 changed files with 167528 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax.
Shader "Mapbox/MapboxStyles"
{
Properties
{
_BaseColor ("BaseColor", Color) = (1,1,1,1)
_DetailColor1 ("DetailColor1", Color) = (1,1,1,1)
_DetailColor2 ("DetailColor2", Color) = (1,1,1,1)
_BaseTex ("Base", 2D) = "white" {}
_DetailTex1 ("Detail_1", 2D) = "white" {}
_DetailTex2 ("Detail_2", 2D) = "white" {}
_Emission ("Emission", Range(0.0, 1.0)) = 0.1
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Standard fullforwardshadows
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
float4 _BaseColor;
float4 _DetailColor1;
float4 _DetailColor2;
sampler2D _BaseTex;
sampler2D _DetailTex1;
sampler2D _DetailTex2;
float _Emission;
struct Input
{
float2 uv_BaseTex, uv_DetailTex1, uv_DetailTex2;
};
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
// #pragma instancing_options assumeuniformscaling
UNITY_INSTANCING_BUFFER_START(Props)
// put more per-instance properties here
UNITY_INSTANCING_BUFFER_END(Props)
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 baseTexture = tex2D (_BaseTex, IN.uv_BaseTex);
fixed4 detailTexture1 = tex2D (_DetailTex1, IN.uv_DetailTex1);
fixed4 detailTexture2 = tex2D (_DetailTex2, IN.uv_DetailTex2);
fixed4 baseDetail1_Result = lerp(_BaseColor, _DetailColor1, detailTexture1.a);
fixed4 detail1Detail2_Result = lerp(baseDetail1_Result, _DetailColor2, detailTexture2.a);
fixed4 c = baseTexture *= detail1Detail2_Result;
half3 e = c.rgb;
o.Albedo = c.rgb;
o.Emission = e * _Emission;
o.Alpha = 1.0;
}
ENDCG
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a58a57c7d09bd4d5a9dd79ebd542fea4
timeCreated: 1520453579
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,73 @@
// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax.
Shader "Mapbox/MapboxStylesPerRenderer" {
Properties
{
[PerRendererData]_BaseColor ("BaseColor", Color) = (1,1,1,1)
[PerRendererData]_DetailColor1 ("DetailColor1", Color) = (1,1,1,1)
[PerRendererData]_DetailColor2 ("DetailColor2", Color) = (1,1,1,1)
_BaseTex ("Base", 2D) = "white" {}
_DetailTex1 ("Detail_1", 2D) = "white" {}
_DetailTex2 ("Detail_2", 2D) = "white" {}
_Emission ("Emission", Range(0.0, 1.0)) = 0.1
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Standard fullforwardshadows
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
float4 _BaseColor;
float4 _DetailColor1;
float4 _DetailColor2;
sampler2D _BaseTex;
sampler2D _DetailTex1;
sampler2D _DetailTex2;
float _Emission;
struct Input
{
float2 uv_BaseTex, uv_DetailTex1, uv_DetailTex2;
};
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
// #pragma instancing_options assumeuniformscaling
UNITY_INSTANCING_BUFFER_START(Props)
// put more per-instance properties here
UNITY_INSTANCING_BUFFER_END(Props)
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 baseTexture = tex2D (_BaseTex, IN.uv_BaseTex);
fixed4 detailTexture1 = tex2D (_DetailTex1, IN.uv_DetailTex1);
fixed4 detailTexture2 = tex2D (_DetailTex2, IN.uv_DetailTex2);
fixed4 baseDetail1_Result = lerp(_BaseColor, _DetailColor1, detailTexture1.a);
fixed4 detail1Detail2_Result = lerp(baseDetail1_Result, _DetailColor2, detailTexture2.a);
fixed4 c = baseTexture *= detail1Detail2_Result;
half3 e = c.rgb;
o.Albedo = c.rgb;
o.Emission = e * _Emission;
o.Alpha = 1.0;
}
ENDCG
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 02ca05f28416c4bbab659e473fa74ec6
timeCreated: 1520623788
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,93 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Mapbox/Raster With Transparency"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "blue" {}
_Alpha ("Alpha", Float) = 1
}
Category
{
Tags { "Queue"="Transparent" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Off Lighting Off ZWrite Off
SubShader
{
Pass
{
BindChannels
{
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_particles
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
sampler2D _MainTex;
float _Alpha;
float4 _MainTex_ST;
fixed4 _Color;
struct vertexIn
{
float4 vertex : POSITION;
float4 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
struct vertexOut
{
float4 pos : SV_POSITION;
float2 uv : UV_COORD0;
float4 color : COLOR;
float2 screenspaceUv : UV_COORD1;
};
vertexOut vert(vertexIn v)
{
vertexOut o;
o.pos = UnityObjectToClipPos (v.vertex);
o.color = v.color;
o.uv = v.texcoord.xy;
o.screenspaceUv = o.pos.xy;
return o;
}
fixed4 frag(vertexOut o) : SV_Target
{
float2 uv = TRANSFORM_TEX(o.uv, _MainTex);
fixed4 texColor = tex2D(_MainTex, uv);
fixed4 color = o.color * texColor;
// check how much color used for transparency equals c.rgb in range 0..1
// 1=no match, 0=full match
fixed3 delta = texColor.rgb - _Color.rgb;
float match = dot(delta,delta);
float threshold = step(match,0.1);
color.a = (1 - ((threshold) * (1 -_Color.a))) * _Alpha;
return color;
}
ENDCG
}
}
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4cff8ad2a7f4c41aa929f127a4b62f87
timeCreated: 1509042938
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant: