Skip to content

Commit

Permalink
Add UnityGLTFShaderVariants for issue: KhronosGroup#206
Browse files Browse the repository at this point in the history
  • Loading branch information
Vytek committed Jul 30, 2018
1 parent 044b7d9 commit 868d645
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 22 deletions.
263 changes: 263 additions & 0 deletions UnityGLTF/Assets/Resources/UnityGLTFShaderVariants.shadervariants
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!200 &20000000
ShaderVariantCollection:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UnityGLTFShaderVariants
m_Shaders:
data:
first: {fileID: 66, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords:
passType: 0
data:
first: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords: DIRECTIONAL _EMISSION _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _SPECGLOSSMAP
passType: 5
- keywords: SHADOWS_DEPTH _SPECGLOSSMAP
passType: 8
data:
first: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords: DIRECTIONAL
passType: 4
- keywords: DIRECTIONAL SHADOWS_SCREEN
passType: 4
- keywords: DIRECTIONAL _EMISSION
passType: 4
- keywords: DIRECTIONAL _ALPHAPREMULTIPLY_ON
passType: 4
- keywords: DIRECTIONAL
passType: 5
- keywords: DIRECTIONAL _ALPHAPREMULTIPLY_ON
passType: 5
- keywords: SHADOWS_DEPTH
passType: 8
- keywords: SHADOWS_DEPTH _ALPHAPREMULTIPLY_ON
passType: 8
data:
first: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords: SHADOWS_SPLIT_SPHERES
passType: 0
data:
first: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords: DIRECTIONAL
passType: 4
- keywords: DIRECTIONAL
passType: 5
- keywords: SHADOWS_DEPTH
passType: 8
data:
first: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords: _SUNDISK_SIMPLE
passType: 0
data:
first: {fileID: 9000, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords:
passType: 0
data:
first: {fileID: 9001, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords:
passType: 0
data:
first: {fileID: 9002, guid: 0000000000000000f000000000000000, type: 0}
second:
variants:
- keywords:
passType: 0
data:
first: {fileID: 4800000, guid: 0ffe2976cdefd434c8fcd886ffa69322, type: 3}
second:
variants:
- keywords: DIRECTIONAL
passType: 4
- keywords: DIRECTIONAL _EMISSION
passType: 4
- keywords: DIRECTIONAL _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _NORMALMAP _SPECGLOSSMAP
passType: 4
- keywords: DIRECTIONAL
passType: 5
- keywords: DIRECTIONAL _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _SPECGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _NORMALMAP _SPECGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _SPECGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP _SPECGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _SPECGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP _SPECGLOSSMAP
passType: 5
- keywords: SHADOWS_DEPTH
passType: 8
- keywords: SHADOWS_DEPTH _ALPHATEST_ON
passType: 8
- keywords: SHADOWS_DEPTH _ALPHABLEND_ON
passType: 8
- keywords: SHADOWS_DEPTH _SPECGLOSSMAP
passType: 8
- keywords: SHADOWS_DEPTH _ALPHATEST_ON _SPECGLOSSMAP
passType: 8
- keywords: SHADOWS_DEPTH _ALPHABLEND_ON _SPECGLOSSMAP
passType: 8
data:
first: {fileID: 4800000, guid: 9836e4430eb58204086d7d1440e16a4f, type: 3}
second:
variants:
- keywords: DIRECTIONAL
passType: 4
- keywords: DIRECTIONAL _EMISSION
passType: 4
- keywords: DIRECTIONAL _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _EMISSION _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL SHADOWS_SCREEN _EMISSION _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHATEST_ON _EMISSION _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _METALLICGLOSSMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL _ALPHABLEND_ON _EMISSION _METALLICGLOSSMAP _NORMALMAP
passType: 4
- keywords: DIRECTIONAL
passType: 5
- keywords: DIRECTIONAL _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _METALLICGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _METALLICGLOSSMAP _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _METALLICGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHATEST_ON _METALLICGLOSSMAP _NORMALMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _METALLICGLOSSMAP
passType: 5
- keywords: DIRECTIONAL _ALPHABLEND_ON _METALLICGLOSSMAP _NORMALMAP
passType: 5
- keywords: SHADOWS_DEPTH
passType: 8
- keywords: SHADOWS_DEPTH _ALPHATEST_ON
passType: 8
- keywords: SHADOWS_DEPTH _ALPHABLEND_ON
passType: 8
- keywords: SHADOWS_DEPTH _METALLICGLOSSMAP
passType: 8
- keywords: SHADOWS_DEPTH _ALPHATEST_ON _METALLICGLOSSMAP
passType: 8
- keywords: SHADOWS_DEPTH _ALPHABLEND_ON _METALLICGLOSSMAP
passType: 8

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion UnityGLTF/Assets/UnityGLTF/Shaders/UnityStandardInput.cginc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'UNITY_INSTANCE_ID' with 'UNITY_VERTEX_INPUT_INSTANCE_ID'

// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)

#ifndef UNITY_STANDARD_INPUT_INCLUDED
Expand Down Expand Up @@ -68,7 +70,7 @@ struct VertexInput
#if defined(UNITY_VERTEX_INPUT_INSTANCE_ID)
UNITY_VERTEX_INPUT_INSTANCE_ID
#else
UNITY_INSTANCE_ID
UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
};

Expand Down
4 changes: 3 additions & 1 deletion UnityGLTF/Assets/UnityGLTF/Shaders/UnityStandardShadow.cginc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'UNITY_INSTANCE_ID' with 'UNITY_VERTEX_INPUT_INSTANCE_ID'

// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)

#ifndef UNITY_STANDARD_SHADOW_INCLUDED
Expand Down Expand Up @@ -87,7 +89,7 @@ struct VertexInput
#if defined(UNITY_VERTEX_INPUT_INSTANCE_ID)
UNITY_VERTEX_INPUT_INSTANCE_ID
#else
UNITY_INSTANCE_ID
UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
};

Expand Down
37 changes: 17 additions & 20 deletions UnityGLTF/ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
serializedVersion: 12
m_Deferred:
m_Mode: 1
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
Expand Down Expand Up @@ -36,33 +36,30 @@ GraphicsSettings:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders:
- {fileID: 20000000, guid: a20add4cf9d674d568184fc2de952874, type: 2}
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_ShaderSettings_Tier1:
useCascadedShadowMaps: 1
standardShaderQuality: 2
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
m_ShaderSettings_Tier2:
useCascadedShadowMaps: 1
standardShaderQuality: 2
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
m_ShaderSettings_Tier3:
useCascadedShadowMaps: 1
standardShaderQuality: 2
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
m_BuildTargetShaderSettings: []
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1
m_DefaultMobileRenderingPath: 1
m_TierSettings: []
m_LightmapStripping: 0
m_FogStripping: 0
m_InstancingStripping: 0
m_LightmapKeepPlain: 1
m_LightmapKeepDirCombined: 1
m_LightmapKeepDirSeparate: 1
m_LightmapKeepDynamicPlain: 1
m_LightmapKeepDynamicDirCombined: 1
m_LightmapKeepDynamicDirSeparate: 1
m_LightmapKeepShadowMask: 1
m_LightmapKeepSubtractive: 1
m_FogKeepLinear: 1
m_FogKeepExp: 1
m_FogKeepExp2: 1
m_AlbedoSwatchInfos: []
m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0

0 comments on commit 868d645

Please sign in to comment.