You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify SRP default resource access to new internal GraphicsSettings API
This PR addresses [GFXFOUND-318](https://jira.unity3d.com/browse/GFXFOUND-318)
The PR unifies accessing of RP Default Resources while avoiding breaking API or adding new API surface. It is a necessary step in preparation to future architectural changes.
- Add module-internal `DefaultMaterialType` and `DefaultShaderType`
- Add module-internal `GraphicsSettings.GetDefaultMaterial` and `GraphicsSettings.GetDefaultShader` APIs
- Remove URP's own `Universal.DefaultMaterialType`
- Retrieve `Sprite-Lit-Default.shader` through the default material reference
- Cleanup ScriptableRendererContext, remove all string-based scripting invocations
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Runtime/Data/UniversalRenderPipelineAsset.DefaultResources.cs
+13-22Lines changed: 13 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,16 @@
3
3
4
4
namespaceUnityEngine.Rendering.Universal
5
5
{
6
+
internalenumDefaultMaterialType
7
+
{
8
+
Default,
9
+
Particle,
10
+
Terrain,
11
+
Sprite,
12
+
SpriteMask,
13
+
Decal
14
+
}
15
+
6
16
publicpartialclassUniversalRenderPipelineAsset
7
17
{
8
18
#region Materials
@@ -21,11 +31,11 @@ Material GetMaterial(DefaultMaterialType materialType)
0 commit comments