Skip to content

Commit

Permalink
support directional light (sun light)
Browse files Browse the repository at this point in the history
  • Loading branch information
teamclouday committed Dec 27, 2021
1 parent 2fbe4a0 commit 1fcbec0
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 514 deletions.
4 changes: 2 additions & 2 deletions Assets/Materials/Box2.mat
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Material:
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.144
- _Glossiness: 1
- _GlossyReflections: 1
- _Metallic: 0.148
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
Expand Down
2 changes: 1 addition & 1 deletion Assets/Materials/Light.mat
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ Material:
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0.7490196, g: 0.7490196, b: 0.7490196, a: 1}
- _EmissionColor: {r: 5.992157, g: 5.7411766, b: 4.737255, a: 1}
m_BuildTextureStacks: []
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: CornellBox-Original-shortBox
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
Expand Down Expand Up @@ -59,20 +60,20 @@ Material:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _Color: {r: 0.725, g: 0.71, b: 0.68, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
4 changes: 2 additions & 2 deletions Assets/Models/sponza/Materials/sponza-ceiling.mat
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: sponza-ceiling
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 2
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
Expand Down
4 changes: 2 additions & 2 deletions Assets/Models/teapot/Materials/teapot-default.mat
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Material:
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.487
- _Glossiness: 0.848
- _GlossyReflections: 1
- _Metallic: 0.116
- _Metallic: 0.525
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scenes/Bunny.unity
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Light:
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 0
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
Expand Down Expand Up @@ -382,7 +382,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 855875881}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: -37.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 563345313}
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scenes/Chrismas.unity
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ MonoBehaviour:
RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3}
InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3}
DirectionalLight: {fileID: 523176987}
SkyboxTexture: {fileID: 8900000, guid: 992e1cc8f302dad45a03219eca9b2f59, type: 2}
SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2}
SkyboxIntensity: 1
TraceDepth: 5
CameraFocalDistance: 1
Expand Down Expand Up @@ -513,7 +513,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1594488316}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 18.5, z: 0}
m_LocalPosition: {x: 0, y: -17.9, z: 0}
m_LocalScale: {x: 20, y: 1, z: 20}
m_Children: []
m_Father: {fileID: 307151176}
Expand Down
146 changes: 3 additions & 143 deletions Assets/Scenes/CornellBox.unity
Original file line number Diff line number Diff line change
Expand Up @@ -123,102 +123,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &60095218
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 60095219}
- component: {fileID: 60095222}
- component: {fileID: 60095221}
- component: {fileID: 60095220}
m_Layer: 0
m_Name: Quad
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &60095219
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 60095218}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1300379386}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!64 &60095220
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 60095218}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &60095221
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 60095218}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 2c1f8c6347b59f5458d2c1e42c7dc2cd, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &60095222
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 60095218}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &705507993
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -391,7 +295,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2, z: -10}
m_LocalPosition: {x: 0, y: 2, z: -6}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
Expand All @@ -412,7 +316,7 @@ MonoBehaviour:
RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3}
InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3}
DirectionalLight: {fileID: 705507994}
SkyboxTexture: {fileID: 8900000, guid: 992e1cc8f302dad45a03219eca9b2f59, type: 2}
SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2}
SkyboxIntensity: 1
TraceDepth: 5
CameraFocalDistance: 1
Expand All @@ -434,50 +338,6 @@ MonoBehaviour:
scrollSpeed: 0.5
dragSpeed: 0.1
keySpeed: 0.2
--- !u!1 &1300379385
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1300379386}
- component: {fileID: 1300379387}
m_Layer: 0
m_Name: Ground
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1300379386
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1300379385}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: -1.5, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children:
- {fileID: 60095219}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &1300379387
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1300379385}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1448981423
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -508,7 +368,7 @@ Transform:
m_Children:
- {fileID: 1781954605}
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!114 &1448981425
MonoBehaviour:
Expand Down
14 changes: 7 additions & 7 deletions Assets/Scenes/Dragon.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_IndirectSpecularColor: {r: 0.44300318, g: 0.49219626, b: 0.57192606, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -248,7 +248,7 @@ Light:
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 0
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
Expand Down Expand Up @@ -305,13 +305,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776780037}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalRotation: {x: 0.5, y: 0, z: 0, w: 0.8660254}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0}
--- !u!1001 &1434804150
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -345,7 +345,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 6464beefe2d727e4db8c1d2b946a29de, type: 3}
propertyPath: m_LocalPosition.z
value: 0.0000013411045
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 6464beefe2d727e4db8c1d2b946a29de, type: 3}
propertyPath: m_LocalRotation.w
Expand Down Expand Up @@ -601,7 +601,7 @@ MonoBehaviour:
RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3}
InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3}
DirectionalLight: {fileID: 776780038}
SkyboxTexture: {fileID: 8900000, guid: 992e1cc8f302dad45a03219eca9b2f59, type: 2}
SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2}
SkyboxIntensity: 1
TraceDepth: 5
CameraFocalDistance: 1
Expand Down
Loading

0 comments on commit 1fcbec0

Please sign in to comment.