Stephane Laroche
7 年前
当前提交
9498fe0b
共有 91 个文件被更改,包括 2573 次插入 和 1253 次删除
-
2ScriptableRenderPipeline/HDRenderPipeline/CHANGELOG.md
-
3ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VBuffer.hlsl
-
3ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.compute
-
573ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/LightWeightPBRSubShader.cs
-
582ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/LightWeightUnlitSubShader.cs
-
208ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightPBRExtraPasses.template
-
94ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightPBRForwardPass.template
-
160ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightUnlitExtraPasses.template
-
83ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightUnlitPass.template
-
1ShaderGraph/CHANGELOG.md
-
295ShaderGraph/HDPipeline/HDUnlitSubShader.cs
-
8ShaderGraph/Testing/Editor/TestSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/BitangentMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/BooleanMaterialSlot.cs
-
12ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/ColorMaterialSlot.cs
-
10ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/ColorRGBMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/CubemapInputMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/CubemapMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/DynamicMatrixMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/DynamicValueMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/DynamicVectorMaterialSlot.cs
-
12ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/GradientInputMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/GradientMaterialSlot.cs
-
60ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Matrix2MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Matrix3MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Matrix4MaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/NormalMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/PositionMaterialSlot.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/PreviewMode.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/SamplerStateMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/ScreenPositionMaterialSlot.cs
-
30ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/ShaderGraphRequirements.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/SpaceMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/TangentMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DInputMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/UVMaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Vector1MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Vector2MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Vector3MaterialSlot.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Vector4MaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/VertexColorMaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/ViewDirectionMaterialSlot.cs
-
98ShaderGraph/com.unity.shadergraph/Editor/Data/Implementation/NodeUtils.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireBitangent.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireMeshUV.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireNormal.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequirePosition.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireScreenPosition.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireTangent.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireVertexColor.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Interfaces/IMayRequireViewDirection.cs
-
60ShaderGraph/com.unity.shadergraph/Editor/Data/MasterNodes/PBRMasterNode.cs
-
30ShaderGraph/com.unity.shadergraph/Editor/Data/MasterNodes/UnlitMasterNode.cs
-
10ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Artistic/Normal/NormalCreateNode.cs
-
89ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/CodeFunctionNode.cs
-
8ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Basic/ColorNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/BitangentVectorNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/NormalVectorNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/PositionNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/ScreenPositionNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/TangentVectorNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/UVNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/VertexColorNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Geometry/ViewDirectionNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Scene/FogNode.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleCubemapNode.cs
-
12ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleTexture2DNode.cs
-
34ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/MasterNode.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/TransformNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Procedural/CheckerboardNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Shape/EllipseNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Shape/PolygonNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Shape/RectangleNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Shape/RoundedRectangleNode.cs
-
34ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/ShaderStage.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/UV/FlipbookNode.cs
-
10ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/UV/TriplanarNode.cs
-
36ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/SubGraph/SubGraph.cs
-
50ShaderGraph/com.unity.shadergraph/Editor/Data/SurfaceModel/SurfaceMaterialOptions.cs
-
436ShaderGraph/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs
-
13ShaderGraph/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs
-
411ShaderGraph/com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Util/ShaderGeneratorNames.cs
-
33ShaderGraph/com.unity.shadergraph/Editor/Data/Util/ShaderStringBuilder.cs
-
69ShaderGraph/com.unity.shadergraph/Editor/Drawing/PreviewManager.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Drawing/SearchWindowProvider.cs
-
17ShaderGraph/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs
-
47ShaderGraph/com.unity.shadergraph/Editor/Templates/HDUnlitPassForward.template
|
|||
Pass |
|||
{ |
|||
Name "ShadowCaster" |
|||
Tags{"LightMode" = "ShadowCaster"} |
|||
Name "ShadowCaster" |
|||
Tags{"LightMode" = "ShadowCaster"} |
|||
ZWrite On |
|||
ZTest LEqual |
|||
Cull ${Culling} |
|||
ZWrite On ZTest LEqual |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
// Material options generated by graph |
|||
${Culling} |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
// ------------------------------------- |
|||
// Material Keywords |
|||
#pragma shader_feature _ALPHATEST_ON |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
#pragma vertex ShadowPassVertex |
|||
#pragma fragment ShadowPassFragment |
|||
#pragma vertex ShadowPassVertex |
|||
#pragma fragment ShadowPassFragment |
|||
// Defines generated by graph |
|||
${Defines} |
|||
#include "LWRP/ShaderLibrary/Core.hlsl" |
|||
#include "LWRP/ShaderLibrary/Lighting.hlsl" |
|||
#include "ShaderGraphLibrary/Functions.hlsl" |
|||
#include "CoreRP/ShaderLibrary/Color.hlsl" |
|||
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl" |
|||
#include "LWRP/ShaderLibrary/LightweightPassShadow.hlsl" |
|||
${Graph} |
|||
struct VertexOutput |
|||
{ |
|||
float2 uv : TEXCOORD0; |
|||
float4 clipPos : SV_POSITION; |
|||
}; |
|||
|
|||
// x: global clip space bias, y: normal world space bias |
|||
float4 _ShadowBias; |
|||
float3 _LightDirection; |
|||
ENDHLSL |
|||
VertexOutput ShadowPassVertex(GraphVertexInput v) |
|||
{ |
|||
VertexOutput o; |
|||
UNITY_SETUP_INSTANCE_ID(v); |
|||
|
|||
// Vertex transformations performed by graph |
|||
${VertexShader} |
|||
VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; |
|||
|
|||
// Vertex description inputs defined by graph |
|||
${VertexShaderDescriptionInputs} |
|||
VertexDescription vd = PopulateVertexData(vdi); |
|||
v.vertex.xyz = vd.Position; |
|||
|
|||
o.uv = uv1; |
|||
|
|||
float3 positionWS = TransformObjectToWorld(v.vertex.xyz); |
|||
float3 normalWS = TransformObjectToWorldDir(v.normal); |
|||
|
|||
float invNdotL = 1.0 - saturate(dot(_LightDirection, normalWS)); |
|||
float scale = invNdotL * _ShadowBias.y; |
|||
|
|||
// normal bias is negative since we want to apply an inset normal offset |
|||
positionWS = normalWS * scale.xxx + positionWS; |
|||
float4 clipPos = TransformWorldToHClip(positionWS); |
|||
|
|||
// _ShadowBias.x sign depens on if platform has reversed z buffer |
|||
clipPos.z += _ShadowBias.x; |
|||
|
|||
#if UNITY_REVERSED_Z |
|||
clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); |
|||
#else |
|||
clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); |
|||
#endif |
|||
o.clipPos = clipPos; |
|||
|
|||
return o; |
|||
} |
|||
|
|||
half4 ShadowPassFragment() : SV_TARGET |
|||
{ |
|||
return 0; |
|||
} |
|||
|
|||
ENDHLSL |
|||
Name "DepthOnly" |
|||
Tags{"LightMode" = "DepthOnly"} |
|||
Name "DepthOnly" |
|||
Tags{"LightMode" = "DepthOnly"} |
|||
ZWrite On |
|||
ColorMask 0 |
|||
Cull ${Culling} |
|||
ZWrite On |
|||
ColorMask 0 |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma target 2.0 |
|||
// Material options generated by graph |
|||
${Culling} |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
#pragma vertex DepthOnlyVertex |
|||
#pragma fragment DepthOnlyFragment |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
// ------------------------------------- |
|||
// Material Keywords |
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
// Defines generated by graph |
|||
${Defines} |
|||
#include "LWRP/ShaderLibrary/Core.hlsl" |
|||
#include "LWRP/ShaderLibrary/Lighting.hlsl" |
|||
#include "ShaderGraphLibrary/Functions.hlsl" |
|||
#include "CoreRP/ShaderLibrary/Color.hlsl" |
|||
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl" |
|||
#include "LWRP/ShaderLibrary/LightweightPassDepthOnly.hlsl" |
|||
ENDHLSL |
|||
${Graph} |
|||
struct VertexOutput |
|||
{ |
|||
float2 uv : TEXCOORD0; |
|||
float4 clipPos : SV_POSITION; |
|||
}; |
|||
|
|||
VertexOutput vert(GraphVertexInput v) |
|||
{ |
|||
VertexOutput o = (VertexOutput)0; |
|||
UNITY_SETUP_INSTANCE_ID(v); |
|||
|
|||
// Vertex transformations performed by graph |
|||
${VertexShader} |
|||
VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; |
|||
|
|||
// Vertex description inputs defined by graph |
|||
${VertexShaderDescriptionInputs} |
|||
VertexDescription vd = PopulateVertexData(vdi); |
|||
v.vertex.xyz = vd.Position; |
|||
|
|||
o.uv = uv1; |
|||
o.clipPos = TransformObjectToHClip(v.vertex.xyz); |
|||
return o; |
|||
} |
|||
|
|||
half4 frag() : SV_TARGET |
|||
{ |
|||
return 0; |
|||
} |
|||
ENDHLSL |
|||
Name "Meta" |
|||
Tags{"LightMode" = "Meta"} |
|||
Name "Meta" |
|||
Tags{"LightMode" = "Meta"} |
|||
Cull Off |
|||
Cull Off |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
#pragma vertex LightweightVertexMeta |
|||
#pragma fragment LightweightFragmentMeta |
|||
#pragma vertex LightweightVertexMeta |
|||
#pragma fragment LightweightFragmentMeta |
|||
#pragma shader_feature _SPECULAR_SETUP |
|||
#pragma shader_feature _EMISSION |
|||
#pragma shader_feature _METALLICSPECGLOSSMAP |
|||
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|||
#pragma shader_feature EDITOR_VISUALIZATION |
|||
#pragma shader_feature _SPECULAR_SETUP |
|||
#pragma shader_feature _EMISSION |
|||
#pragma shader_feature _METALLICSPECGLOSSMAP |
|||
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|||
#pragma shader_feature EDITOR_VISUALIZATION |
|||
#pragma shader_feature _SPECGLOSSMAP |
|||
#pragma shader_feature _SPECGLOSSMAP |
|||
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl" |
|||
#include "LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl" |
|||
ENDHLSL |
|||
} |
|||
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl" |
|||
#include "LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl" |
|||
ENDHLSL |
|||
} |
|
|||
Pass |
|||
{ |
|||
Name "ShadowCaster" |
|||
Tags{"LightMode" = "ShadowCaster"} |
|||
|
|||
ZWrite On ZTest LEqual |
|||
|
|||
// Material options generated by graph |
|||
${Culling} |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
|
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
|
|||
#pragma vertex ShadowPassVertex |
|||
#pragma fragment ShadowPassFragment |
|||
|
|||
// Defines generated by graph |
|||
${Defines} |
|||
#include "LWRP/ShaderLibrary/Core.hlsl" |
|||
#include "LWRP/ShaderLibrary/Lighting.hlsl" |
|||
#include "ShaderGraphLibrary/Functions.hlsl" |
|||
#include "CoreRP/ShaderLibrary/Color.hlsl" |
|||
|
|||
${Graph} |
|||
struct VertexOutput |
|||
{ |
|||
float2 uv : TEXCOORD0; |
|||
float4 clipPos : SV_POSITION; |
|||
}; |
|||
|
|||
// x: global clip space bias, y: normal world space bias |
|||
float4 _ShadowBias; |
|||
float3 _LightDirection; |
|||
|
|||
VertexOutput ShadowPassVertex(GraphVertexInput v) |
|||
{ |
|||
VertexOutput o; |
|||
UNITY_SETUP_INSTANCE_ID(v); |
|||
|
|||
// Vertex transformations performed by graph |
|||
${VertexShader} |
|||
VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; |
|||
|
|||
// Vertex description inputs defined by graph |
|||
${VertexShaderDescriptionInputs} |
|||
VertexDescription vd = PopulateVertexData(vdi); |
|||
v.vertex.xyz = vd.Position; |
|||
|
|||
o.uv = uv1; |
|||
|
|||
float3 positionWS = TransformObjectToWorld(v.vertex.xyz); |
|||
float3 normalWS = TransformObjectToWorldDir(v.normal); |
|||
|
|||
float invNdotL = 1.0 - saturate(dot(_LightDirection, normalWS)); |
|||
float scale = invNdotL * _ShadowBias.y; |
|||
|
|||
// normal bias is negative since we want to apply an inset normal offset |
|||
positionWS = normalWS * scale.xxx + positionWS; |
|||
float4 clipPos = TransformWorldToHClip(positionWS); |
|||
|
|||
// _ShadowBias.x sign depens on if platform has reversed z buffer |
|||
clipPos.z += _ShadowBias.x; |
|||
|
|||
#if UNITY_REVERSED_Z |
|||
clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); |
|||
#else |
|||
clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); |
|||
#endif |
|||
o.clipPos = clipPos; |
|||
|
|||
return o; |
|||
} |
|||
|
|||
half4 ShadowPassFragment() : SV_TARGET |
|||
{ |
|||
return 0; |
|||
} |
|||
|
|||
ENDHLSL |
|||
} |
|||
Tags{"LightMode" = "DepthOnly"} |
|||
Tags{"LightMode" = "DepthOnly"} |
|||
ZWrite On |
|||
Cull ${Culling} |
|||
ColorMask 0 |
|||
ZWrite On |
|||
ColorMask 0 |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
// Material options generated by graph |
|||
${Culling} |
|||
HLSLPROGRAM |
|||
// Required to compile gles 2.0 with standard srp library |
|||
#pragma prefer_hlslcc gles |
|||
#pragma exclude_renderers d3d11_9x |
|||
#pragma target 2.0 |
|||
#pragma vertex DepthOnlyVertex |
|||
#pragma fragment DepthOnlyFragment |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
// ------------------------------------- |
|||
// Material Keywords |
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
//-------------------------------------- |
|||
// GPU Instancing |
|||
#pragma multi_compile_instancing |
|||
// Defines generated by graph |
|||
${Defines} |
|||
#include "LWRP/ShaderLibrary/Core.hlsl" |
|||
#include "LWRP/ShaderLibrary/Lighting.hlsl" |
|||
#include "ShaderGraphLibrary/Functions.hlsl" |
|||
#include "CoreRP/ShaderLibrary/Color.hlsl" |
|||
#include "LWRP/ShaderLibrary/InputSurfaceUnlit.hlsl" |
|||
#include "LWRP/ShaderLibrary/LightweightPassDepthOnly.hlsl" |
|||
ENDHLSL |
|||
} |
|||
${Graph} |
|||
struct VertexOutput |
|||
{ |
|||
float2 uv : TEXCOORD0; |
|||
float4 clipPos : SV_POSITION; |
|||
}; |
|||
|
|||
VertexOutput vert(GraphVertexInput v) |
|||
{ |
|||
VertexOutput o = (VertexOutput)0; |
|||
UNITY_SETUP_INSTANCE_ID(v); |
|||
|
|||
// Vertex transformations performed by graph |
|||
${VertexShader} |
|||
VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; |
|||
|
|||
// Vertex description inputs defined by graph |
|||
${VertexShaderDescriptionInputs} |
|||
VertexDescription vd = PopulateVertexData(vdi); |
|||
v.vertex.xyz = vd.Position; |
|||
|
|||
o.uv = uv1; |
|||
o.clipPos = TransformObjectToHClip(v.vertex.xyz); |
|||
return o; |
|||
} |
|||
|
|||
half4 frag() : SV_TARGET |
|||
{ |
|||
return 0; |
|||
} |
|||
ENDHLSL |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue