Matt Dean
7 年前
当前提交
c9975eed
共有 14 个文件被更改,包括 718 次插入 和 16 次删除
-
2MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightCore.cginc
-
2MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightInput.cginc
-
19MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightUnlit.cginc
-
2MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightUnlit.shader
-
2MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightSubshaderUnlit.template
-
3MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/AbstractLightweightPBRMasterNode.cs
-
3MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/LightweightFastBlinnMasterNode.cs
-
89MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/ShaderTest.unity
-
70MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/UnlitTest.ShaderGraph
-
11MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/UnlitTest.ShaderGraph.meta
-
413MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/LightweightUnlitMasterNode.cs
-
12MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/LightweightUnlitMasterNode.cs.meta
-
96MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/Materials/TestGraph-Unlit.mat
-
10MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/Materials/TestGraph-Unlit.mat.meta
70
MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/UnlitTest.ShaderGraph
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: c575d6799ba1a994a931fe22b1d3fe08 |
|||
timeCreated: 1505526719 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Text.RegularExpressions; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Serializable] |
|||
[Title("Master/Lightweight/Unlit")] |
|||
public class LightweightUnlitMasterNode : AbstractMasterNode |
|||
{ |
|||
public const string ColorSlotName = "Color"; |
|||
public const string AlphaSlotName = "Alpha"; |
|||
public const string VertexOffsetName = "VertexPosition"; |
|||
|
|||
public const int ColorSlotId = 0; |
|||
public const int AlphaSlotId = 1; |
|||
public const int VertexOffsetId = 2; |
|||
|
|||
[SerializeField] |
|||
private SurfaceMaterialOptions m_MaterialOptions = new SurfaceMaterialOptions(); |
|||
|
|||
public SurfaceMaterialOptions options |
|||
{ |
|||
get { return m_MaterialOptions; } |
|||
} |
|||
|
|||
public LightweightUnlitMasterNode() |
|||
{ |
|||
name = "LightweightUnlitMasterNode"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(VertexOffsetId, VertexOffsetName, VertexOffsetName, SlotType.Input, SlotValueType.Vector3, Vector4.zero, ShaderStage.Vertex)); |
|||
AddSlot(new MaterialSlot(ColorSlotId, ColorSlotName, ColorSlotName, SlotType.Input, SlotValueType.Vector3, Vector4.zero, ShaderStage.Fragment)); |
|||
AddSlot(new MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, SlotValueType.Vector1, Vector4.zero, ShaderStage.Fragment)); |
|||
|
|||
// clear out slot names that do not match the slots
|
|||
// we support
|
|||
RemoveSlotsNameNotMatching( |
|||
new[] |
|||
{ |
|||
ColorSlotId, |
|||
AlphaSlotId, |
|||
VertexOffsetId |
|||
}); |
|||
} |
|||
|
|||
protected int[] surfaceInputs |
|||
{ |
|||
get |
|||
{ |
|||
return new[] |
|||
{ |
|||
ColorSlotId, |
|||
AlphaSlotId, |
|||
}; |
|||
} |
|||
} |
|||
|
|||
protected int[] vertexInputs |
|||
{ |
|||
get |
|||
{ |
|||
return new[] |
|||
{ |
|||
VertexOffsetId |
|||
}; |
|||
} |
|||
} |
|||
|
|||
void GenerateNodeFunctionsAndPropertyUsages( |
|||
ShaderGenerator shaderBody, |
|||
ShaderGenerator propertyUsages, |
|||
ShaderGenerator nodeFunction, |
|||
GenerationMode mode, |
|||
int[] validNodeIds) |
|||
{ |
|||
var activeNodeList = new List<INode>(); |
|||
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this, NodeUtils.IncludeSelf.Include, |
|||
new List<int>(validNodeIds)); |
|||
|
|||
foreach (var node in activeNodeList.OfType<AbstractMaterialNode>()) |
|||
{ |
|||
if (node is IGeneratesFunction) |
|||
(node as IGeneratesFunction).GenerateNodeFunction(nodeFunction, mode); |
|||
|
|||
node.GeneratePropertyUsages(propertyUsages, mode); |
|||
} |
|||
|
|||
var nodes = ListPool<INode>.Get(); |
|||
//Get the rest of the nodes for all the other slots
|
|||
NodeUtils.DepthFirstCollectNodesFromNode(nodes, this, NodeUtils.IncludeSelf.Exclude, new List<int>(vertexInputs)); |
|||
for (var i = 0; i < nodes.Count; i++) |
|||
{ |
|||
var node = nodes[i]; |
|||
if (node is IGeneratesBodyCode) |
|||
(node as IGeneratesBodyCode).GenerateNodeCode(shaderBody, mode); |
|||
} |
|||
ListPool<INode>.Release(nodes); |
|||
} |
|||
|
|||
void GenerateVertexShaderInternal( |
|||
ShaderGenerator propertyUsages, |
|||
ShaderGenerator shaderBody, |
|||
ShaderGenerator nodeFunction, |
|||
ShaderGenerator vertexShaderBlock, |
|||
GenerationMode mode) |
|||
{ |
|||
GenerateNodeFunctionsAndPropertyUsages(vertexShaderBlock, propertyUsages, nodeFunction, mode, vertexInputs); |
|||
|
|||
var slot = FindInputSlot<MaterialSlot>(VertexOffsetId); |
|||
foreach (var edge in owner.GetEdges(slot.slotReference)) |
|||
{ |
|||
var outputRef = edge.outputSlot; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(outputRef.nodeGuid); |
|||
if (fromNode == null) |
|||
continue; |
|||
|
|||
var remapper = fromNode as INodeGroupRemapper; |
|||
if (remapper != null && !remapper.IsValidSlotConnection(outputRef.slotId)) |
|||
continue; |
|||
|
|||
vertexShaderBlock.AddShaderChunk("v.vertex.xyz += " + fromNode.GetVariableNameForSlot(outputRef.slotId) + ";", true); |
|||
} |
|||
} |
|||
|
|||
public override string GetSubShader(GenerationMode mode, PropertyGenerator shaderPropertiesVisitor) |
|||
{ |
|||
var templateLocation = ShaderGenerator.GetTemplatePath("lightweightSubshaderUnlit.template"); |
|||
|
|||
if (!File.Exists(templateLocation)) |
|||
return string.Empty; |
|||
|
|||
var activeNodeList = new List<INode>(); |
|||
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this); |
|||
foreach (var node in activeNodeList.OfType<AbstractMaterialNode>()) |
|||
node.GeneratePropertyBlock(shaderPropertiesVisitor, mode); |
|||
|
|||
var templateText = File.ReadAllText(templateLocation); |
|||
var shaderBodyVisitor = new ShaderGenerator(); |
|||
var shaderFunctionVisitor = new ShaderGenerator(); |
|||
var shaderPropertyUsagesVisitor = new ShaderGenerator(); |
|||
var shaderInputVisitor = new ShaderGenerator(); |
|||
var shaderOutputVisitor = new ShaderGenerator(); |
|||
var vertexShaderBlock = new ShaderGenerator(); |
|||
var definesVisitor = new ShaderGenerator(); |
|||
|
|||
GenerateSurfaceShaderInternal( |
|||
shaderPropertyUsagesVisitor, |
|||
shaderBodyVisitor, |
|||
shaderFunctionVisitor, |
|||
shaderInputVisitor, |
|||
shaderOutputVisitor, |
|||
vertexShaderBlock, |
|||
definesVisitor, |
|||
mode); |
|||
|
|||
GenerateVertexShaderInternal( |
|||
shaderPropertyUsagesVisitor, |
|||
shaderBodyVisitor, |
|||
shaderFunctionVisitor, |
|||
vertexShaderBlock, |
|||
mode); |
|||
|
|||
var tagsVisitor = new ShaderGenerator(); |
|||
var blendingVisitor = new ShaderGenerator(); |
|||
var cullingVisitor = new ShaderGenerator(); |
|||
var zTestVisitor = new ShaderGenerator(); |
|||
var zWriteVisitor = new ShaderGenerator(); |
|||
|
|||
m_MaterialOptions.GetTags(tagsVisitor); |
|||
m_MaterialOptions.GetBlend(blendingVisitor); |
|||
m_MaterialOptions.GetCull(cullingVisitor); |
|||
m_MaterialOptions.GetDepthTest(zTestVisitor); |
|||
m_MaterialOptions.GetDepthWrite(zWriteVisitor); |
|||
|
|||
GetDefines(definesVisitor); |
|||
|
|||
var resultShader = templateText.Replace("${ShaderPropertyUsages}", shaderPropertyUsagesVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${ShaderFunctions}", shaderFunctionVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${VertexInputs}", shaderInputVisitor.GetShaderString(3)); |
|||
resultShader = resultShader.Replace("${VertexOutputs}", shaderOutputVisitor.GetShaderString(3)); |
|||
resultShader = resultShader.Replace("${PixelShaderBody}", shaderBodyVisitor.GetShaderString(3)); |
|||
resultShader = resultShader.Replace("${Tags}", tagsVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${Blending}", blendingVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${Culling}", cullingVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${ZTest}", zTestVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${ZWrite}", zWriteVisitor.GetShaderString(2)); |
|||
resultShader = resultShader.Replace("${LOD}", "" + m_MaterialOptions.lod); |
|||
|
|||
resultShader = resultShader.Replace("${Defines}", definesVisitor.GetShaderString(2)); |
|||
|
|||
resultShader = resultShader.Replace("${VertexShaderBody}", vertexShaderBlock.GetShaderString(3)); |
|||
|
|||
return resultShader; |
|||
} |
|||
|
|||
public void GetDefines(ShaderGenerator visitor) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override string GetFullShader(GenerationMode mode, string name, out List<PropertyGenerator.TextureInfo> configuredTextures) |
|||
{ |
|||
var templateLocation = ShaderGenerator.GetTemplatePath("shader.template"); |
|||
|
|||
if (!File.Exists(templateLocation)) |
|||
{ |
|||
configuredTextures = new List<PropertyGenerator.TextureInfo>(); |
|||
return string.Empty; |
|||
} |
|||
|
|||
var templateText = File.ReadAllText(templateLocation); |
|||
|
|||
var shaderPropertiesVisitor = new PropertyGenerator(); |
|||
var resultShader = templateText.Replace("${ShaderName}", name); |
|||
resultShader = resultShader.Replace("${SubShader}", GetSubShader(mode, shaderPropertiesVisitor)); |
|||
resultShader = resultShader.Replace("${ShaderPropertiesHeader}", shaderPropertiesVisitor.GetShaderString(2)); |
|||
configuredTextures = shaderPropertiesVisitor.GetConfiguredTexutres(); |
|||
|
|||
Debug.Log(resultShader); |
|||
|
|||
return Regex.Replace(resultShader, @"\r\n|\n\r|\n|\r", Environment.NewLine); |
|||
} |
|||
|
|||
private void GenerateSurfaceShaderInternal( |
|||
ShaderGenerator propertyUsages, |
|||
ShaderGenerator shaderBody, |
|||
ShaderGenerator nodeFunction, |
|||
ShaderGenerator shaderInputVisitor, |
|||
ShaderGenerator shaderOutputVisitor, |
|||
ShaderGenerator vertexShaderBlock, |
|||
ShaderGenerator definesVisitor, |
|||
GenerationMode mode) |
|||
{ |
|||
var activeNodeList = new List<INode>(); |
|||
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this, NodeUtils.IncludeSelf.Include, |
|||
new List<int>(surfaceInputs)); |
|||
|
|||
foreach (var node in activeNodeList.OfType<AbstractMaterialNode>()) |
|||
{ |
|||
if (node is IGeneratesFunction) |
|||
{ |
|||
((IGeneratesFunction)node).GenerateNodeFunction(nodeFunction, mode); |
|||
} |
|||
|
|||
node.GeneratePropertyUsages(propertyUsages, mode); |
|||
} |
|||
|
|||
int vertInputIndex = 2; |
|||
int vertOutputIndex = 5; |
|||
|
|||
shaderInputVisitor.AddShaderChunk("half4 texcoord1 : TEXCOORD1;", true); |
|||
|
|||
bool requiresBitangent = activeNodeList.OfType<IMayRequireBitangent>().Any(x => x.RequiresBitangent()); |
|||
bool requiresTangent = activeNodeList.OfType<IMayRequireTangent>().Any(x => x.RequiresTangent()); |
|||
bool requiresViewDirTangentSpace = activeNodeList.OfType<IMayRequireViewDirectionTangentSpace>().Any(x => x.RequiresViewDirectionTangentSpace()); |
|||
bool requiresViewDir = activeNodeList.OfType<IMayRequireViewDirection>().Any(x => x.RequiresViewDirection()); |
|||
bool requiresWorldPos = activeNodeList.OfType<IMayRequireWorldPosition>().Any(x => x.RequiresWorldPosition()); |
|||
bool requiresNormal = activeNodeList.OfType<IMayRequireNormal>().Any(x => x.RequiresNormal()); |
|||
bool requiresScreenPosition = activeNodeList.OfType<IMayRequireScreenPosition>().Any(x => x.RequiresScreenPosition()); |
|||
bool requiresVertexColor = activeNodeList.OfType<IMayRequireVertexColor>().Any(x => x.RequiresVertexColor()); |
|||
|
|||
foreach (var slot in GetInputSlots<MaterialSlot>()) |
|||
{ |
|||
if (surfaceInputs.Contains(slot.id)) |
|||
{ |
|||
foreach (var edge in owner.GetEdges(slot.slotReference)) |
|||
{ |
|||
var outputRef = edge.outputSlot; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(outputRef.nodeGuid); |
|||
if (fromNode == null) |
|||
continue; |
|||
|
|||
var remapper = fromNode as INodeGroupRemapper; |
|||
if (remapper != null && !remapper.IsValidSlotConnection(outputRef.slotId)) |
|||
continue; |
|||
} |
|||
} |
|||
} |
|||
|
|||
for (int uvIndex = 0; uvIndex < ShaderGeneratorNames.UVCount; ++uvIndex) |
|||
{ |
|||
var channel = (UVChannel)uvIndex; |
|||
if (activeNodeList.OfType<IMayRequireMeshUV>().Any(x => x.RequiresMeshUV(channel))) |
|||
{ |
|||
if(uvIndex != 0) |
|||
{ |
|||
shaderInputVisitor.AddShaderChunk(string.Format("half4 texcoord{0} : TEXCOORD{1};", uvIndex, vertInputIndex), true); |
|||
shaderOutputVisitor.AddShaderChunk(string.Format("half4 meshUV{0} : TEXCOORD{1};", uvIndex, vertOutputIndex), true); |
|||
vertexShaderBlock.AddShaderChunk(string.Format("o.meshUV{0} = v.texcoord{1};", uvIndex, uvIndex), true); |
|||
vertInputIndex++; |
|||
vertOutputIndex++; |
|||
} |
|||
shaderBody.AddShaderChunk(string.Format("half4 {0} = i.meshUV{1};", channel.GetUVName(), uvIndex), true); |
|||
} |
|||
} |
|||
|
|||
if (requiresViewDir || requiresViewDirTangentSpace) |
|||
{ |
|||
shaderBody.AddShaderChunk("float3 " + ShaderGeneratorNames.WorldSpaceViewDirection + " = i.viewDir;", true); |
|||
} |
|||
|
|||
if (requiresWorldPos) |
|||
{ |
|||
shaderBody.AddShaderChunk("float3 " + ShaderGeneratorNames.WorldSpacePosition + " = i.posWS;", true); |
|||
} |
|||
|
|||
if (requiresScreenPosition) |
|||
{ |
|||
shaderOutputVisitor.AddShaderChunk(string.Format("half4 screenPos : TEXCOORD{0};", vertOutputIndex), true); |
|||
vertexShaderBlock.AddShaderChunk("o.screenPos = ComputeScreenPos(v.vertex);", true); |
|||
shaderBody.AddShaderChunk("float4 " + ShaderGeneratorNames.ScreenPosition + " = i.screenPos;", true); |
|||
vertOutputIndex++; |
|||
} |
|||
|
|||
if (requiresBitangent || requiresTangent || requiresViewDirTangentSpace) |
|||
{ |
|||
shaderOutputVisitor.AddShaderChunk(string.Format("half3 tangent : TEXCOORD{0}; \\", vertOutputIndex), true); |
|||
vertexShaderBlock.AddShaderChunk("o.tangent = normalize(UnityObjectToWorldDir(v.tangent)); \\", true); |
|||
shaderBody.AddShaderChunk("float3 " + ShaderGeneratorNames.WorldSpaceTangent + " = normalize(i.tangent.xyz);", true); |
|||
vertOutputIndex++; |
|||
} |
|||
|
|||
if (requiresBitangent || requiresNormal || requiresViewDirTangentSpace) |
|||
{ |
|||
shaderBody.AddShaderChunk("float3 " + ShaderGeneratorNames.WorldSpaceNormal + " = normalize(i.normal);", true); |
|||
} |
|||
|
|||
if (requiresBitangent || requiresViewDirTangentSpace) |
|||
{ |
|||
shaderOutputVisitor.AddShaderChunk(string.Format("half3 binormal : TEXCOORD{0};", vertOutputIndex), true); |
|||
vertexShaderBlock.AddShaderChunk("o.binormal = cross(o.normal, o.tangent) * v.tangent.w;", true); |
|||
shaderBody.AddShaderChunk("float3 " + ShaderGeneratorNames.WorldSpaceBitangent + " = i.binormal;", true); |
|||
vertOutputIndex++; |
|||
} |
|||
|
|||
if (requiresViewDirTangentSpace) |
|||
{ |
|||
shaderBody.AddShaderChunk( |
|||
"float3 " + ShaderGeneratorNames.TangentSpaceViewDirection + ";", true); |
|||
|
|||
shaderBody.AddShaderChunk( |
|||
ShaderGeneratorNames.TangentSpaceViewDirection + ".x = dot(" + |
|||
ShaderGeneratorNames.WorldSpaceViewDirection + "," + |
|||
ShaderGeneratorNames.WorldSpaceTangent + ");", true); |
|||
|
|||
shaderBody.AddShaderChunk( |
|||
ShaderGeneratorNames.TangentSpaceViewDirection + ".y = dot(" + |
|||
ShaderGeneratorNames.WorldSpaceViewDirection + "," + |
|||
ShaderGeneratorNames.WorldSpaceBitangent + ");", true); |
|||
|
|||
shaderBody.AddShaderChunk( |
|||
ShaderGeneratorNames.TangentSpaceViewDirection + ".z = dot(" + |
|||
ShaderGeneratorNames.WorldSpaceViewDirection + "," + |
|||
ShaderGeneratorNames.WorldSpaceNormal + ");", true); |
|||
} |
|||
|
|||
if (requiresVertexColor) |
|||
{ |
|||
shaderOutputVisitor.AddShaderChunk(string.Format("half4 color : TEXCOORD{0};", vertOutputIndex), true); |
|||
shaderBody.AddShaderChunk("float4 " + ShaderGeneratorNames.VertexColor + " = i.color;", true); |
|||
vertInputIndex++; |
|||
vertOutputIndex++; |
|||
} |
|||
|
|||
GenerateNodeCode(shaderBody, propertyUsages, mode); |
|||
} |
|||
|
|||
public void GenerateNodeCode(ShaderGenerator shaderBody, ShaderGenerator propertyUsages, GenerationMode generationMode) |
|||
{ |
|||
var nodes = ListPool<INode>.Get(); |
|||
|
|||
//Get the rest of the nodes for all the other slots
|
|||
NodeUtils.DepthFirstCollectNodesFromNode(nodes, this, NodeUtils.IncludeSelf.Exclude, new List<int>(surfaceInputs)); |
|||
for (var i = 0; i < nodes.Count; i++) |
|||
{ |
|||
var node = nodes[i]; |
|||
if (node is IGeneratesBodyCode) |
|||
(node as IGeneratesBodyCode).GenerateNodeCode(shaderBody, generationMode); |
|||
} |
|||
ListPool<INode>.Release(nodes); |
|||
|
|||
foreach (var slot in GetInputSlots<MaterialSlot>()) |
|||
{ |
|||
if (surfaceInputs.Contains(slot.id)) |
|||
{ |
|||
foreach (var edge in owner.GetEdges(slot.slotReference)) |
|||
{ |
|||
var outputRef = edge.outputSlot; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(outputRef.nodeGuid); |
|||
if (fromNode == null) |
|||
continue; |
|||
|
|||
var remapper = fromNode as INodeGroupRemapper; |
|||
if (remapper != null && !remapper.IsValidSlotConnection(outputRef.slotId)) |
|||
continue; |
|||
|
|||
shaderBody.AddShaderChunk("o." + slot.shaderOutputName + " = " + fromNode.GetVariableNameForSlot(outputRef.slotId) + ";", true); |
|||
|
|||
if (slot.id == AlphaSlotId) |
|||
propertyUsages.AddShaderChunk("#define _ALPHAPREMULTIPLY_ON", true); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 19892eaf92f3e2e49928945f6da04525 |
|||
timeCreated: 1478188276 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: TestGraph-Unlit |
|||
m_Shader: {fileID: 4800000, guid: c575d6799ba1a994a931fe22b1d3fe08, type: 3} |
|||
m_ShaderKeywords: _ALPHABLEND_ON _GLOSSYREFLECTIONS_ON _METALLICSPECGLOSSMAP _METALLIC_SETUP |
|||
_NORMALMAP _SPECGLOSSMAP_BASE_ALPHA _SPECULARHIGHLIGHTS_ON |
|||
m_LightmapFlags: 0 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- Texture2D_Texture2D_9508545D_Uniform: |
|||
m_Texture: {fileID: 2800000, guid: 330f42016073a97418a4aae5517e32c8, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 2800000, guid: e017404169662f041a969b0a924cc2ed, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _Cube: |
|||
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: 2800000, guid: 330f42016073a97418a4aae5517e32c8, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MetallicSpecGlossMap: |
|||
m_Texture: {fileID: 2800000, guid: 5d84e1086e00e3347aaa0bbba206bb80, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _OcclusionMap: |
|||
m_Texture: {fileID: 2800000, guid: 5d84e1086e00e3347aaa0bbba206bb80, type: 3} |
|||
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} |
|||
- _SpecGlossMap: |
|||
m_Texture: {fileID: 2800000, guid: 5d84e1086e00e3347aaa0bbba206bb80, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 10 |
|||
- _GlossMapScale: 0.5 |
|||
- _Glossiness: 0.5 |
|||
- _GlossinessSource: 0 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 2 |
|||
- _OcclusionStrength: 0.5 |
|||
- _Parallax: 0.02 |
|||
- _ReflectionSource: 0 |
|||
- _Shininess: 0.087 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecSource: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 5 |
|||
- _UVSec: 0 |
|||
- _WorkflowMode: 1 |
|||
- _ZWrite: 0 |
|||
m_Colors: |
|||
- Color_Color_A536DDF7_Uniform: {r: 1, g: 1, b: 1, a: 1} |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SpecColor: {r: 0.9632353, g: 0.9632353, b: 0.9632353, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: ea0bef6a3bdc6474185c50a3a8939982 |
|||
timeCreated: 1505335385 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue