Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
timchen1002
CustomSRP_06_ShadowMasks
提交
f25931c4
C
CustomSRP_06_ShadowMasks
项目概览
timchen1002
/
CustomSRP_06_ShadowMasks
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
CustomSRP_06_ShadowMasks
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f25931c4
编写于
9月 13, 2021
作者:
timchen1002
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
udpate
上级
03b0fb42
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
225 addition
and
77 deletion
+225
-77
Assembly-CSharp-Editor.csproj
Assembly-CSharp-Editor.csproj
+39
-39
Assembly-CSharp.csproj
Assembly-CSharp.csproj
+30
-30
Assets/Custom_RP.asset
Assets/Custom_RP.asset
+1
-1
Assets/Scenes/Baked Light.unity
Assets/Scenes/Baked Light.unity
+3
-3
Assets/Scenes/Baked Light/LightingData.asset
Assets/Scenes/Baked Light/LightingData.asset
+0
-0
Assets/Scenes/Baked Light/Lightmap-0_comp_light.exr
Assets/Scenes/Baked Light/Lightmap-0_comp_light.exr
+0
-0
Assets/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png
Assets/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png
+0
-0
Assets/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png.meta
...ts/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png.meta
+96
-0
Assets/Scenes/Baked LightSettings.lighting
Assets/Scenes/Baked LightSettings.lighting
+2
-2
Assets/Scripts/Runtime/CameraRenderer.cs
Assets/Scripts/Runtime/CameraRenderer.cs
+1
-1
Assets/Scripts/Runtime/Shadows.cs
Assets/Scripts/Runtime/Shadows.cs
+18
-0
Assets/ShaderLibrary/GI.hlsl
Assets/ShaderLibrary/GI.hlsl
+20
-0
Assets/ShaderLibrary/Lighting.hlsl
Assets/ShaderLibrary/Lighting.hlsl
+3
-0
Assets/ShaderLibrary/Shadows.hlsl
Assets/ShaderLibrary/Shadows.hlsl
+11
-1
Assets/Shaders/Lit.shader
Assets/Shaders/Lit.shader
+1
-0
未找到文件。
Assembly-CSharp-Editor.csproj
浏览文件 @
f25931c4
...
...
@@ -9,7 +9,7 @@
<ProductVersion>
10.0.20506
</ProductVersion>
<SchemaVersion>
2.0
</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>
{
2b10e653-4c47-ad1e-4cac-7131423fbdf4
}
</ProjectGuid>
<ProjectGuid>
{
1b00d2d0-ae7b-edc8-88c8-a29fbb928f9b
}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<AssemblyName>
Assembly-CSharp-Editor
</AssemblyName>
...
...
@@ -281,28 +281,28 @@
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/PlaybackEngines/MetroSupport/UnityEditor.UWP.Extensions.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Plastic.Antlr3.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/Unity.Plastic.Antlr3.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/Unity.Plastic.Antlr3.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.YamlDotNet"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Dependencies/YamlDotNet/Unity.VisualScripting.YamlDotNet.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Dependencies/YamlDotNet/Unity.VisualScripting.YamlDotNet.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.IonicZip"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Dependencies/DotNetZip/Unity.VisualScripting.IonicZip.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Dependencies/DotNetZip/Unity.VisualScripting.IonicZip.dll
</HintPath>
</Reference>
<Reference
Include=
"log4netPlastic"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/log4netPlastic.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/log4netPlastic.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Antlr3.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Newtonsoft.Json"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll
</HintPath>
</Reference>
<Reference
Include=
"unityplastic"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/unityplastic.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.collab-proxy@1.7.1/Lib/Editor/PlasticSCM/unityplastic.dll
</HintPath>
</Reference>
<Reference
Include=
"nunit.framework"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.ext.nunit@1.0.6/net35/unity-custom/nunit.framework.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.ext.nunit@1.0.6/net35/unity-custom/nunit.framework.dll
</HintPath>
</Reference>
<Reference
Include=
"mscorlib"
>
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll
</HintPath>
...
...
@@ -653,96 +653,96 @@
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEngine.TestRunner"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEngine.TestRunner.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEngine.TestRunner.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEditor.TestRunner"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEditor.TestRunner.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEditor.TestRunner.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Flow.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VSCode.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Shaders"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Shaders.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Shaders.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.TextMeshPro.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Timeline"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Timeline.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Timeline.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Core.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.TextMeshPro"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.TextMeshPro.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.TextMeshPro.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.State.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Searcher.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Searcher.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Searcher.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"VSSettingsProvider"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/VSSettingsProvider.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/VSSettingsProvider.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Flow"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEditor.UI"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEditor.UI.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEditor.UI.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.PlasticSCM.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.ShaderLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.ShaderLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.ShaderLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEngine.UI"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEngine.UI.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEngine.UI.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Core"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Mathematics"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Mathematics.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Mathematics.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.ShaderGraph.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.ShaderGraph.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.ShaderGraph.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipeline.Universal.ShaderLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipeline.Universal.ShaderLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipeline.Universal.ShaderLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Timeline.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Mathematics.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.State"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.State.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.State.dll
</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"Assembly-CSharp.csproj"
>
<Project>
{
82f94f72-4224-f4fb-2b83-71cb93896cfd
}
</Project>
<Project>
{
3175fd2d-f181-6146-73e6-b2b0cb2e8360
}
</Project>
<Name>
Assembly-CSharp
</Name>
</ProjectReference>
</ItemGroup>
...
...
Assembly-CSharp.csproj
浏览文件 @
f25931c4
...
...
@@ -9,7 +9,7 @@
<ProductVersion>
10.0.20506
</ProductVersion>
<SchemaVersion>
2.0
</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>
{
82f94f72-4224-f4fb-2b83-71cb93896cfd
}
</ProjectGuid>
<ProjectGuid>
{
3175fd2d-f181-6146-73e6-b2b0cb2e8360
}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<AssemblyName>
Assembly-CSharp
</AssemblyName>
...
...
@@ -293,10 +293,10 @@
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/Managed/UnityEngine/UnityEditor.UnityConnectModule.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Antlr3.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Newtonsoft.Json"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll
</HintPath>
</Reference>
<Reference
Include=
"netstandard"
>
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll
</HintPath>
...
...
@@ -644,85 +644,85 @@
<HintPath>
F:/Unity/2021.1.16f1c1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Flow.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VSCode.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Shaders"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Shaders.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Shaders.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.TextMeshPro.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Timeline"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Timeline.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Timeline.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Core.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.TextMeshPro"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.TextMeshPro.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.TextMeshPro.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.State.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Searcher.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Searcher.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Searcher.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"VSSettingsProvider"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/VSSettingsProvider.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/VSSettingsProvider.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.Runtime"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Runtime.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Runtime.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Flow"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEditor.UI"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEditor.UI.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEditor.UI.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.PlasticSCM.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.ShaderLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.ShaderLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.ShaderLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"UnityEngine.UI"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/UnityEngine.UI.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/UnityEngine.UI.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.Core"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Mathematics"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Mathematics.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Mathematics.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.ShaderGraph.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.ShaderGraph.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.ShaderGraph.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Universal.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Universal.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipeline.Universal.ShaderLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipeline.Universal.ShaderLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipeline.Universal.ShaderLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Timeline.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.Mathematics.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.RenderPipelines.Core.Editor"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Editor.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Editor.dll
</HintPath>
</Reference>
<Reference
Include=
"Unity.VisualScripting.State"
>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
5_BakedLight
/Library/ScriptAssemblies/Unity.VisualScripting.State.dll
</HintPath>
<HintPath>
D:/UnityProjects/CustomSRP/CustomSRP_0
6_ShadowMasks
/Library/ScriptAssemblies/Unity.VisualScripting.State.dll
</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
...
...
Assets/Custom_RP.asset
浏览文件 @
f25931c4
...
...
@@ -16,7 +16,7 @@ MonoBehaviour:
useGPUInstancing
:
1
useSRPBatcher
:
1
shadows
:
maxDistance
:
30
maxDistance
:
12.06
distanceFade
:
0.1
directional
:
atlasSize
:
4096
...
...
Assets/Scenes/Baked Light.unity
浏览文件 @
f25931c4
...
...
@@ -23,7 +23,7 @@ RenderSettings:
m_AmbientSkyColor
:
{
r
:
0.212
,
g
:
0.227
,
b
:
0.259
,
a
:
1
}
m_AmbientEquatorColor
:
{
r
:
0.114
,
g
:
0.125
,
b
:
0.133
,
a
:
1
}
m_AmbientGroundColor
:
{
r
:
0.047
,
g
:
0.043
,
b
:
0.035
,
a
:
1
}
m_AmbientIntensity
:
0
m_AmbientIntensity
:
1
m_AmbientMode
:
0
m_SubtractiveShadowColor
:
{
r
:
0.42
,
g
:
0.478
,
b
:
0.627
,
a
:
1
}
m_SkyboxMaterial
:
{
fileID
:
10304
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
...
...
@@ -1235,7 +1235,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!108
&705507994
Light
:
m_ObjectHideFlags
:
0
...
...
@@ -1293,7 +1293,7 @@ Light:
m_BounceIntensity
:
1
m_ColorTemperature
:
6570
m_UseColorTemperature
:
0
m_BoundingSphereOverride
:
{
x
:
1
.024e-42
,
y
:
6e-44
,
z
:
0
,
w
:
0
}
m_BoundingSphereOverride
:
{
x
:
1
e-45
,
y
:
1.3845e-41
,
z
:
1.02e-43
,
w
:
0
}
m_UseBoundingSphereOverride
:
0
m_UseViewFrustumForShadowCasterCull
:
1
m_ShadowRadius
:
0
...
...
Assets/Scenes/Baked Light/LightingData.asset
浏览文件 @
f25931c4
无法预览此类型文件
Assets/Scenes/Baked Light/Lightmap-0_comp_light.exr
浏览文件 @
f25931c4
无法预览此类型文件
Assets/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png
0 → 100644
浏览文件 @
f25931c4
19.8 KB
Assets/Scenes/Baked Light/Lightmap-0_comp_shadowmask.png.meta
0 → 100644
浏览文件 @
f25931c4
fileFormatVersion: 2
guid: 8c14825d4452f5b4492c963b62481681
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 3
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 11
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/Baked LightSettings.lighting
浏览文件 @
f25931c4
...
...
@@ -15,7 +15,7 @@ LightingSettings:
m_BounceScale
:
1
m_AlbedoBoost
:
1
m_IndirectOutputScale
:
1
m_UsingShadowmask
:
0
m_UsingShadowmask
:
1
m_BakeBackend
:
1
m_LightmapMaxSize
:
1024
m_BakeResolution
:
20
...
...
@@ -26,7 +26,7 @@ LightingSettings:
m_CompAOExponent
:
1
m_CompAOExponentDirect
:
0
m_ExtractAO
:
0
m_MixedBakeMode
:
0
m_MixedBakeMode
:
2
m_LightmapsBakeMode
:
0
m_FilterMode
:
1
m_LightmapParameters
:
{
fileID
:
15204
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
...
...
Assets/Scripts/Runtime/CameraRenderer.cs
浏览文件 @
f25931c4
...
...
@@ -129,7 +129,7 @@ public partial class CameraRenderer
{
enableDynamicBatching
=
useDynamicBatching
,
enableInstancing
=
useGPUInstancing
,
perObjectData
=
PerObjectData
.
Lightmaps
|
PerObjectData
.
LightProbe
|
PerObjectData
.
LightProbeProxyVolume
,
perObjectData
=
PerObjectData
.
Lightmaps
|
PerObjectData
.
ShadowMask
|
PerObjectData
.
LightProbe
|
PerObjectData
.
LightProbeProxyVolume
,
};
// 渲染CustomLit表示的pass块
drawingSettings
.
SetShaderPassName
(
1
,
litShaderTagId
);
...
...
Assets/Scripts/Runtime/Shadows.cs
浏览文件 @
f25931c4
...
...
@@ -18,6 +18,8 @@ public class Shadows
ShadowSettings
shadowSettings
;
bool
useShadowMask
;
// 可投射阴影的定向光源最大数量
const
int
maxShadowedDirLightCount
=
4
;
// 最大级联数量
...
...
@@ -65,6 +67,10 @@ public class Shadows
"_CASCADE_BLEND_SOFT"
,
"_CASCADE_BLEND_DITHER"
,
};
static
string
[]
shadowMaskKeywords
=
{
"_SHADOW_MASK_DISTANCE"
};
public
void
Setup
(
ScriptableRenderContext
context
,
CullingResults
cullingResults
,
ShadowSettings
shadowSettings
)
{
...
...
@@ -72,6 +78,7 @@ public class Shadows
this
.
cullingResults
=
cullingResults
;
this
.
shadowSettings
=
shadowSettings
;
shadowedDirectionalLightCount
=
0
;
useShadowMask
=
false
;
}
/// <summary>
...
...
@@ -93,6 +100,12 @@ public class Shadows
{
if
(
shadowedDirectionalLightCount
<
maxShadowedDirLightCount
&&
light
.
shadows
!=
LightShadows
.
None
&&
light
.
shadowStrength
>
0f
&&
cullingResults
.
GetShadowCasterBounds
(
visibleLightIndex
,
out
Bounds
b
))
{
// 如果使用了ShadowMask
LightBakingOutput
lightBaking
=
light
.
bakingOutput
;
if
(
lightBaking
.
lightmapBakeType
==
LightmapBakeType
.
Mixed
&&
lightBaking
.
mixedLightingMode
==
MixedLightingMode
.
Shadowmask
)
{
useShadowMask
=
true
;
}
shadowedDirectionalLights
[
shadowedDirectionalLightCount
]
=
new
ShadowedDirectionalLight
{
visibleLightIndex
=
visibleLightIndex
,
slopeScaleBias
=
light
.
shadowBias
,
...
...
@@ -120,6 +133,11 @@ public class Shadows
{
buffer
.
GetTemporaryRT
(
dirShadowAtlasId
,
1
,
1
,
32
,
FilterMode
.
Bilinear
,
RenderTextureFormat
.
Shadowmap
);
}
// 是否使用阴影蒙版
buffer
.
BeginSample
(
bufferName
);
SetKeyWords
(
shadowMaskKeywords
,
useShadowMask
?
QualitySettings
.
shadowmaskMode
==
ShadowmaskMode
.
Shadowmask
?
0
:
1
:
-
1
);
buffer
.
EndSample
(
bufferName
);
ExecuteBuffer
();
}
/// <summary>
...
...
Assets/ShaderLibrary/GI.hlsl
浏览文件 @
f25931c4
...
...
@@ -10,6 +10,9 @@ SAMPLER(samplerunity_Lightmap);
TEXTURE3D_FLOAT
(
unity_ProbeVolumeSH
);
SAMPLER
(
samplerunity_ProbeVolumeSH
);
TEXTURE2D
(
unity_ShadowMask
);
SAMPLER
(
samplerunity_ShadowMask
);
// 当需要渲染光照贴图对象时
#if defined(LIGHTMAP_ON)
#define GI_ATTRIBUTE_DATA float2 lightMapUV : TEXCOORD1;
...
...
@@ -28,6 +31,7 @@ struct GI
{
// 漫反射颜色
float3
diffuse
;
ShadowMask
shadowMask
;
};
// 采样光照贴图
...
...
@@ -81,10 +85,26 @@ float3 SampleLightProbe(Surface surfaceWS)
#endif
}
// 采样shadowMask得到烘焙阴影数据
float4
SampleBakedShadows
(
float2
lightMapUV
)
{
#if defined(LIGHTMAP_ON)
return
SAMPLE_TEXTURE2D
(
unity_ShadowMask
,
samplerunity_ShadowMask
,
lightMapUV
);
#else
return
1
.
0
;
#endif
}
GI
GetGI
(
float2
lightMapUV
,
Surface
surfaceWS
)
{
GI
gi
;
gi
.
diffuse
=
SampleLightMap
(
lightMapUV
)
+
SampleLightProbe
(
surfaceWS
);
gi
.
shadowMask
.
distance
=
false
;
gi
.
shadowMask
.
shadows
=
1
.
0
;
#if defined(_SHADOW_MASK_DISTANCE)
gi
.
shadowMask
.
distance
=
true
;
gi
.
shadowMask
.
shadows
=
SampleBakedShadows
(
lightMapUV
);
#endif
return
gi
;
}
...
...
Assets/ShaderLibrary/Lighting.hlsl
浏览文件 @
f25931c4
...
...
@@ -19,6 +19,9 @@ float3 GetLighting(Surface surfaceWS, BRDF brdf, GI gi)
{
// 得到表面阴影数据
ShadowData
shadowData
=
GetShadowData
(
surfaceWS
);
shadowData
.
shadowMask
=
gi
.
shadowMask
;
// return gi.shadowMask.shadows.rgb;
// 可见光的光照结果进行累加得到最终光照结果
float3
color
=
gi
.
diffuse
*
brdf
.
diffuse
;
for
(
int
i
=
0
;
i
<
GetDirectionalLightCount
();
i
++
)
...
...
Assets/ShaderLibrary/Shadows.hlsl
浏览文件 @
f25931c4
...
...
@@ -50,7 +50,14 @@ struct DirectionalShadowData
float
normalBias
;
};
// 阴影数据
// 烘焙阴影数据
struct
ShadowMask
{
bool
distance
;
float4
shadows
;
};
// 表面的阴影数据
struct
ShadowData
{
int
cascadeIndex
;
...
...
@@ -58,6 +65,7 @@ struct ShadowData
float
strength
;
// 混合级联
float
cascadeBlend
;
ShadowMask
shadowMask
;
};
// 采样阴影图集
...
...
@@ -134,6 +142,8 @@ float FadedShadowStrength(float distance, float scale, float fade)
ShadowData
GetShadowData
(
Surface
surfaceWS
)
{
ShadowData
data
;
data
.
shadowMask
.
distance
=
false
;
data
.
shadowMask
.
shadows
=
1
.
0
;
data
.
cascadeBlend
=
1
.
0
;
data
.
strength
=
FadedShadowStrength
(
surfaceWS
.
depth
,
_ShadowDistanceFade
.
x
,
_ShadowDistanceFade
.
y
);
int
i
;
...
...
Assets/Shaders/Lit.shader
浏览文件 @
f25931c4
...
...
@@ -56,6 +56,7 @@ Shader "Custom RP/Lit"
#pragma shader_feature _PREMULTIPLY_ALPHA
#pragma multi_compile _ _DIRECTIONAL_PCF3 _DIRECTIONAL_PCF5 _DIRECTIONAL_PCF7
#pragma multi_compile _ _CASCADE_BLEND_SOFT _CASCADE_BLEND_DITHER
#pragma multi_compile _ _SHADOW_MASK_DISTANCE
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile_instancing
#pragma vertex LitPassVertex
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录