-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,284 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!21 &2100000 | ||
Material: | ||
serializedVersion: 8 | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: SPR-Texture | ||
m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0} | ||
m_Parent: {fileID: 0} | ||
m_ModifiedSerializedProperties: 0 | ||
m_ValidKeywords: [] | ||
m_InvalidKeywords: [] | ||
m_LightmapFlags: 4 | ||
m_EnableInstancingVariants: 0 | ||
m_DoubleSidedGI: 0 | ||
m_CustomRenderQueue: -1 | ||
stringTagMap: {} | ||
disabledShaderPasses: [] | ||
m_LockedProperties: | ||
m_SavedProperties: | ||
serializedVersion: 3 | ||
m_TexEnvs: | ||
- _BumpMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DecalTex: | ||
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: 10912, guid: 0000000000000000f000000000000000, type: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MetallicGlossMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _OcclusionMap: | ||
m_Texture: {fileID: 0} | ||
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: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
m_Ints: [] | ||
m_Floats: | ||
- _BumpScale: 1 | ||
- _Cutoff: 0.198 | ||
- _DetailNormalMapScale: 1 | ||
- _DstBlend: 0 | ||
- _GlossMapScale: 1 | ||
- _Glossiness: 0.5 | ||
- _GlossyReflections: 1 | ||
- _Metallic: 0 | ||
- _Mode: 0 | ||
- _OcclusionStrength: 1 | ||
- _Parallax: 0.02 | ||
- _SmoothnessTextureChannel: 0 | ||
- _SpecularHighlights: 1 | ||
- _SrcBlend: 1 | ||
- _UVSec: 0 | ||
- _ZWrite: 1 | ||
m_Colors: | ||
- _Color: {r: 1, g: 1, b: 1, a: 1} | ||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | ||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | ||
m_BuildTextureStacks: [] |
4 changes: 2 additions & 2 deletions
4
...ts/Settings/SampleSceneProfile.asset.meta → ...dev/Assets/Materials/SPR-Texture.mat.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!21 &2100000 | ||
Material: | ||
serializedVersion: 8 | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: SPR-Unlit | ||
m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} | ||
m_Parent: {fileID: 0} | ||
m_ModifiedSerializedProperties: 0 | ||
m_ValidKeywords: [] | ||
m_InvalidKeywords: [] | ||
m_LightmapFlags: 4 | ||
m_EnableInstancingVariants: 0 | ||
m_DoubleSidedGI: 0 | ||
m_CustomRenderQueue: -1 | ||
stringTagMap: {} | ||
disabledShaderPasses: [] | ||
m_LockedProperties: | ||
m_SavedProperties: | ||
serializedVersion: 3 | ||
m_TexEnvs: | ||
- _BumpMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _DecalTex: | ||
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: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _MetallicGlossMap: | ||
m_Texture: {fileID: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
- _OcclusionMap: | ||
m_Texture: {fileID: 0} | ||
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: 0} | ||
m_Scale: {x: 1, y: 1} | ||
m_Offset: {x: 0, y: 0} | ||
m_Ints: [] | ||
m_Floats: | ||
- _BumpScale: 1 | ||
- _Cutoff: 0.5 | ||
- _DetailNormalMapScale: 1 | ||
- _DstBlend: 0 | ||
- _GlossMapScale: 1 | ||
- _Glossiness: 0.5 | ||
- _GlossyReflections: 1 | ||
- _Metallic: 0 | ||
- _Mode: 0 | ||
- _OcclusionStrength: 1 | ||
- _Parallax: 0.02 | ||
- _SmoothnessTextureChannel: 0 | ||
- _SpecularHighlights: 1 | ||
- _SrcBlend: 1 | ||
- _UVSec: 0 | ||
- _ZWrite: 1 | ||
m_Colors: | ||
- _Color: {r: 1, g: 0.25943398, b: 0.25943398, a: 1} | ||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | ||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | ||
m_BuildTextureStacks: [] |
4 changes: 2 additions & 2 deletions
4
...sets/Settings/URP-HighFidelity.asset.meta → ...r-dev/Assets/Materials/SPR-Unlit.mat.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...s/Settings/URP Global Settings.asset.meta → render-dev/Assets/Non-Photorealistic RP.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
render-dev/Assets/Non-Photorealistic RP/Runtime/CameraRenderer.Editor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.Profiling; | ||
using UnityEngine.Rendering; | ||
|
||
namespace Non_Photorealistic_RP.Runtime | ||
{ | ||
/// <summary> | ||
/// All the render instructions will be sent here, and it will render every camera | ||
/// </summary> | ||
public partial class CameraRenderer | ||
{ | ||
partial void DrawGizmos(); | ||
partial void DrawUnsupportedShaders(); | ||
partial void PrepareForSceneWindow(); | ||
partial void PrepareBuffer(); | ||
|
||
#if UNITY_EDITOR | ||
|
||
private string SampleName { get; set; } | ||
|
||
private static readonly ShaderTagId[] LegacyShaderTagIds = | ||
{ | ||
new("Always"), | ||
new("ForwardBase"), | ||
new("PrepassBase"), | ||
new("Vertex"), | ||
new("VertexLMRGBM"), | ||
new("VertexLM") | ||
}; | ||
|
||
private static Material _errorMaterial; | ||
|
||
partial void DrawGizmos() | ||
{ | ||
if (!Handles.ShouldRenderGizmos()) return; | ||
_context.DrawGizmos(_camera, GizmoSubset.PreImageEffects); | ||
_context.DrawGizmos(_camera, GizmoSubset.PostImageEffects); | ||
} | ||
|
||
partial void DrawUnsupportedShaders() | ||
{ | ||
if (_errorMaterial == null) | ||
_errorMaterial = | ||
new Material(Shader.Find("Hidden/InternalErrorShader")); | ||
|
||
var drawingSettings = new DrawingSettings(LegacyShaderTagIds[0], new SortingSettings(_camera)) | ||
{ | ||
overrideMaterial = _errorMaterial | ||
}; | ||
|
||
for (var i = 1; i < LegacyShaderTagIds.Length; i++) | ||
drawingSettings.SetShaderPassName(i, LegacyShaderTagIds[i]); | ||
|
||
var filteringSettings = FilteringSettings.defaultValue; | ||
_context.DrawRenderers(_cullingResults, ref drawingSettings, ref filteringSettings); | ||
} | ||
|
||
partial void PrepareForSceneWindow() | ||
{ | ||
if (_camera.cameraType == CameraType.SceneView) | ||
ScriptableRenderContext.EmitWorldGeometryForSceneView(_camera); | ||
} | ||
|
||
partial void PrepareBuffer() | ||
{ | ||
Profiler.BeginSample("Editor Only"); | ||
_buffer.name = SampleName = _camera.name; | ||
Profiler.EndSample(); | ||
} | ||
|
||
#else | ||
const string SampleName => BufferName; | ||
|
||
#endif | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
render-dev/Assets/Non-Photorealistic RP/Runtime/CameraRenderer.Editor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.