[unity] Update some shader things.

This commit is contained in:
pharan 2017-11-25 15:18:35 +08:00
parent a0cf9badb9
commit 57fb0ee0be
3 changed files with 45 additions and 94 deletions

View File

@ -345,7 +345,7 @@ VertexOutput vert(VertexInput input)
output.color = calculateVertexColor(input.color); output.color = calculateVertexColor(input.color);
output.texcoord = float3(calculateTextureCoord(input.texcoord), 0); output.texcoord = float3(calculateTextureCoord(input.texcoord), 0);
float3 viewPos = UnityObjectViewPos(input.vertex); //float3 viewPos = mul(UNITY_MATRIX_MV, input.vertex); float3 viewPos = UnityObjectToViewPos(input.vertex); //float3 viewPos = mul(UNITY_MATRIX_MV, input.vertex); //
#if defined(FIXED_NORMALS_BACKFACE_RENDERING) || defined(_RIM_LIGHTING) #if defined(FIXED_NORMALS_BACKFACE_RENDERING) || defined(_RIM_LIGHTING)
float4 powWorld = calculateWorldPos(input.vertex); float4 powWorld = calculateWorldPos(input.vertex);
#endif #endif

View File

@ -10,127 +10,78 @@ Material:
m_Shader: {fileID: 4800000, guid: fa95b0fb6983c0f40a152e6f9aa82bfb, type: 3} m_Shader: {fileID: 4800000, guid: fa95b0fb6983c0f40a152e6f9aa82bfb, type: 3}
m_ShaderKeywords: m_ShaderKeywords:
m_LightmapFlags: 5 m_LightmapFlags: 5
m_CustomRenderQueue: 3000 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties: m_SavedProperties:
serializedVersion: 2 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- first: - _AlphaTex:
name: _BumpMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _BumpMap:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _DetailAlbedoMap:
name: _DetailMask
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _DetailMask:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _DetailNormalMap:
name: _EmissionMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _EmissionMap:
name: _MainTex
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _MainTex:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _MetallicGlossMap:
name: _OcclusionMap
second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- first: - _OcclusionMap:
name: _ParallaxMap m_Texture: {fileID: 0}
second: m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Floats: m_Floats:
- first: - PixelSnap: 0
name: _BumpScale - _BumpScale: 1
second: 1 - _ColorMask: 15
- first: - _Cutoff: 0.5
name: _ColorMask - _DetailNormalMapScale: 1
second: 15 - _DstBlend: 0
- first: - _EnableExternalAlpha: 0
name: _Cutoff - _Glossiness: 0.5
second: 0.5 - _Metallic: 0
- first: - _Mode: 0
name: _DetailNormalMapScale - _OcclusionStrength: 1
second: 1 - _Parallax: 0.02
- first: - _SrcBlend: 1
name: _DstBlend - _Stencil: 0
second: 0 - _StencilComp: 8
- first: - _StencilOp: 0
name: _Glossiness - _StencilReadMask: 255
second: 0.5 - _StencilWriteMask: 255
- first: - _UVSec: 0
name: _Metallic - _UseUIAlphaClip: 0
second: 0 - _ZWrite: 1
- first:
name: _Mode
second: 0
- first:
name: _OcclusionStrength
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SrcBlend
second: 1
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UVSec
second: 0
- first:
name: _UseUIAlphaClip
second: 0
- first:
name: _ZWrite
second: 1
m_Colors: m_Colors:
- first: - _Color: {r: 1, g: 1, b: 1, a: 1}
name: _Color - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
second: {r: 1, g: 1, b: 1, a: 1} - _Flip: {r: 1, g: 1, b: 1, a: 1}
- first: - _RendererColor: {r: 1, g: 1, b: 1, a: 1}
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}