From 853ec5079f7267c6be8baebdf74a2d50e963a074 Mon Sep 17 00:00:00 2001 From: teamclouday Date: Sat, 9 Oct 2021 20:41:14 -0400 Subject: [PATCH] fix hemisphere sampling bug --- Assets/Materials/Ground.mat | 2 +- Assets/Materials/Light.mat | 2 +- .../Materials/CornellBox-Empty-RG-ceiling.mat | 2 +- .../CornellBox-Glossy-Floor-lightMat.mat | 2 +- .../Materials/CornellBox-Glossy-floorMat.mat | 4 +- .../Materials/CornellBox-Glossy-sphereMat.mat | 4 +- .../CornellBox-Original-backWall.mat | 4 +- Assets/Scenes/CornellBox.unity | 386 +++++++++++++++++- Assets/Scenes/CornellBoxBunny.unity | 2 +- Assets/Scenes/Dragon.unity | 156 ++++++- Assets/Shaders/InfoFetch.compute | 2 +- Assets/Shaders/Tracing.compute | 29 +- Assets/Shaders/Tracing/functions.hlsl | 84 ++-- Assets/Shaders/Tracing/global.hlsl | 4 +- Assets/Shaders/Tracing/random.hlsl | 6 +- ProjectSettings/EditorBuildSettings.asset | 4 +- 16 files changed, 608 insertions(+), 85 deletions(-) diff --git a/Assets/Materials/Ground.mat b/Assets/Materials/Ground.mat index 32d8b95..4eb2e09 100644 --- a/Assets/Materials/Ground.mat +++ b/Assets/Materials/Ground.mat @@ -73,6 +73,6 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.6650944, g: 1, b: 0.9735476, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Materials/Light.mat b/Assets/Materials/Light.mat index 93dc5cb..e96ce98 100644 --- a/Assets/Materials/Light.mat +++ b/Assets/Materials/Light.mat @@ -74,5 +74,5 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 47.937256, g: 47.937256, b: 47.937256, a: 1} + - _EmissionColor: {r: 2.9960785, g: 2.9960785, b: 2.9960785, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Models/CornellBox/Materials/CornellBox-Empty-RG-ceiling.mat b/Assets/Models/CornellBox/Materials/CornellBox-Empty-RG-ceiling.mat index 4d39860..8b68470 100644 --- a/Assets/Models/CornellBox/Materials/CornellBox-Empty-RG-ceiling.mat +++ b/Assets/Models/CornellBox/Materials/CornellBox-Empty-RG-ceiling.mat @@ -74,5 +74,5 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 0.8676988, g: 0.8596959, b: 0.84338915, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 2, g: 2, b: 2, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-Floor-lightMat.mat b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-Floor-lightMat.mat index f8fc1ff..a342dfd 100644 --- a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-Floor-lightMat.mat +++ b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-Floor-lightMat.mat @@ -74,5 +74,5 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1} - - _EmissionColor: {r: 5.929412, g: 5.992157, b: 4.5803924, a: 1} + - _EmissionColor: {r: 23.717648, g: 23.968628, b: 18.32157, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-floorMat.mat b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-floorMat.mat index 1eead77..e2cb4b4 100644 --- a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-floorMat.mat +++ b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-floorMat.mat @@ -61,9 +61,9 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - - _Glossiness: 0.921 + - _Glossiness: 0 - _GlossyReflections: 1 - - _Metallic: 0.675 + - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 diff --git a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-sphereMat.mat b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-sphereMat.mat index 5c989c3..159cf13 100644 --- a/Assets/Models/CornellBox/Materials/CornellBox-Glossy-sphereMat.mat +++ b/Assets/Models/CornellBox/Materials/CornellBox-Glossy-sphereMat.mat @@ -62,9 +62,9 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 10 - _GlossMapScale: 1 - - _Glossiness: 0.625 + - _Glossiness: 0.724 - _GlossyReflections: 1 - - _Metallic: 0.28 + - _Metallic: 0.049 - _Mode: 3 - _OcclusionStrength: 1 - _Parallax: 0.02 diff --git a/Assets/Models/CornellBox/Materials/CornellBox-Original-backWall.mat b/Assets/Models/CornellBox/Materials/CornellBox-Original-backWall.mat index b83eb37..64b1efd 100644 --- a/Assets/Models/CornellBox/Materials/CornellBox-Original-backWall.mat +++ b/Assets/Models/CornellBox/Materials/CornellBox-Original-backWall.mat @@ -61,9 +61,9 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - - _Glossiness: 1 + - _Glossiness: 0 - _GlossyReflections: 1 - - _Metallic: 1 + - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 diff --git a/Assets/Scenes/CornellBox.unity b/Assets/Scenes/CornellBox.unity index 9b09744..339b274 100644 --- a/Assets/Scenes/CornellBox.unity +++ b/Assets/Scenes/CornellBox.unity @@ -314,6 +314,50 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 528183295} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &643007223 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 643007224} + - component: {fileID: 643007225} + m_Layer: 0 + m_Name: Light2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &643007224 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643007223} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.5, y: 2, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 2136735633} + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &643007225 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643007223} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &705507993 GameObject: m_ObjectHideFlags: 0 @@ -405,8 +449,189 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1001 &846700567 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalScale.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalScale.y + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalScale.z + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalPosition.x + value: 10.75 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + propertyPath: m_Name + value: CornellBox-Empty-RG + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} +--- !u!1 &846700568 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 7484c4668e00f8d49b168748da772d4b, type: 3} + m_PrefabInstance: {fileID: 846700567} + m_PrefabAsset: {fileID: 0} +--- !u!114 &846700569 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 846700568} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &854487422 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 854487423} + - component: {fileID: 854487426} + - component: {fileID: 854487425} + - component: {fileID: 854487424} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &854487423 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854487422} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 9, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1441959331} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!135 &854487424 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854487422} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &854487425 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854487422} + 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: 5b124796ca2c7634794f3c1cb3579d66, 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 &854487426 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854487422} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &916774409 GameObject: m_ObjectHideFlags: 0 @@ -437,7 +662,7 @@ Transform: m_Children: - {fileID: 528183296} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &916774411 MonoBehaviour: @@ -550,7 +775,7 @@ MonoBehaviour: m_EditorClassIdentifier: RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3} InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3} - SkyboxTexture: {fileID: 8900000, guid: e8791888d6d354b48a57b55226d8d69d, type: 2} + SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2} DirectionalLight: {fileID: 705507994} TraceDepth: 5 CameraFocalDistance: 1 @@ -602,7 +827,7 @@ Transform: m_Children: - {fileID: 60095219} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!114 &1300379387 MonoBehaviour: @@ -625,7 +850,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -8679921383154817045, guid: be072ae47cbc34844a127d11c946445e, type: 3} propertyPath: m_RootOrder - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: be072ae47cbc34844a127d11c946445e, type: 3} propertyPath: m_LocalScale.x @@ -681,7 +906,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -5543500264016486146, guid: be072ae47cbc34844a127d11c946445e, type: 3} propertyPath: m_LocalPosition.y - value: -0.05 + value: -0.01 objectReference: {fileID: 0} - target: {fileID: -1104015795908768202, guid: be072ae47cbc34844a127d11c946445e, type: 3} propertyPath: m_LocalPosition.x @@ -722,6 +947,50 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1441959330 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1441959331} + - component: {fileID: 1441959332} + m_Layer: 0 + m_Name: Light3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1441959331 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1441959330} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 854487423} + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1441959332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1441959330} + 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 @@ -747,12 +1016,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1448981423} m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -4.75, y: 3.9, z: 0} + m_LocalPosition: {x: 0, y: 3.95, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1781954605} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!114 &1448981425 MonoBehaviour: @@ -775,7 +1044,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -8679921383154817045, guid: 7b4102c4db4449642b864ee6063b6e9e, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 7b4102c4db4449642b864ee6063b6e9e, type: 3} propertyPath: m_LocalScale.x @@ -799,7 +1068,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 7b4102c4db4449642b864ee6063b6e9e, type: 3} propertyPath: m_LocalPosition.z - value: 10 + value: 7.25 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 7b4102c4db4449642b864ee6063b6e9e, type: 3} propertyPath: m_LocalRotation.w @@ -887,7 +1156,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1781954604} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0.9999999} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1448981424} @@ -956,3 +1225,98 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1781954604} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2136735632 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2136735633} + - component: {fileID: 2136735636} + - component: {fileID: 2136735635} + - component: {fileID: 2136735634} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2136735633 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136735632} + 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: 643007224} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &2136735634 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136735632} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2136735635 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136735632} + 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: 5b124796ca2c7634794f3c1cb3579d66, 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 &2136735636 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136735632} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/Scenes/CornellBoxBunny.unity b/Assets/Scenes/CornellBoxBunny.unity index 4291660..002014c 100644 --- a/Assets/Scenes/CornellBoxBunny.unity +++ b/Assets/Scenes/CornellBoxBunny.unity @@ -222,7 +222,7 @@ MonoBehaviour: m_EditorClassIdentifier: RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3} InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3} - SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2} + SkyboxTexture: {fileID: 8900000, guid: b5048f0d8dca2ee41aaf9a2aecf4fa94, type: 2} DirectionalLight: {fileID: 2071816706} TraceDepth: 5 CameraFocalDistance: 1 diff --git a/Assets/Scenes/Dragon.unity b/Assets/Scenes/Dragon.unity index 6d7ef53..b18ff7a 100644 --- a/Assets/Scenes/Dragon.unity +++ b/Assets/Scenes/Dragon.unity @@ -244,8 +244,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 752883393} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2.5, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 15, z: 0} + m_LocalScale: {x: 20, y: 1, z: 20} m_Children: - {fileID: 2040251023} m_Father: {fileID: 0} @@ -381,8 +381,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1076829547} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.75, y: 2.5, z: -2.5} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 7.5, y: 3, z: -2.5} + m_LocalScale: {x: 2, y: 2, z: 2} m_Children: - {fileID: 1272257389} m_Father: {fileID: 0} @@ -395,7 +395,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1076829547} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} m_Name: @@ -495,6 +495,102 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1272257388} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1406350921 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1406350922} + - component: {fileID: 1406350925} + - component: {fileID: 1406350924} + - component: {fileID: 1406350923} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1406350922 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1406350921} + 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: 1785956031} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!136 &1406350923 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1406350921} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1406350924 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1406350921} + 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: 5b124796ca2c7634794f3c1cb3579d66, 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 &1406350925 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1406350921} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &1434804150 PrefabInstance: m_ObjectHideFlags: 0 @@ -581,6 +677,50 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1785956030 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1785956031} + - component: {fileID: 1785956032} + m_Layer: 0 + m_Name: Light3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1785956031 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1785956030} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 4.25, z: 9.25} + m_LocalScale: {x: 2, y: 5, z: 5} + m_Children: + - {fileID: 1406350922} + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!114 &1785956032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1785956030} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c62dccd56703b4e478d7ad78b4b896e6, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1789977200 GameObject: m_ObjectHideFlags: 0 @@ -783,7 +923,7 @@ MonoBehaviour: m_EditorClassIdentifier: RayTracingShader: {fileID: 7200000, guid: 665d1ef5183a88c43ad98a3cf93e0ddd, type: 3} InfoShader: {fileID: 7200000, guid: b9568c70d14d4ae49a257b1843b38f9a, type: 3} - SkyboxTexture: {fileID: 8900000, guid: 992e1cc8f302dad45a03219eca9b2f59, type: 2} + SkyboxTexture: {fileID: 8900000, guid: 4dbc9c26cab64a242b32e55a02f630c8, type: 2} DirectionalLight: {fileID: 776780038} TraceDepth: 5 CameraFocalDistance: 1 @@ -817,7 +957,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2037067562} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.5, z: 1.25} + m_LocalPosition: {x: 0, y: -0.5, z: 2.25} m_LocalScale: {x: 4, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1789977201} @@ -912,7 +1052,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2040251022} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.5, y: 0, z: 7.5} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 752883394} diff --git a/Assets/Shaders/InfoFetch.compute b/Assets/Shaders/InfoFetch.compute index 4fef3a5..6513b80 100644 --- a/Assets/Shaders/InfoFetch.compute +++ b/Assets/Shaders/InfoFetch.compute @@ -54,7 +54,7 @@ void CSMain(uint3 id : SV_DispatchThreadID) // create camera Camera camera = CreateCamera(); // save pixel center - float2 center = float2(id.xy) + camera.offset; + float2 center = float2(id.xy); PixelCenter = 2.0 * center / float2(width, height) - 1.0; // init random seed rng_initialize(center, _FrameCount); diff --git a/Assets/Shaders/Tracing.compute b/Assets/Shaders/Tracing.compute index 6567acb..1c3f313 100644 --- a/Assets/Shaders/Tracing.compute +++ b/Assets/Shaders/Tracing.compute @@ -43,10 +43,10 @@ float3 Shade(inout Ray ray, HitInfo hit) if (hit.dist < 1.#INF) { //return hit.norm * 0.5 + 0.5; // debug normal - - // check whether if is light - if (dot(hit.colors.emission, 0.3) > 0.9) + if (dot(hit.colors.emission, 0.3333333) > 0.9) { + //ray.dir = normalize(SampleHemisphere3(hit.norm, 0.0)); + //ray.energy *= saturate(dot(hit.norm, ray.dir)); ray.energy = 0.0; return hit.colors.emission; } @@ -69,20 +69,18 @@ float3 Shade(inout Ray ray, HitInfo hit) ray.dir = normalize(SampleHemisphere3(refract(ray.dir, hit.norm, 1.0 / ior), 100000.0 * kr)); ray.energy *= 1.0 / kr * hit.colors.albedo * saturate(dot(-hit.norm, ray.dir)); } - //ray.dir = normalize(refract(ray.dir, hit.norm, 1.0 / ior)); - //ray.energy *= 2.0 * hit.colors.albedo; return hit.colors.emission; } else { // opaque workflow + float random = rand(); ray.origin = hit.pos + hit.norm * 1e-5; float specChance = dot(hit.colors.specular, 0.333333333333); float diffChance = dot(hit.colors.albedo, 0.33333333333); float sum = 1.0 / (specChance + diffChance); specChance *= sum; diffChance *= sum; - float random = rand(); if (random < specChance) { float alpha = 100000.0 * hit.smoothness; @@ -91,18 +89,12 @@ float3 Shade(inout Ray ray, HitInfo hit) } else { - ray.dir = normalize(SampleHemisphere3(hit.norm, 1.0)); + ray.dir = normalize(SampleHemisphere3(hit.norm, 0.0)); ray.energy *= 1.0 / diffChance * 2.0 * hit.colors.albedo * saturate(dot(hit.norm, ray.dir)); } return hit.colors.emission; } - // shadow ray - //Ray shadowRay = CreateRay(hit.pos, _DirectionalLight.xyz); - //if (TraceHit(shadowRay, 1.#INF)) - //{ - // return hit.emission; - //} - //return hit.colors.emission + saturate(dot(hit.norm, _DirectionalLight.xyz)) * _DirectionalLight.w * hit.colors.albedo; + } else { @@ -122,17 +114,18 @@ void CSMain (uint3 id : SV_DispatchThreadID) // create camera Camera camera = CreateCamera(); // save pixel center - float2 center = float2(id.xy) + camera.offset; - PixelCenter = 2.0 * center / float2(width, height) - 1.0; + float2 center = float2(id.xy); + float2 dims = float2(width, height); + PixelCenter = 2.0 * (center + camera.offset) / dims - 1.0; // init random seed - rng_initialize(center, _FrameCount); + rng_initialize(center + camera.offset * dims, _FrameCount); // generate ray from camera Ray ray = CreateCameraRay(camera, PixelCenter); // trace ray float3 color = 0.0; for (int i = 0; i < _TraceDepth; i++) { - // get best ray hit + // get nearest ray hit HitInfo hit = Trace(ray); // accumulate energy (color) color += ray.energy * Shade(ray, hit); diff --git a/Assets/Shaders/Tracing/functions.hlsl b/Assets/Shaders/Tracing/functions.hlsl index e6294b4..f0b1f6a 100644 --- a/Assets/Shaders/Tracing/functions.hlsl +++ b/Assets/Shaders/Tracing/functions.hlsl @@ -85,57 +85,83 @@ bool CullFace(float3 norm, float3 eye, float3 pos) return dot(norm, (eye - pos)) < 0.0; } +// reference: http://extremelearning.com.au/how-to-generate-uniformly-random-points-on-n-spheres-and-n-balls/ +float3 SampleSphere1() +{ + float2 rand = rand2(); + float u = 2.0 * rand.x - 1.0; + float phi = rand.y * PI_TWO; + float r = sqrt(1.0 - u * u); + return float3(r * cos(phi), r * sin(phi), u); +} + +float3 SampleSphere2() +{ + return rand3() * 2.0 - 1.0; +} + // create new sample direction in a hemisphere float3 SampleHemisphere1(float3 norm, float alpha = 0.0) { float2 rand = rand2(); float cosTheta = pow(rand.x, 1.0 / (1.0 + alpha)); - float sinTheta = sqrt(max(0.0, 1.0 - cosTheta * cosTheta)); + float sinTheta = saturate(sqrt(1.0 - cosTheta * cosTheta)); float phi = PI_TWO * rand.y; - float3 tangentSpaceDir = float3(cos(phi) * sinTheta, sin(phi) * sinTheta, cosTheta); + float3 dir = float3(cos(phi) * sinTheta, sin(phi) * sinTheta, cosTheta); // from tangent space to world space - float3 helper = abs(norm.x) > 0.999 ? float3(0, 0, 1) : float3(1, 0, 0); - float3 tangent = normalize(cross(helper, norm)); - float3 binormal = cross(norm, tangent); + float3 helper = abs(norm.x) < 0.99 ? float3(1, 0, 0) : float3(0, 0, 1); + float3 tangent = normalize(cross(norm, helper)); + float3 binormal = normalize(cross(norm, tangent)); // get new direction - return mul(tangentSpaceDir, float3x3(tangent, binormal, norm)); + return mul(dir, float3x3(tangent, binormal, norm)); } -// reference: https://github.com/LWJGL/lwjgl3-demos/blob/main/res/org/lwjgl/demo/opengl/raytracing/randomCommon.glsl float3 SampleHemisphere2(float3 norm) { - float angle = rand() * PI_TWO; - float u = rand() * 2.0 - 1.0; - float sqrtMinusU2 = sqrt(1.0 - u * u); - float3 v = float3(sqrtMinusU2 * cos(angle), sqrtMinusU2 * sin(angle), u); - return v * sign(dot(v, norm)); + float2 random = rand2(); + float phi = random.x * PI_TWO; + float r = sqrt(1.0 - random.y * random.y); + float3 v = float3(r * cos(phi), r * sin(phi), random.y); + float3 helper = abs(norm.z) < 0.99 ? float3(0, 0, 1) : float3(1, 0, 0); + float3 T = normalize(cross(helper, norm)); + float3 B = cross(T, norm); + return mul(v, float3x3(T, B, norm)); +} + +// reference: https://github.com/LWJGL/lwjgl3-demos/blob/main/res/org/lwjgl/demo/opengl/raytracing/randomCommon.glsl +float3 SampleDiskPoint(float3 norm) +{ + float3 rand = rand3(); + rand.z = rand.z * 2.0 - 1.0; + float angle = rand.x * PI_TWO; + float sr = sqrt(rand.y); + float2 p = float2(sr * cos(angle), sr * sin(angle)); + float3 tangent = normalize(rand); + float3 bitangent = cross(tangent, norm); + tangent = cross(bitangent, norm); + return tangent * p.x + bitangent * p.y; } float3 SampleHemisphere3(float3 norm, float alpha = 0.0) { - float3 randomVec = rand3(); - float r = pow(randomVec.x, 1.0 / (1.0 + alpha)); - float angle = randomVec.y * PI_TWO; + float2 rand = rand2(); + float r = saturate(pow(rand.x, 1.0 / (1.0 + alpha))); + float angle = rand.y * PI_TWO; float sr = saturate(sqrt(1.0 - r * r)); float3 ph = float3(sr * cos(angle), sr * sin(angle), r); - float3 tangent = normalize(randomVec * 2.0 - 1.0); - float3 bitangent = normalize(cross(tangent, norm)); - tangent = normalize(cross(bitangent, norm)); + float3 tangent = normalize(SampleSphere2()); + float3 bitangent = cross(norm, tangent); + tangent = cross(norm, bitangent); return mul(ph, float3x3(tangent, bitangent, norm)); } -float3 SampleHemisphere4(float3 norm, float alpha = 1.0) +float3 SampleHemisphere4(float3 norm) { - alpha = 1.0 - alpha; // convert from smoothness to roughness - float3 randomVec = rand3(); - float r = sqrt((1.0 - randomVec.x) / (1.0 + (alpha * alpha - 1.0) * randomVec.x)); - float angle = randomVec.y * PI_TWO; - float sr = saturate(sqrt(1.0 - r * r)); - float3 ph = float3(sr * cos(angle), sr * sin(angle), r); - float3 tangent = normalize(randomVec * 2.0 - 1.0); - float3 bitangent = normalize(cross(tangent, norm)); - tangent = normalize(cross(bitangent, norm)); - return mul(ph, float3x3(tangent, bitangent, norm)); + float2 rand = rand2(); + float theta = rand.x * PI_TWO; + float phi = acos(1.0 - 2.0 * rand.y); + float3 v = float3(sin(phi) * cos(theta), sin(phi) * sin(theta), cos(phi)); + return v * sign(dot(v, norm)); } // reference: https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading/reflection-refraction-fresnel diff --git a/Assets/Shaders/Tracing/global.hlsl b/Assets/Shaders/Tracing/global.hlsl index be2b44e..f78ce43 100644 --- a/Assets/Shaders/Tracing/global.hlsl +++ b/Assets/Shaders/Tracing/global.hlsl @@ -81,6 +81,6 @@ float2 PixelCenter; uint4 RandomSeed; // define PI value -const float PI = 3.14159265358979323846; -const float PI_TWO = 6.283185307179586; +const float PI = 3.14159265358979323846; +const float PI_TWO = 6.28318530717958623198; #endif \ No newline at end of file diff --git a/Assets/Shaders/Tracing/random.hlsl b/Assets/Shaders/Tracing/random.hlsl index a0eb060..f471087 100644 --- a/Assets/Shaders/Tracing/random.hlsl +++ b/Assets/Shaders/Tracing/random.hlsl @@ -5,9 +5,9 @@ //float rand() //{ -// float res = frac(sin(dot(PixelCenter * _Seed, float2(12.9898, 78.233))) * 43758.5453); +// float res = frac(sin(dot(_PixelOffset + PixelCenter, float2(12.9898, 78.233))) * 43758.5453); // //_Seed += frac(sin(dot(res * _Seed, float2(12.9898, 78.233))) * 43758.5453); -// _Seed += res; +// _PixelOffset += res; // return res; //} @@ -15,7 +15,7 @@ void rng_initialize(float2 p, int frame) { //white noise seed - RandomSeed = uint4(p, uint(frame), uint(p.x) + uint(p.y)); + RandomSeed = uint4(p, frame, p.x + p.y); //blue noise seed //s1 = uvec4(frame, frame * 15843, frame * 31 + 4566, frame * 2345 + 58585); diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 2455105..8c6f9d2 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -6,6 +6,6 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/Scenes/CornellBoxBuddha.unity - guid: 032717fa23b2c394091d4edb141aea54 + path: Assets/Scenes/CornellBoxBunny.unity + guid: d85223d2902273b4db7ab723a1414afd m_configObjects: {}