Do some leafshader and then give up

This commit is contained in:
Sofia 2020-04-21 00:40:00 +03:00
parent 45d8568f3f
commit 6ceb40441b
6 changed files with 167 additions and 3 deletions

View File

@ -71,7 +71,7 @@ Material:
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _Transparency: 0.04502965 - _Transparency: 0
- _UVSec: 0 - _UVSec: 0
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:

View File

@ -0,0 +1,77 @@
%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: PineLefa Better
m_Shader: {fileID: 4800000, guid: ded3955735336054cb520d1093af426c, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _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: 0}
m_Scale: {x: 1, y: 1}
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:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.28607845, g: 0.5377358, b: 0.07863118, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0da5266ff8381a7479426659118efb7d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5672,6 +5672,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7362998546455154831, guid: 3d3251a3aedb46143931b1ea4eaa4138,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 80996928df7a0d847bbb7a283c52976b, type: 2}
- target: {fileID: 9084453306067018835, guid: 3d3251a3aedb46143931b1ea4eaa4138, - target: {fileID: 9084453306067018835, guid: 3d3251a3aedb46143931b1ea4eaa4138,
type: 3} type: 3}
propertyPath: m_StaticEditorFlags propertyPath: m_StaticEditorFlags
@ -18730,7 +18735,7 @@ PrefabInstance:
- target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}
propertyPath: Regen propertyPath: Regen
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}
@ -18765,7 +18770,7 @@ PrefabInstance:
- target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}
propertyPath: ShowInEditor propertyPath: ShowInEditor
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6166170817692975782, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 6166170817692975782, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}

View File

@ -0,0 +1,65 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Custom/LeafShader"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader
{
Tags { "Queue"="Transparent" "RenderType"="Transparent" }
LOD 200
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Standard fullforwardshadows alpha:fade vertex:vert
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
sampler2D _MainTex;
struct Input
{
float2 uv_MainTex;
float3 pos;
};
void vert (inout appdata_full v, out Input o) {
UNITY_INITIALIZE_OUTPUT(Input,o);
o.pos = v.vertex;
}
half _Glossiness;
half _Metallic;
fixed4 _Color;
// 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)
{
// Albedo comes from a texture tinted by color
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
// Metallic and smoothness come from slider variables
o.Metallic = _Metallic;
o.Smoothness = _Glossiness;
float len = length(IN.pos);
o.Alpha = (pow(len, 8) / 8 * 0.8 + 0.2) * c.a;
}
ENDCG
}
FallBack "Diffuse"
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ded3955735336054cb520d1093af426c
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: