├── .gitattributes ├── .gitignore ├── .npmignore ├── .yamato ├── RaytracedHardShadow-pack.yml ├── RaytracedHardShadow-promotion.yml ├── RaytracedHardShadow-publish.yml ├── RaytracedHardShadow-test.yml ├── RaytracedHardShadow-updated-dependencies-test.yml └── RaytracedHardShadow.metafile ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── CONTRIBUTING.md ├── CONTRIBUTING.md.meta ├── Documentation~ ├── Building.md ├── index.md └── jp │ └── index.md ├── Editor.meta ├── Editor ├── Scripts.meta ├── Scripts │ ├── EditorCameraManager.cs │ ├── EditorCameraManager.cs.meta │ ├── ExportToImageWindow.cs │ ├── ExportToImageWindow.cs.meta │ ├── ShadowCasterLightEditor.cs │ ├── ShadowCasterLightEditor.cs.meta │ ├── ShadowRaytracerEditor.cs │ └── ShadowRaytracerEditor.cs.meta ├── Unity.RaytracedHardShadow.Editor.asmdef └── Unity.RaytracedHardShadow.Editor.asmdef.meta ├── LICENSE.md ├── LICENSE.md.meta ├── LICENSE_JP.md ├── LICENSE_JP.md.meta ├── Plugin~ ├── Externals │ └── Unity │ │ └── PluginAPI │ │ ├── IUnityEventQueue.h │ │ ├── IUnityGraphics.h │ │ ├── IUnityGraphicsD3D11.h │ │ ├── IUnityGraphicsD3D12.h │ │ ├── IUnityGraphicsMetal.h │ │ ├── IUnityInterface.h │ │ ├── IUnityProfilerCallbacks.h │ │ ├── IUnityRenderingExtensions.h │ │ └── IUnityShaderCompilerAccess.h ├── Test │ ├── MeshGenerator.cpp │ ├── MeshGenerator.h │ ├── Test.cpp │ ├── Test.h │ ├── Test.vcxproj │ ├── Test.vcxproj.filters │ ├── TestRTHS.cpp │ ├── pch.cpp │ └── pch.h ├── build.bat ├── rths.sln ├── rths.vcxproj ├── rths.vcxproj.filters ├── rths │ ├── DXR │ │ ├── Shaders │ │ │ ├── rthsDeform.hlsl │ │ │ └── rthsShadowDXR.hlsl │ │ ├── rthsDeformerDXR.cpp │ │ ├── rthsDeformerDXR.h │ │ ├── rthsGfxContextDXR.cpp │ │ ├── rthsGfxContextDXR.h │ │ ├── rthsHookDXR.cpp │ │ ├── rthsHookDXR.h │ │ ├── rthsRendererDXR.cpp │ │ ├── rthsResourceTranslatorDXR.cpp │ │ ├── rthsResourceTranslatorDXR.h │ │ ├── rthsTypesDXR.cpp │ │ └── rthsTypesDXR.h │ ├── Foundation │ │ ├── rthsHalf.h │ │ ├── rthsLog.cpp │ │ ├── rthsLog.h │ │ ├── rthsMath.cpp │ │ ├── rthsMath.h │ │ ├── rthsMisc.cpp │ │ ├── rthsMisc.h │ │ └── rthsRefPtr.h │ ├── pch.cpp │ ├── pch.h │ ├── rths.cpp │ ├── rths.h │ ├── rthsRenderer.cpp │ ├── rthsRenderer.h │ ├── rthsSettings.h │ ├── rthsTypes.cpp │ └── rthsTypes.h └── toolchain.bat ├── RaytracedHardShadowHDRP~ ├── Assets │ ├── HDRPDefaultResources.meta │ ├── HDRPDefaultResources │ │ ├── DXR.meta │ │ ├── DXR │ │ │ ├── DXR Settings.asset │ │ │ ├── DXR Settings.asset.meta │ │ │ ├── DefaultSceneRoot.prefab │ │ │ ├── DefaultSceneRoot.prefab.meta │ │ │ ├── Sky and Fog Settings Profile.asset │ │ │ └── Sky and Fog Settings Profile.asset.meta │ │ ├── DefaultSceneRoot.prefab │ │ ├── DefaultSceneRoot.prefab.meta │ │ ├── HDRPDefaultSettings.asset │ │ ├── HDRPDefaultSettings.asset.meta │ │ ├── Sky and Fog Settings Profile.asset │ │ └── Sky and Fog Settings Profile.asset.meta │ ├── Presets.meta │ ├── Presets │ │ ├── AudioCompressedInMemory.preset │ │ ├── AudioCompressedInMemory.preset.meta │ │ ├── AudioStreaming.preset │ │ ├── AudioStreaming.preset.meta │ │ ├── Defaults.meta │ │ ├── Defaults │ │ │ ├── AlbedoTexture_Default.preset │ │ │ ├── AlbedoTexture_Default.preset.meta │ │ │ ├── AudioDecompressOnLoad_Default.preset │ │ │ ├── AudioDecompressOnLoad_Default.preset.meta │ │ │ ├── DirectionalLight_Default.preset │ │ │ ├── DirectionalLight_Default.preset.meta │ │ │ ├── SSSSettings_Default.preset │ │ │ └── SSSSettings_Default.preset.meta │ │ ├── HDRTexture.preset │ │ ├── HDRTexture.preset.meta │ │ ├── NormalTexture.preset │ │ ├── NormalTexture.preset.meta │ │ ├── UtilityTexture.preset │ │ └── UtilityTexture.preset.meta │ ├── Readme.asset │ ├── Readme.asset.meta │ ├── SamplesHDRP │ ├── SamplesHDRP.meta │ ├── Settings.meta │ └── Settings │ │ ├── Foliage.asset │ │ ├── Foliage.asset.meta │ │ ├── HDRenderPipelineAsset.asset │ │ ├── HDRenderPipelineAsset.asset.meta │ │ ├── SampleScenePostProcessingSettings.asset │ │ ├── SampleScenePostProcessingSettings.asset.meta │ │ ├── SampleSceneSkyandFogSettings.asset │ │ ├── SampleSceneSkyandFogSettings.asset.meta │ │ ├── Skin.asset │ │ └── Skin.asset.meta ├── LocalPackages │ └── com.unity.render-pipelines.high-definition-config │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG.md.meta │ │ ├── LICENSE.md │ │ ├── LICENSE.md.meta │ │ ├── Runtime.meta │ │ ├── Runtime │ │ ├── ShaderConfig.cs │ │ ├── ShaderConfig.cs.hlsl │ │ ├── ShaderConfig.cs.hlsl.meta │ │ ├── ShaderConfig.cs.meta │ │ ├── Unity.RenderPipelines.HighDefinition.Config.Runtime.asmdef │ │ └── Unity.RenderPipelines.HighDefinition.Config.Runtime.asmdef.meta │ │ ├── package.json │ │ └── package.json.meta ├── Packages │ ├── com.unity.raytracedhardshadow │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG.md.meta │ │ ├── Editor │ │ ├── Editor.meta │ │ ├── Runtime │ │ ├── Runtime.meta │ │ ├── package.json │ │ └── package.json.meta │ ├── manifest.json │ └── packages-lock.json └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── HDRPProjectSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ └── XRSettings.asset ├── RaytracedHardShadowUniversalRP~ ├── Assets │ ├── Presets.meta │ ├── Presets │ │ ├── AudioCompressedInMemory.preset │ │ ├── AudioCompressedInMemory.preset.meta │ │ ├── AudioStreaming.preset │ │ ├── AudioStreaming.preset.meta │ │ ├── Defaults.meta │ │ ├── Defaults │ │ │ ├── AlbedoTexture_Default.preset │ │ │ ├── AlbedoTexture_Default.preset.meta │ │ │ ├── AudioDecompressOnLoad.preset │ │ │ ├── AudioDecompressOnLoad.preset.meta │ │ │ ├── DirectionalLight_Default.preset │ │ │ └── DirectionalLight_Default.preset.meta │ │ ├── NormalTexture.preset │ │ ├── NormalTexture.preset.meta │ │ ├── UtilityTexture.preset │ │ └── UtilityTexture.preset.meta │ ├── Readme.asset │ ├── Readme.asset.meta │ ├── SamplesUniversalRP │ ├── SamplesUniversalRP.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── SampleScene.unity │ │ └── SampleScene.unity.meta │ ├── Settings.meta │ └── Settings │ │ ├── ForwardRenderer.asset │ │ ├── ForwardRenderer.asset.meta │ │ ├── SampleSceneProfile.asset │ │ ├── SampleSceneProfile.asset.meta │ │ ├── UniversalRP-HighQuality.asset │ │ └── UniversalRP-HighQuality.asset.meta ├── Packages │ ├── com.unity.raytracedhardshadow │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG.md.meta │ │ ├── Editor │ │ ├── Editor.meta │ │ ├── Runtime │ │ ├── Runtime.meta │ │ ├── package.json │ │ └── package.json.meta │ ├── manifest.json │ └── packages-lock.json └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── URPProjectSettings.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ └── XRSettings.asset ├── RaytracedHardShadow~ ├── Assets │ ├── RaytracedHardShadowPackaging.cs │ ├── RaytracedHardShadowPackaging.cs.meta │ ├── Samples │ ├── Samples.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── LightIndex.unity │ │ ├── LightIndex.unity.meta │ │ ├── ShadowBitmask.renderTexture │ │ ├── ShadowBitmask.renderTexture.meta │ │ ├── SkinnedMeshes.unity │ │ ├── SkinnedMeshes.unity.meta │ │ ├── SpotLight.unity │ │ ├── SpotLight.unity.meta │ │ ├── TestLayer.unity │ │ └── TestLayer.unity.meta │ ├── Test.meta │ └── Test │ │ ├── Materials.meta │ │ ├── Materials │ │ ├── VisualizeBitmask.mat │ │ ├── VisualizeBitmask.mat.meta │ │ ├── VisualizeLightIndex.mat │ │ └── VisualizeLightIndex.mat.meta │ │ ├── Models.meta │ │ ├── Models │ │ ├── SkinnedMeshSegmented.fbx │ │ ├── SkinnedMeshSegmented.fbx.meta │ │ ├── Submeshes.mtl │ │ ├── Submeshes.mtl.meta │ │ ├── Submeshes.obj │ │ └── Submeshes.obj.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ ├── DebugCommands.cs │ │ ├── DebugCommands.cs.meta │ │ ├── MoveVertices.cs │ │ ├── MoveVertices.cs.meta │ │ ├── Rotate.cs │ │ └── Rotate.cs.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ ├── VisualizeBitmask.shader │ │ ├── VisualizeBitmask.shader.meta │ │ ├── VisualizeLightIndex.cginc │ │ ├── VisualizeLightIndex.cginc.meta │ │ ├── VisualizeLightIndex.shader │ │ └── VisualizeLightIndex.shader.meta ├── Packages │ ├── com.unity.raytracedhardshadow │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG.md.meta │ │ ├── Documentation~ │ │ ├── Editor │ │ ├── Editor.meta │ │ ├── LICENSE.md │ │ ├── LICENSE.md.meta │ │ ├── Runtime │ │ ├── Runtime.meta │ │ ├── Tests │ │ ├── Tests.meta │ │ ├── package.json │ │ └── package.json.meta │ ├── manifest.json │ └── packages-lock.json └── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ └── XRSettings.asset ├── Readme.md ├── Readme.md.meta ├── Runtime.meta ├── Runtime ├── AssemblyInfo.cs ├── AssemblyInfo.cs.meta ├── Plugins.meta ├── Plugins │ ├── x86_64.meta │ └── x86_64 │ │ ├── rths.dll │ │ └── rths.dll.meta ├── Scripts.meta ├── Scripts │ ├── Blit.shader │ ├── Blit.shader.meta │ ├── ShadowCasterLight.cs │ ├── ShadowCasterLight.cs.meta │ ├── ShadowRaytracer.cs │ ├── ShadowRaytracer.cs.meta │ ├── rthsAPI.cs │ └── rthsAPI.cs.meta ├── Unity.RaytracedHardShadow.asmdef └── Unity.RaytracedHardShadow.asmdef.meta ├── SamplesHDRP~ ├── PrimitiveObjects.meta ├── PrimitiveObjects │ ├── .sampleHDRP.json │ ├── Materials.meta │ ├── Materials │ │ ├── HDRPdefaultMaterial.mat │ │ ├── HDRPdefaultMaterial.mat.meta │ │ ├── VisualizeShadowBuffer.mat │ │ └── VisualizeShadowBuffer.mat.meta │ ├── Models.meta │ ├── Models │ │ ├── exclude.fbx │ │ └── exclude.fbx.meta │ ├── PrimitiveObjectsScene.unity │ ├── PrimitiveObjectsScene.unity.meta │ ├── ShadowBuffer.renderTexture │ └── ShadowBuffer.renderTexture.meta ├── PrimitiveObjectsDXR.meta ├── PrimitiveObjectsDXR │ ├── Materials.meta │ ├── Materials │ │ ├── RaytracingMaterial.mat │ │ └── RaytracingMaterial.mat.meta │ ├── PrimitiveObjectsDXRScene.unity │ └── PrimitiveObjectsDXRScene.unity.meta ├── Shaders.meta └── Shaders │ ├── VisualizeShadowBuffer.shader │ └── VisualizeShadowBuffer.shader.meta ├── SamplesUniversalRP~ ├── PrimitiveObjects.meta └── PrimitiveObjects │ ├── .sampleUniversalRP.json │ ├── Materials.meta │ ├── Materials │ ├── Skybox_Mat.mat │ ├── Skybox_Mat.mat.meta │ ├── UniversalDefaultMat.mat │ ├── UniversalDefaultMat.mat.meta │ ├── VisualizeShadowBuffer.mat │ └── VisualizeShadowBuffer.mat.meta │ ├── Models.meta │ ├── Models │ ├── exclude.fbx │ └── exclude.fbx.meta │ ├── PrimitiveObjectsScene.unity │ ├── PrimitiveObjectsScene.unity.meta │ ├── Shaders.meta │ ├── Shaders │ ├── VisualizeShadowBuffer.shader │ └── VisualizeShadowBuffer.shader.meta │ ├── ShadowBuffer.renderTexture │ └── ShadowBuffer.renderTexture.meta ├── Samples~ ├── PrimitiveObjects.meta └── PrimitiveObjects │ ├── .sample.json │ ├── Materials.meta │ ├── Materials │ ├── VisualizeShadowBuffer.mat │ └── VisualizeShadowBuffer.mat.meta │ ├── Models.meta │ ├── Models │ ├── exclude.fbx │ └── exclude.fbx.meta │ ├── PrimitiveObjectsScene.unity │ ├── PrimitiveObjectsScene.unity.meta │ ├── Shaders.meta │ ├── Shaders │ ├── VisualizeShadowBuffer.shader │ └── VisualizeShadowBuffer.shader.meta │ ├── ShadowBuffer.renderTexture │ └── ShadowBuffer.renderTexture.meta ├── Tests.meta ├── Tests ├── Editor.meta ├── Editor │ ├── PluginTests.cs │ ├── PluginTests.cs.meta │ ├── Unity.RaytracedHardShadow.EditorTests.asmdef │ └── Unity.RaytracedHardShadow.EditorTests.asmdef.meta ├── Runtime.meta └── Runtime │ ├── RTHSAPITest.cs │ ├── RTHSAPITest.cs.meta │ ├── Unity.RaytracedHardShadow.Tests.asmdef │ └── Unity.RaytracedHardShadow.Tests.asmdef.meta ├── package.json └── package.json.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.h text 3 | *.c text 4 | *.hpp text 5 | *.cpp text 6 | *.cs text 7 | 8 | *.bat text eol=crlf 9 | *.sln text eol=crlf 10 | *.vcxproj text eol=crlf 11 | *.vcxproj.filters text eol=crlf 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | 3 | *.aps 4 | *.DS_Store 5 | *.unitypackage 6 | 7 | *.exr 8 | *.gif 9 | *.png 10 | *.mp4 11 | *.h264 12 | *.aac 13 | *.webm 14 | *.ogg 15 | *.flac 16 | *.wav 17 | *.zip 18 | *.mll 19 | *.unitypackage 20 | 21 | .vs/ 22 | _out/ 23 | _tmp/ 24 | _build_*/ 25 | External/ 26 | Library/ 27 | Temp/ 28 | obj/ 29 | TestLocal/ 30 | TestLocal.meta 31 | 32 | # Project/Solution files 33 | RaytracedHardShadow*~/*.csproj 34 | RaytracedHardShadow*~/*.sln 35 | RaytracedHardShadow*~/.idea/** 36 | RaytracedHardShadow*~/Logs/* 37 | RaytracedHardShadow*~/Builds/* 38 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | artifacts/** 2 | build/** 3 | .build_script/** 4 | node_modules/** 5 | Documentation/ApiDocs/** 6 | Documentation~/ApiDocs/** 7 | .DS_Store 8 | .npmrc 9 | .npmignore 10 | .gitignore 11 | CONTRIBUTING.md 12 | CONTRIBUTING.md.meta 13 | QAReport.md 14 | QAReport.md.meta 15 | .gitlab-ci.yml 16 | build.sh 17 | build.sh.meta 18 | build.bat 19 | build.bat.meta 20 | 21 | RaytracedHardShadow~/** 22 | RaytracedHardShadowHDRP~/** 23 | RaytracedHardShadowUniversalRP~/** 24 | SamplesHDRP~/** 25 | SamplesUniversalRP~/** 26 | Plugin~/** 27 | 28 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow-pack.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/RaytracedHardShadow.metafile %} 2 | 3 | --- 4 | pack: 5 | name: Pack {{ yamato_name }} 6 | agent: 7 | type: Unity::VM 8 | image: package-ci/win10:stable 9 | flavor: b1.large 10 | commands: 11 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 12 | - upm-ci package pack 13 | artifacts: 14 | {{ yamato_name }}_pack_artifacts: 15 | paths: 16 | - "upm-ci~/**/*" 17 | 18 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow-promotion.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/RaytracedHardShadow.metafile %} 2 | 3 | --- 4 | {% for editor in test_editors %} 5 | {% for platform in test_platforms %} 6 | promotion_test_{{ platform.name }}_{{ editor.version }}: 7 | name : {{ yamato_name }} Promotion Test {{ editor.version }} on {{ platform.name }} 8 | agent: 9 | type: {{ platform.type }} 10 | image: {{ platform.image }} 11 | flavor: {{ platform.flavor}} 12 | variables: 13 | UPMCI_PROMOTION: 1 14 | commands: 15 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 16 | - upm-ci package test --unity-version {{ editor.version }} 17 | artifacts: 18 | {{ yamato_name }}_promotion_test_artifacts: 19 | paths: 20 | - "upm-ci~/test-results/**/*" 21 | dependencies: 22 | - .yamato/{{ yamato_name }}-pack.yml#pack 23 | {% endfor %} 24 | {% endfor %} 25 | 26 | promote: 27 | name: Promote {{ yamato_name }} to Production 28 | agent: 29 | type: Unity::VM 30 | image: package-ci/win10:stable 31 | flavor: b1.large 32 | variables: 33 | UPMCI_PROMOTION: 1 34 | commands: 35 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 36 | - upm-ci package promote 37 | triggers: 38 | tags: 39 | only: 40 | - /^(r|R)elease-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/ 41 | artifacts: 42 | {{ yamato_name }}_promote_artifacts: 43 | paths: 44 | - "upm-ci~/packages/*.tgz" 45 | dependencies: 46 | - .yamato/{{ yamato_name }}-pack.yml#pack 47 | {% for editor in test_editors %} 48 | {% for platform in test_platforms %} 49 | - .yamato/{{ yamato_name }}-promotion.yml#promotion_test_{{ platform.name }}_{{ editor.version }} 50 | {% endfor %} 51 | {% endfor %} 52 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow-publish.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/RaytracedHardShadow.metafile %} 2 | 3 | --- 4 | publish: 5 | name: Publish {{ yamato_name }} to Internal Registry 6 | agent: 7 | type: Unity::VM 8 | image: package-ci/win10:stable 9 | flavor: b1.large 10 | commands: 11 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 12 | - upm-ci package publish 13 | triggers: 14 | tags: 15 | only: 16 | - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/ 17 | artifacts: 18 | {{ yamato_name }}_publish_artifacts: 19 | paths: 20 | - "upm-ci~/packages/*.tgz" 21 | dependencies: 22 | - .yamato/{{ yamato_name }}-pack.yml#pack 23 | {% for editor in test_editors %} 24 | {% for platform in test_platforms %} 25 | - .yamato/{{ yamato_name }}-test.yml#test_{{ platform.name }}_{{ editor.version }} 26 | {% endfor %} 27 | {% endfor %} 28 | 29 | publish_dry_run: 30 | name: Publish Dry Run {{ yamato_name }} to Internal Registry 31 | agent: 32 | type: Unity::VM 33 | image: package-ci/win10:stable 34 | flavor: b1.large 35 | commands: 36 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 37 | - upm-ci package publish --dry-run 38 | triggers: 39 | tags: 40 | only: 41 | - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/ 42 | artifacts: 43 | {{ yamato_name }}_publish_dry_run_artifacts: 44 | paths: 45 | - "upm-ci~/packages/*.tgz" 46 | dependencies: 47 | - .yamato/{{ yamato_name }}-pack.yml#pack 48 | {% for editor in test_editors %} 49 | {% for platform in test_platforms %} 50 | - .yamato/{{ yamato_name }}-test.yml#test_{{ platform.name }}_{{ editor.version }} 51 | {% endfor %} 52 | {% endfor %} 53 | 54 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow-test.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/RaytracedHardShadow.metafile %} 2 | 3 | --- 4 | 5 | {% for editor in test_editors %} 6 | {% for platform in test_platforms %} 7 | test_{{ platform.name }}_{{ editor.version }}: 8 | name : Test {{ yamato_name }} using {{ editor.version }} on {{ platform.name }} 9 | agent: 10 | type: {{ platform.type }} 11 | image: {{ platform.image }} 12 | flavor: {{ platform.flavor}} 13 | commands: 14 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 15 | - upm-ci package test --unity-version {{ editor.version }} --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.{{yamato_name}},+Unity.{{yamato_name}}.Editor,-Unity.{{yamato_name}}.Tests,-Unity.{{yamato_name}}.EditorTests' 16 | artifacts: 17 | {{ yamato_name }}_test_artifacts: 18 | paths: 19 | - "upm-ci~/test-results/**/*" 20 | dependencies: 21 | - .yamato/{{ yamato_name }}-pack.yml#pack 22 | {% endfor %} 23 | {% endfor %} 24 | 25 | test_trigger: 26 | name: Tests Trigger for {{ yamato_name }} 27 | agent: 28 | type: Unity::VM 29 | image: package-ci/ubuntu:stable 30 | flavor: b1.large 31 | commands: 32 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 33 | - upm-ci package izon -t 34 | triggers: 35 | branches: 36 | only: 37 | - "/.*/" 38 | except: 39 | - "dev" 40 | recurring: 41 | - branch: dev 42 | frequency: daily 43 | rerun: on_new_revision 44 | 45 | dependencies: 46 | - .yamato/{{ yamato_name }}-pack.yml#pack 47 | {% for editor in test_editors %} 48 | {% for platform in test_platforms %} 49 | - .yamato/{{ yamato_name }}-test.yml#test_{{platform.name}}_{{editor.version}} 50 | {% endfor %} 51 | {% endfor %} 52 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow-updated-dependencies-test.yml: -------------------------------------------------------------------------------- 1 | {% metadata_file .yamato/RaytracedHardShadow.metafile %} 2 | 3 | --- 4 | 5 | {% for editor in test_editors %} 6 | {% for platform in test_platforms %} 7 | dependency_{{ platform.name }}_{{ editor.version }}: 8 | name : Dependency Test {{ yamato_name }} using {{ editor.version }} on {{ platform.name }} 9 | agent: 10 | type: {{ platform.type }} 11 | image: {{ platform.image }} 12 | flavor: {{ platform.flavor}} 13 | commands: 14 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 15 | - upm-ci package test -u {{ editor.version }} --type updated-dependencies-tests 16 | artifacts: 17 | {{ yamato_name }}_dependency_artifacts: 18 | paths: 19 | - "upm-ci~/test-results/**/*" 20 | dependencies: 21 | - .yamato/{{ yamato_name }}-pack.yml#pack 22 | {% endfor %} 23 | {% endfor %} 24 | 25 | dependency_test_trigger: 26 | name: Dependency Tests Trigger for {{ yamato_name }} 27 | agent: 28 | type: Unity::VM 29 | image: package-ci/ubuntu:stable 30 | flavor: b1.large 31 | commands: 32 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm 33 | - upm-ci package izon -d 34 | artifacts: 35 | {{ yamato_name }}_dependency_test_trigger_artifacts: 36 | paths: 37 | - "upm-ci~/test-results/**/*" 38 | {{ yamato_name }}_dependency_test_packages: 39 | paths: 40 | - "upm-ci~/packages/**/*" 41 | triggers: 42 | branches: 43 | only: 44 | - "/.*/" 45 | except: 46 | - "dev" 47 | recurring: 48 | - branch: dev 49 | frequency: daily 50 | rerun: on_new_revision 51 | 52 | dependencies: 53 | - .yamato/{{ yamato_name }}-pack.yml#pack 54 | {% for editor in test_editors %} 55 | {% for platform in test_platforms %} 56 | - .yamato/{{ yamato_name }}-updated-dependencies-test.yml#dependency_{{platform.name}}_{{editor.version}} 57 | {% endfor %} 58 | {% endfor %} 59 | -------------------------------------------------------------------------------- /.yamato/RaytracedHardShadow.metafile: -------------------------------------------------------------------------------- 1 | yamato_name: RaytracedHardShadow 2 | 3 | test_editors: 4 | - version: 2019.4 5 | - version: 2020.2 6 | - version: trunk 7 | test_platforms: 8 | - name: win 9 | type: Unity::VM 10 | image: package-ci/win10:stable 11 | flavor: b1.medium 12 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to the RaytracedHardShadow package will be documented in this file. 3 | 4 | ## [0.6.0-preview] - 2021-04-22 5 | 6 | * feat: Make RTHS compatible with HDRP and Universal RP. 7 | * fix: "Preview in Scene View" is always reset 8 | * fix: package warnings 9 | * fix: internal shadow creation 10 | 11 | ## [0.5.2-preview] - 2019-08-07 12 | 13 | - Converting To Package format 14 | 15 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 167c2af0f9aad04479eaea6344c19d49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## If you are interested in contributing, here are some ground rules: 4 | * Talk to us before doing the work -- we love contributions, but we might already be working on the same thing, or we might have different opinions on how it should be implemented. 5 | 6 | ## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement) 7 | By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions. 8 | 9 | ## Once you have a change ready following these ground rules. Simply make a pull request 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ba26fc09651581459a213a25c4cb2ab 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/Building.md: -------------------------------------------------------------------------------- 1 | # How to build and test 2 | 3 | 4 | ## Prerequisite 5 | 6 | - Unity 2019.1 or greater 7 | - git 2.11 or greater 8 | - Visual Studio 2017 or 2019 9 | - Make sure you've installed `Windows SDK 10.0.18362.0` via Visual Studio Installer 10 | 11 | 12 | ## Build and test 13 | 14 | 1. Clone and build native plugin 15 | 2. Open and test sample scene 16 | 17 | 18 | ### 1. Clone and build native plugin 19 | 20 | Open command prompt and input the following commands: 21 | 22 | ``` 23 | git clone --config core.symlinks=true https://github.com/unity3d-jp/RaytracedHardShadow.git 24 | cd RaytracedHardShadow 25 | cd .RaytracedHardShadow\Plugin 26 | .\build.bat 27 | ``` 28 | 29 | 30 | ### 2. Open and test sample scene 31 | 32 | - Open Unity project which is placed at `.RaytracedHardShadow` 33 | - Open `Assets/Scenes/SampleScene` 34 | - Enable `ShadowRaytracer` object in the hierarchy view 35 | - Hit play button (or select "Edit > Play" ) 36 | - Select "Assets > Scenes > TestShadowBuffer" in the project view 37 | - Check conent of Render Texture in the inspector 38 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98ecde0d92a3a6245af58d34fe2bf53f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98b71c0fe048d9e48a79f460e51ee288 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Scripts/EditorCameraManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fa7e2e1c9486d149b50976f5ab9f082 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Scripts/ExportToImageWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using Unity.RaytracedHardShadow; 4 | 5 | namespace Unity.RaytracedHardShadow.Editor 6 | { 7 | internal class ExportToImageWindow : EditorWindow 8 | { 9 | ShadowRaytracer m_raytracer; 10 | static ShadowRaytracer.ImageFormat m_format = ShadowRaytracer.ImageFormat.PNG; // static to keep last selection 11 | string m_path; 12 | 13 | public static void Open(ShadowRaytracer sr) 14 | { 15 | var window = EditorWindow.GetWindow(); 16 | window.titleContent = new GUIContent("Export To Image"); 17 | window.m_raytracer = sr; 18 | window.Show(); 19 | } 20 | 21 | private void OnGUI() 22 | { 23 | if (m_raytracer == null) 24 | { 25 | Close(); 26 | return; 27 | } 28 | 29 | m_format = (ShadowRaytracer.ImageFormat)EditorGUILayout.EnumPopup("Format", m_format); 30 | if (GUILayout.Button("Export")) 31 | { 32 | string ext = ""; 33 | switch(m_format) 34 | { 35 | case ShadowRaytracer.ImageFormat.PNG: ext = "png"; break; 36 | case ShadowRaytracer.ImageFormat.EXR: ext = "exr"; break; 37 | #if UNITY_2018_3_OR_NEWER 38 | case ShadowRaytracer.ImageFormat.TGA: ext = "tga"; break; 39 | #endif 40 | } 41 | 42 | string path = EditorUtility.SaveFilePanel("Path to export", "", m_raytracer.outputTexture.name + "." + ext, ext); 43 | m_raytracer.ExportToImage(path, m_format); 44 | SceneView.RepaintAll(); 45 | Close(); 46 | } 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /Editor/Scripts/ExportToImageWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb4ce5eef21e6024cb33e308931c5ec4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Scripts/ShadowCasterLightEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using Unity.RaytracedHardShadow; 4 | 5 | namespace Unity.RaytracedHardShadow.Editor 6 | { 7 | [CustomEditor(typeof(Unity.RaytracedHardShadow.ShadowCasterLight))] 8 | internal class ShadowCasterLightEditor : UnityEditor.Editor 9 | { 10 | [MenuItem("GameObject/RaytracedHardShadow/Create Shadow Caster Light", false, 10)] 11 | public static void CreateShadowCasterLight(MenuCommand menuCommand) 12 | { 13 | var go = new GameObject(); 14 | go.name = "Shadow Caster Light"; 15 | go.AddComponent(); 16 | Undo.RegisterCreatedObjectUndo(go, "ShadowRaytracer"); 17 | } 18 | 19 | public override void OnInspectorGUI() 20 | { 21 | //DrawDefaultInspector(); 22 | 23 | var t = target as ShadowCasterLight; 24 | var so = serializedObject; 25 | 26 | EditorGUILayout.PropertyField(so.FindProperty("m_lightType")); 27 | EditorGUILayout.Space(); 28 | if (t.lightType == ShadowCasterLightType.Spot || t.lightType == ShadowCasterLightType.Point || t.lightType == ShadowCasterLightType.ReversePoint) 29 | EditorGUILayout.PropertyField(so.FindProperty("m_range")); 30 | if (t.lightType == ShadowCasterLightType.Spot) 31 | EditorGUILayout.PropertyField(so.FindProperty("m_spotAngle")); 32 | so.ApplyModifiedProperties(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Editor/Scripts/ShadowCasterLightEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a42e2daeaf83a184c89aea7fd2361226 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Scripts/ShadowRaytracerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd6a4aa2f491107428ce69a731cf89a3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Unity.RaytracedHardShadow.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.RaytracedHardShadow.Editor", 3 | "references": [ 4 | "GUID:d2f2fdafbf2b25e46bd82c9abb25947d" 5 | ], 6 | "includePlatforms": [ 7 | "Editor" 8 | ], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /Editor/Unity.RaytracedHardShadow.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3516d3a8499ede8438457ee5f8361533 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Raytraced Hard Shadow copyright © 2020 Unity Technologies ApS 2 | 3 | Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). 4 | 5 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. 6 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7d6ec4a8ff60b14da5ed242e58101f2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE_JP.md: -------------------------------------------------------------------------------- 1 | ## Raytraced Hard Shadow 2 | 3 | 本パッケージは Unity に付随するプロジェクトに適用される Unity Companion License に基づいて使用が許諾されています。詳細は、[Unity Companion License の本文](http://www.unity3d.com/jp/legal/licenses/Unity_Companion_License) (英語) をご確認ください。 4 | ​ 5 | 別に明示的な定めがない限り、本ライセンスに基づくソフトウェアは厳密に「現状のまま」で、明示であるか暗黙であるかを問わず、何らの保証もなく提供されます。本利用規約およびその他の利用規約に関する詳細については、ライセンス本文をご確認ください。 6 | 7 | -------------------------------------------------------------------------------- /LICENSE_JP.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 308ba5ef5c6769a46a3c6edffab2c2a9 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Plugin~/Externals/Unity/PluginAPI/IUnityGraphicsD3D11.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "IUnityInterface.h" 3 | 4 | 5 | // Should only be used on the rendering thread unless noted otherwise. 6 | UNITY_DECLARE_INTERFACE(IUnityGraphicsD3D11) 7 | { 8 | ID3D11Device* (UNITY_INTERFACE_API * GetDevice)(); 9 | 10 | ID3D11Resource* (UNITY_INTERFACE_API * TextureFromRenderBuffer)(UnityRenderBuffer buffer); 11 | ID3D11Resource* (UNITY_INTERFACE_API * TextureFromNativeTexture)(UnityTextureID texture); 12 | 13 | ID3D11RenderTargetView* (UNITY_INTERFACE_API * RTVFromRenderBuffer)(UnityRenderBuffer surface); 14 | ID3D11ShaderResourceView* (UNITY_INTERFACE_API * SRVFromNativeTexture)(UnityTextureID texture); 15 | }; 16 | 17 | UNITY_REGISTER_INTERFACE_GUID(0xAAB37EF87A87D748ULL, 0xBF76967F07EFB177ULL, IUnityGraphicsD3D11) 18 | -------------------------------------------------------------------------------- /Plugin~/Test/MeshGenerator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "rths/rths.h" 4 | using namespace rths; 5 | 6 | void GenerateIcoSphereMesh( 7 | std::vector& counts, 8 | std::vector& indices, 9 | std::vector& points, 10 | float radius, 11 | int iteration); 12 | 13 | void GenerateWaveMesh( 14 | std::vector& counts, 15 | std::vector& indices, 16 | std::vector &points, 17 | float size, float height, 18 | const int resolution, 19 | float angle, 20 | bool triangulate = false); 21 | 22 | -------------------------------------------------------------------------------- /Plugin~/Test/Test.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define testExport extern "C" __declspec(dllexport) 5 | #else 6 | #define testExport extern "C" 7 | #endif 8 | using nanosec = uint64_t; 9 | nanosec Now(); 10 | inline float NS2MS(nanosec ns) { return float((double)ns / 1000000.0); } 11 | 12 | void RegisterTestEntryImpl(const char *name, const std::function& body); 13 | void PrintImpl(const char *format, ...); 14 | 15 | 16 | #define Print(...) PrintImpl(__VA_ARGS__) 17 | 18 | #define RegisterTestEntry(Name)\ 19 | struct Register##Name {\ 20 | Register##Name() { RegisterTestEntryImpl(#Name, Name); }\ 21 | } g_Register##Name; 22 | 23 | 24 | #define TestCase(Name) testExport void Name(); RegisterTestEntry(Name); testExport void Name() 25 | #define Expect(Body) if(!(Body)) { Print("%s(%d): failed - " #Body "\n", __FILE__, __LINE__); } 26 | 27 | template 28 | inline void TestScope(const char *name, const Body& body, int num_try = 1) 29 | { 30 | auto begin = Now(); 31 | for (int i = 0; i < num_try; ++i) 32 | body(); 33 | auto end = Now(); 34 | 35 | float elapsed = NS2MS(end - begin); 36 | Print(" %s: %.2fms", name, elapsed / num_try); 37 | if (num_try > 1) { 38 | Print(" (%.2fms in total)", elapsed); 39 | } 40 | Print("\n"); 41 | } 42 | 43 | template bool GetArg(const char *name, T& dst); 44 | -------------------------------------------------------------------------------- /Plugin~/Test/Test.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Plugin~/Test/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugin~/Test/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define NOMINMAX 5 | #include 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | -------------------------------------------------------------------------------- /Plugin~/build.bat: -------------------------------------------------------------------------------- 1 | call toolchain.bat 2 | msbuild rths.vcxproj /t:Build /p:Configuration=Release /p:Platform=x64 /m /nologo 3 | -------------------------------------------------------------------------------- /Plugin~/rths.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.572 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rths", "rths.vcxproj", "{66397903-6FF2-46C6-B51E-B323FD248FAD}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{4412C698-700E-45E6-A927-0569C1E99E53}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{11990C37-1C63-418F-9AB1-74076C470584}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|x64 = Debug|x64 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {66397903-6FF2-46C6-B51E-B323FD248FAD}.Debug|x64.ActiveCfg = Debug|x64 19 | {66397903-6FF2-46C6-B51E-B323FD248FAD}.Debug|x64.Build.0 = Debug|x64 20 | {66397903-6FF2-46C6-B51E-B323FD248FAD}.Release|x64.ActiveCfg = Release|x64 21 | {66397903-6FF2-46C6-B51E-B323FD248FAD}.Release|x64.Build.0 = Release|x64 22 | {11990C37-1C63-418F-9AB1-74076C470584}.Debug|x64.ActiveCfg = Debug|x64 23 | {11990C37-1C63-418F-9AB1-74076C470584}.Debug|x64.Build.0 = Debug|x64 24 | {11990C37-1C63-418F-9AB1-74076C470584}.Release|x64.ActiveCfg = Release|x64 25 | {11990C37-1C63-418F-9AB1-74076C470584}.Release|x64.Build.0 = Release|x64 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | GlobalSection(NestedProjects) = preSolution 31 | {11990C37-1C63-418F-9AB1-74076C470584} = {4412C698-700E-45E6-A927-0569C1E99E53} 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {16A08EA7-4A75-49A1-9C80-17160F8BD906} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /Plugin~/rths/DXR/rthsDeformerDXR.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef _WIN32 3 | namespace rths { 4 | 5 | class DeformerDXR 6 | { 7 | public: 8 | DeformerDXR(ID3D12Device5Ptr device); 9 | ~DeformerDXR(); 10 | bool valid() const; 11 | bool prepare(RenderDataDXR& rd); 12 | bool deform(RenderDataDXR& rd, MeshInstanceDataDXR& inst); 13 | uint64_t flush(RenderDataDXR& rd); 14 | bool reset(); 15 | 16 | private: 17 | void createSRV(D3D12_CPU_DESCRIPTOR_HANDLE dst, ID3D12Resource *res, int num_elements, int stride); 18 | void createUAV(D3D12_CPU_DESCRIPTOR_HANDLE dst, ID3D12Resource *res, int num_elements, int stride); 19 | void createCBV(D3D12_CPU_DESCRIPTOR_HANDLE dst, ID3D12Resource *res, int size); 20 | ID3D12ResourcePtr createBuffer(int size, const D3D12_HEAP_PROPERTIES& heap_props, bool uav = false); 21 | template bool writeBuffer(ID3D12Resource *res, const Body& body); 22 | 23 | ID3D12CommandQueuePtr getComputeQueue(); 24 | ID3D12FencePtr getFence(); 25 | uint64_t incrementFenceValue(); 26 | 27 | private: 28 | ID3D12Device5Ptr m_device; 29 | 30 | ID3D12RootSignaturePtr m_rootsig; 31 | ID3D12PipelineStatePtr m_pipeline_state; 32 | CommandListManagerDXRPtr m_clm_deform; 33 | }; 34 | using DeformerDXRPtr = std::shared_ptr; 35 | 36 | } // namespace rths 37 | #endif // _WIN32 38 | -------------------------------------------------------------------------------- /Plugin~/rths/DXR/rthsHookDXR.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace rths { 4 | 5 | using OnBufferUpdateT = std::function; 6 | using OnBufferReleaseT = std::function; 7 | using OnTextureReleaseT = std::function; 8 | 9 | void SetOnBufferUpdate(const OnBufferUpdateT& v); 10 | void SetOnBufferRelease(const OnBufferReleaseT& v); 11 | void SetOnTextureRelease(const OnTextureReleaseT& v); 12 | void ClearResourceCallbacks(); 13 | 14 | // T: ID3D11DeviceContext, ID3D11Buffer 15 | template 16 | bool InstallHook(T *dst); 17 | 18 | } // namespace rths 19 | -------------------------------------------------------------------------------- /Plugin~/rths/DXR/rthsResourceTranslatorDXR.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef _WIN32 3 | #include "rthsTypesDXR.h" 4 | 5 | namespace rths { 6 | 7 | class IResourceTranslator 8 | { 9 | public: 10 | virtual ~IResourceTranslator() {} 11 | 12 | virtual ID3D12FencePtr getFence(ID3D12Device *dxr_device) = 0; 13 | virtual uint64_t insertSignal() = 0; 14 | 15 | virtual TextureDataDXRPtr createTemporaryTexture(GPUResourcePtr ptr) = 0; 16 | virtual uint64_t syncTexture(TextureDataDXR& tex, uint64_t fence_value_to_wait) = 0; 17 | virtual BufferDataDXRPtr translateBuffer(GPUResourcePtr ptr) = 0; 18 | virtual bool updateBuffer(BufferDataDXR& buf) = 0; 19 | }; 20 | using IResourceTranslatorPtr = std::shared_ptr; 21 | 22 | IResourceTranslatorPtr CreateResourceTranslator(); 23 | 24 | } // namespace rths 25 | #endif 26 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsHalf.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace rths { 6 | 7 | inline float clamp01(float v); 8 | 9 | // note: this half doesn't care about Inf nor NaN. simply round down minor bits of exponent and mantissa. 10 | struct half 11 | { 12 | uint16_t value; 13 | 14 | half() {} 15 | half(const half& v) : value(v.value) {} 16 | 17 | half(float v) 18 | { 19 | uint32_t n = (uint32_t&)v; 20 | uint16_t sign_bit = (n >> 16) & 0x8000; 21 | uint16_t exponent = (std::max((n >> 23) - 127 + 15, 0) & 0x1f) << 10; 22 | uint16_t mantissa = (n >> (23 - 10)) & 0x3ff; 23 | 24 | value = sign_bit | exponent | mantissa; 25 | } 26 | 27 | half& operator=(float v) 28 | { 29 | *this = half(v); 30 | return *this; 31 | } 32 | 33 | operator float() const 34 | { 35 | uint32_t sign_bit = (value & 0x8000) << 16; 36 | uint32_t exponent = ((((value >> 10) & 0x1f) - 15 + 127) & 0xff) << 23; 37 | uint32_t mantissa = (value & 0x3ff) << (23 - 10); 38 | 39 | uint32_t r = sign_bit | exponent | mantissa; 40 | return (float&)r; 41 | } 42 | 43 | static half zero() { return half(0.0f); } 44 | static half one() { return half(1.0f); } 45 | }; 46 | 47 | // 0.0f - 1.0f <-> 0 - 255 48 | struct unorm8 49 | { 50 | static constexpr float C = float(0xff); 51 | static constexpr float R = 1.0f / float(0xff); 52 | 53 | uint8_t value; 54 | 55 | unorm8() {} 56 | unorm8(const unorm8& v) : value(v.value) {} 57 | unorm8(float v) : value(uint8_t(clamp01(v) * C)) {} 58 | 59 | unorm8& operator=(float v) 60 | { 61 | *this = unorm8(v); 62 | return *this; 63 | } 64 | operator float() const { return (float)value * R; } 65 | 66 | static unorm8 zero() { return unorm8(0.0f); } 67 | static unorm8 one() { return unorm8(1.0f); } 68 | }; 69 | 70 | } // namespace rths 71 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsLog.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "rthsLog.h" 3 | 4 | namespace rths { 5 | 6 | static std::mutex g_log_mutex; 7 | static std::string g_error_log; 8 | 9 | std::string GetErrorLog() 10 | { 11 | std::string ret; 12 | { 13 | std::unique_lock lock(g_log_mutex); 14 | ret = g_error_log; 15 | } 16 | return ret; 17 | } 18 | 19 | void SetErrorLog(const char *format, ...) 20 | { 21 | const int MaxBuf = 2048; 22 | char buf[MaxBuf]; 23 | 24 | va_list args; 25 | va_start(args, format); 26 | vsprintf(buf, format, args); 27 | { 28 | std::unique_lock lock(g_log_mutex); 29 | g_error_log = buf; 30 | } 31 | va_end(args); 32 | } 33 | 34 | void SetErrorLog(const std::string& str) 35 | { 36 | std::unique_lock lock(g_log_mutex); 37 | g_error_log = str; 38 | } 39 | 40 | void ClearErrorLog() 41 | { 42 | std::unique_lock lock(g_log_mutex); 43 | g_error_log.clear(); 44 | } 45 | 46 | void DebugPrintImpl(const char *fmt, ...) 47 | { 48 | va_list args; 49 | va_start(args, fmt); 50 | #ifdef _WIN32 51 | char buf[1024]; 52 | vsnprintf(buf, sizeof(buf), fmt, args); 53 | ::OutputDebugStringA(buf); 54 | #else 55 | vprintf(fmt, args); 56 | #endif 57 | va_end(args); 58 | } 59 | 60 | } // namespace rths 61 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsLog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace rths { 4 | 5 | std::string GetErrorLog(); 6 | void SetErrorLog(const char *format, ...); 7 | void SetErrorLog(const std::string& str); 8 | void ClearErrorLog(); 9 | void DebugPrintImpl(const char *fmt, ...); 10 | 11 | #ifdef rthsDebug 12 | #define DebugPrint(...) DebugPrintImpl(__VA_ARGS__) 13 | #else 14 | #define DebugPrint(...) 15 | #endif 16 | 17 | } // namespace rths 18 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsMath.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "rthsMath.h" 3 | 4 | namespace rths { 5 | 6 | 7 | } // namespace rths 8 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsMisc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace rths { 4 | 5 | using nanosec = uint64_t; 6 | nanosec Now(); 7 | inline float NS2MS(nanosec ns) { return float((double)ns / 1000000.0); } 8 | 9 | std::string ToUTF8(const char *src); 10 | std::string ToUTF8(const std::string& src); 11 | std::string ToANSI(const char *src); 12 | std::string ToANSI(const std::string& src); 13 | std::string ToMBS(const wchar_t *src); 14 | std::string ToMBS(const std::wstring& src); 15 | std::wstring ToWCS(const char *src); 16 | std::wstring ToWCS(const std::string& src); 17 | 18 | bool IsDeveloperMode(); 19 | 20 | } // namespace rths 21 | -------------------------------------------------------------------------------- /Plugin~/rths/Foundation/rthsRefPtr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace rths { 4 | 5 | // simplified boost::intrusive_ptr equivalent 6 | template 7 | class ref_ptr 8 | { 9 | public: 10 | ref_ptr() {} 11 | ref_ptr(T *data) { reset(data); } 12 | ref_ptr(T&& data) { swap(data); } 13 | ref_ptr(const ref_ptr& v) { reset(v.m_ptr); } 14 | ref_ptr& operator=(const ref_ptr& v) { reset(v.m_ptr); return *this; } 15 | ~ref_ptr() { reset(); } 16 | void reset(T *data = nullptr) 17 | { 18 | if (m_ptr) 19 | m_ptr->internalRelease(); 20 | m_ptr = data; 21 | if (m_ptr) 22 | m_ptr->internalAddref(); 23 | } 24 | void swap(ref_ptr& v) 25 | { 26 | std::swap(m_ptr, v->m_data); 27 | } 28 | 29 | T& operator*() { return *m_ptr; } 30 | const T& operator*() const { return *m_ptr; } 31 | T* operator->() { return m_ptr; } 32 | const T* operator->() const { return m_ptr; } 33 | operator T*() { return m_ptr; } 34 | operator const T*() const { return m_ptr; } 35 | operator bool() const { return m_ptr; } 36 | bool operator==(const ref_ptr& v) const { return m_ptr == v.m_ptr; } 37 | bool operator!=(const ref_ptr& v) const { return m_ptr != v.m_ptr; } 38 | 39 | private: 40 | T *m_ptr = nullptr; 41 | }; 42 | 43 | template void ExternalRelease(T *self); 44 | 45 | template 46 | class RefCount 47 | { 48 | friend class ref_ptr; 49 | friend void ExternalRelease(T *self); 50 | protected: 51 | RefCount(T *self = nullptr) : m_self(self ? self : (T*)this) {} 52 | 53 | int internalAddref() 54 | { 55 | return ++m_ref_count; 56 | } 57 | 58 | int internalRelease() 59 | { 60 | if (--m_ref_count == 0) { 61 | delete m_self; 62 | } 63 | return m_ref_count; 64 | } 65 | 66 | private: 67 | T *m_self; 68 | std::atomic_int m_ref_count{ 1 }; 69 | }; 70 | 71 | // resource type exposed to plugin user 72 | template 73 | class SharedResource : public RefCount 74 | { 75 | using super = RefCount; 76 | public: 77 | SharedResource(T *self = nullptr) : super(self) {}; 78 | bool operator==(const SharedResource& v) const { return id == v.id; } 79 | bool operator!=(const SharedResource& v) const { return id != v.id; } 80 | bool operator<(const SharedResource& v) const { return id < v.id; } 81 | 82 | protected: 83 | static uint64_t newID() 84 | { 85 | static uint64_t s_id; 86 | return ++s_id; 87 | } 88 | 89 | uint64_t id = newID(); 90 | }; 91 | 92 | } // namespace rths 93 | -------------------------------------------------------------------------------- /Plugin~/rths/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Plugin~/rths/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define _CRT_SECURE_NO_WARNINGS 5 | #define NOMINMAX 6 | #define WIN32_LEAN_AND_MEAN 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #endif // _WIN32 16 | 17 | // Unity PluginAPI 18 | #include "IUnityInterface.h" 19 | #include "IUnityGraphics.h" 20 | #include "IUnityGraphicsD3D11.h" 21 | #include "IUnityGraphicsD3D12.h" 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #define rthsImpl 46 | -------------------------------------------------------------------------------- /Plugin~/rths/rthsSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define rthsVersion "0.7.0" 4 | #define rthsReleaseDate "20190909" 5 | 6 | 7 | #ifdef rthsDebug 8 | // debug layer 9 | #define rthsEnableD3D12DebugLayer 10 | 11 | // GPU based validation 12 | // https://docs.microsoft.com/en-us/windows/desktop/direct3d12/using-d3d12-debug-layer-gpu-based-validation 13 | // note: enabling this can cause problems. in our case, shader resources bound by global root sig become invisible. 14 | //#define rthsEnableD3D12GBV 15 | 16 | //// DREAD (this requires Windows SDK 10.0.18362.0 or newer) 17 | //// https://docs.microsoft.com/en-us/windows/desktop/direct3d12/use-dred 18 | //#define rthsEnableD3D12DREAD 19 | 20 | //#define rthsEnableBufferValidation 21 | //#define rthsEnableRenderTargetValidation 22 | //#define rthsForceSoftwareDevice 23 | #endif // rthsDebug 24 | 25 | #define rthsEnableResourceName 26 | #define rthsEnableTimestamp 27 | #define rthsEnableD3D12StablePowerState 28 | -------------------------------------------------------------------------------- /Plugin~/toolchain.bat: -------------------------------------------------------------------------------- 1 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" /version 15.0 /property installationPath`) do ( 2 | set VSDIR=%%i 3 | ) 4 | call "%VSDIR%\Common7\Tools\VsDevCmd.bat" 5 | cd %~dp0 6 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abc661c586a9116428571bb17ea1a331 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/DXR.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98a437607b843a74a8bce39bc179e2ea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/DXR/DXR Settings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb472ca8cf21f404cb89f4fb616d786d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/DXR/DefaultSceneRoot.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e517fc87a66d5b4e8471c3f90fa4940 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/DXR/Sky and Fog Settings Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e14bb55df9e4f14f8f91b430d2567e8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/DefaultSceneRoot.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9e3ff5a1b8f49c4fa8686e68d2dadae 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/HDRPDefaultSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 582adbd84082fdb4faf7cd4beb1ccd14 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources/Sky and Fog Settings Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2801c2ff7303a7543a8727f862f6c236 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2754f8cebe196654cbc72d1885ebcf0e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/AudioCompressedInMemory.preset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!181963792 &2655988077585873504 4 | Preset: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: AudioCompressedInMemory 9 | m_TargetType: 10 | m_NativeTypeID: 1020 11 | m_ManagedTypePPtr: {fileID: 0} 12 | m_ManagedTypeFallback: 13 | m_Properties: 14 | - target: {fileID: 0} 15 | propertyPath: m_ExternalObjects.Array.size 16 | value: 0 17 | objectReference: {fileID: 0} 18 | - target: {fileID: 0} 19 | propertyPath: m_DefaultSettings.loadType 20 | value: 1 21 | objectReference: {fileID: 0} 22 | - target: {fileID: 0} 23 | propertyPath: m_DefaultSettings.sampleRateSetting 24 | value: 0 25 | objectReference: {fileID: 0} 26 | - target: {fileID: 0} 27 | propertyPath: m_DefaultSettings.sampleRateOverride 28 | value: 44100 29 | objectReference: {fileID: 0} 30 | - target: {fileID: 0} 31 | propertyPath: m_DefaultSettings.compressionFormat 32 | value: 2 33 | objectReference: {fileID: 0} 34 | - target: {fileID: 0} 35 | propertyPath: m_DefaultSettings.quality 36 | value: 0.7 37 | objectReference: {fileID: 0} 38 | - target: {fileID: 0} 39 | propertyPath: m_DefaultSettings.conversionMode 40 | value: 0 41 | objectReference: {fileID: 0} 42 | - target: {fileID: 0} 43 | propertyPath: m_PlatformSettingOverrides.Array.size 44 | value: 0 45 | objectReference: {fileID: 0} 46 | - target: {fileID: 0} 47 | propertyPath: m_ForceToMono 48 | value: 0 49 | objectReference: {fileID: 0} 50 | - target: {fileID: 0} 51 | propertyPath: m_Normalize 52 | value: 1 53 | objectReference: {fileID: 0} 54 | - target: {fileID: 0} 55 | propertyPath: m_PreloadAudioData 56 | value: 1 57 | objectReference: {fileID: 0} 58 | - target: {fileID: 0} 59 | propertyPath: m_LoadInBackground 60 | value: 0 61 | objectReference: {fileID: 0} 62 | - target: {fileID: 0} 63 | propertyPath: m_Ambisonic 64 | value: 0 65 | objectReference: {fileID: 0} 66 | - target: {fileID: 0} 67 | propertyPath: m_3D 68 | value: 1 69 | objectReference: {fileID: 0} 70 | - target: {fileID: 0} 71 | propertyPath: m_UserData 72 | value: 73 | objectReference: {fileID: 0} 74 | - target: {fileID: 0} 75 | propertyPath: m_AssetBundleName 76 | value: 77 | objectReference: {fileID: 0} 78 | - target: {fileID: 0} 79 | propertyPath: m_AssetBundleVariant 80 | value: 81 | objectReference: {fileID: 0} 82 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/AudioCompressedInMemory.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e18fd6ecd9cdb524ca99844f39b9d9ac 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/AudioStreaming.preset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!181963792 &2655988077585873504 4 | Preset: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: AudioStreaming 9 | m_TargetType: 10 | m_NativeTypeID: 1020 11 | m_ManagedTypePPtr: {fileID: 0} 12 | m_ManagedTypeFallback: 13 | m_Properties: 14 | - target: {fileID: 0} 15 | propertyPath: m_ExternalObjects.Array.size 16 | value: 0 17 | objectReference: {fileID: 0} 18 | - target: {fileID: 0} 19 | propertyPath: m_DefaultSettings.loadType 20 | value: 2 21 | objectReference: {fileID: 0} 22 | - target: {fileID: 0} 23 | propertyPath: m_DefaultSettings.sampleRateSetting 24 | value: 0 25 | objectReference: {fileID: 0} 26 | - target: {fileID: 0} 27 | propertyPath: m_DefaultSettings.sampleRateOverride 28 | value: 44100 29 | objectReference: {fileID: 0} 30 | - target: {fileID: 0} 31 | propertyPath: m_DefaultSettings.compressionFormat 32 | value: 1 33 | objectReference: {fileID: 0} 34 | - target: {fileID: 0} 35 | propertyPath: m_DefaultSettings.quality 36 | value: 0.7 37 | objectReference: {fileID: 0} 38 | - target: {fileID: 0} 39 | propertyPath: m_DefaultSettings.conversionMode 40 | value: 0 41 | objectReference: {fileID: 0} 42 | - target: {fileID: 0} 43 | propertyPath: m_PlatformSettingOverrides.Array.size 44 | value: 0 45 | objectReference: {fileID: 0} 46 | - target: {fileID: 0} 47 | propertyPath: m_ForceToMono 48 | value: 0 49 | objectReference: {fileID: 0} 50 | - target: {fileID: 0} 51 | propertyPath: m_Normalize 52 | value: 1 53 | objectReference: {fileID: 0} 54 | - target: {fileID: 0} 55 | propertyPath: m_PreloadAudioData 56 | value: 1 57 | objectReference: {fileID: 0} 58 | - target: {fileID: 0} 59 | propertyPath: m_LoadInBackground 60 | value: 0 61 | objectReference: {fileID: 0} 62 | - target: {fileID: 0} 63 | propertyPath: m_Ambisonic 64 | value: 0 65 | objectReference: {fileID: 0} 66 | - target: {fileID: 0} 67 | propertyPath: m_3D 68 | value: 1 69 | objectReference: {fileID: 0} 70 | - target: {fileID: 0} 71 | propertyPath: m_UserData 72 | value: 73 | objectReference: {fileID: 0} 74 | - target: {fileID: 0} 75 | propertyPath: m_AssetBundleName 76 | value: 77 | objectReference: {fileID: 0} 78 | - target: {fileID: 0} 79 | propertyPath: m_AssetBundleVariant 80 | value: 81 | objectReference: {fileID: 0} 82 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/AudioStreaming.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 460e573eb8466884baaa0b8475505f83 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62d01720aebe09744845cc69fc236e31 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults/AlbedoTexture_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a99f8aa944efe94cb9bd74562b7d5f9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults/AudioDecompressOnLoad_Default.preset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!181963792 &2655988077585873504 4 | Preset: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: AudioDecompressOnLoad_Default 9 | m_TargetType: 10 | m_NativeTypeID: 1020 11 | m_ManagedTypePPtr: {fileID: 0} 12 | m_ManagedTypeFallback: 13 | m_Properties: 14 | - target: {fileID: 0} 15 | propertyPath: m_ExternalObjects.Array.size 16 | value: 0 17 | objectReference: {fileID: 0} 18 | - target: {fileID: 0} 19 | propertyPath: m_DefaultSettings.loadType 20 | value: 0 21 | objectReference: {fileID: 0} 22 | - target: {fileID: 0} 23 | propertyPath: m_DefaultSettings.sampleRateSetting 24 | value: 0 25 | objectReference: {fileID: 0} 26 | - target: {fileID: 0} 27 | propertyPath: m_DefaultSettings.sampleRateOverride 28 | value: 44100 29 | objectReference: {fileID: 0} 30 | - target: {fileID: 0} 31 | propertyPath: m_DefaultSettings.compressionFormat 32 | value: 0 33 | objectReference: {fileID: 0} 34 | - target: {fileID: 0} 35 | propertyPath: m_DefaultSettings.quality 36 | value: 1 37 | objectReference: {fileID: 0} 38 | - target: {fileID: 0} 39 | propertyPath: m_DefaultSettings.conversionMode 40 | value: 0 41 | objectReference: {fileID: 0} 42 | - target: {fileID: 0} 43 | propertyPath: m_PlatformSettingOverrides.Array.size 44 | value: 0 45 | objectReference: {fileID: 0} 46 | - target: {fileID: 0} 47 | propertyPath: m_ForceToMono 48 | value: 0 49 | objectReference: {fileID: 0} 50 | - target: {fileID: 0} 51 | propertyPath: m_Normalize 52 | value: 1 53 | objectReference: {fileID: 0} 54 | - target: {fileID: 0} 55 | propertyPath: m_PreloadAudioData 56 | value: 1 57 | objectReference: {fileID: 0} 58 | - target: {fileID: 0} 59 | propertyPath: m_LoadInBackground 60 | value: 0 61 | objectReference: {fileID: 0} 62 | - target: {fileID: 0} 63 | propertyPath: m_Ambisonic 64 | value: 0 65 | objectReference: {fileID: 0} 66 | - target: {fileID: 0} 67 | propertyPath: m_3D 68 | value: 1 69 | objectReference: {fileID: 0} 70 | - target: {fileID: 0} 71 | propertyPath: m_UserData 72 | value: 73 | objectReference: {fileID: 0} 74 | - target: {fileID: 0} 75 | propertyPath: m_AssetBundleName 76 | value: 77 | objectReference: {fileID: 0} 78 | - target: {fileID: 0} 79 | propertyPath: m_AssetBundleVariant 80 | value: 81 | objectReference: {fileID: 0} 82 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults/AudioDecompressOnLoad_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cd792cc87e492d43b4e95b205fc5cc6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults/DirectionalLight_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1cf8506f04ef2c4a88b64b6c4202eea 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/Defaults/SSSSettings_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fa3055e2a1363246838debd20206d37 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/HDRTexture.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78830bb1431cab940b74be615e2a739f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/NormalTexture.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d826a4c23450f946b19c20560595a1f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Presets/UtilityTexture.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9303d565bd8aa6948ba775e843320e4d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Readme.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83c2ed844a8c74b779a4c823d16594b1 3 | timeCreated: 1484217493 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/SamplesHDRP: -------------------------------------------------------------------------------- 1 | ../../SamplesHDRP~ -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/SamplesHDRP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f5c8e5720669ca40a5b03e501d48de4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 006b6043041431d4d909ad5f958582cb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/Foliage.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} 13 | m_Name: Foliage 14 | m_EditorClassIdentifier: 15 | m_Version: 1 16 | profiles: [] 17 | profile: 18 | scatteringDistance: {r: 0.7568628, g: 0.7019608, b: 0.24313727, a: 1} 19 | transmissionTint: {r: 1, g: 1, b: 1, a: 1} 20 | texturingMode: 0 21 | transmissionMode: 1 22 | thicknessRemap: {x: 0, y: 2} 23 | worldScale: 1 24 | ior: 1.4 25 | hash: 1080305144 26 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/Foliage.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78322c7f82657514ebe48203160e3f39 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/HDRenderPipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e2e6bfc59709614ab90c0cd7d755e48 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/SampleScenePostProcessingSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 183cbd347d25080429f42b520742bbd8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/SampleSceneSkyandFogSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a123fc0ac58cb774e8592c925f167e7c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Assets/Settings/Skin.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26bdddf49760c61438938733f07fa2a2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: '{"assetGUIDs":["26bdddf49760c61438938733f07fa2a2","78322c7f82657514ebe48203160e3f39","281c25de6076ef84297a335f40a8c119","c1e7f4528bb09e34ca01538655427a8b","d4a5161c8e3489f4fb60d30b8e06e5f5","937679514dbefd145abc76148bf15517","e0312643efbd7a2419cb4815ee52a11b","8e632b6865f53f64a9404c196227555d","113e422f16482af43aaaa4eff2a995fe","7c45518c02969ee45ae57acd86f137c8","b06170c1b53f12241a9b66d45b9c3c97","ecc4f9e147bd02c42aeae7ce472723b2","8873ac82b5cbedf46a234cb2659b5a6a","1f93bde2ea771ba43846d76a503a4188","8aa10fe29cd44f24f925f418494ad12e",""]}' 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this package will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | ## [7.3.1] - 2020-03-11 8 | 9 | Version Updated 10 | The version number for this package has increased due to a version update of a related graphics package. 11 | 12 | ## [7.2.0] - 2020-02-10 13 | 14 | Version Updated 15 | The version number for this package has increased due to a version update of a related graphics package. 16 | 17 | ## [7.1.1] - 2019-09-05 18 | 19 | Version Updated 20 | The version number for this package has increased due to a version update of a related graphics package. 21 | 22 | ## [7.0.1] - 2019-07-25 23 | 24 | Version Updated 25 | The version number for this package has increased due to a version update of a related graphics package. 26 | 27 | Started Changelog 28 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b3f7006c7834664ba28a1fa6b51f9fe 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/LICENSE.md: -------------------------------------------------------------------------------- 1 | com.unity.render-pipelines.high-definition-config copyright © 2020 Unity Technologies ApS 2 | 3 | Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). 4 | 5 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. 6 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e797817a7447e1f42816cf2c2fa8765d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d299198a792a964e9d443aa47506e2c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Configuration 3 | //----------------------------------------------------------------------------- 4 | 5 | namespace UnityEngine.Rendering.HighDefinition 6 | { 7 | [GenerateHLSL(PackingRules.Exact)] 8 | public enum HDShadowFilteringQuality 9 | { 10 | Low = 0, 11 | Medium = 1, 12 | High = 2, 13 | } 14 | 15 | [GenerateHLSL(PackingRules.Exact)] 16 | public enum ShaderOptions 17 | { 18 | CameraRelativeRendering = 1, // Rendering sets the origin of the world to the position of the primary (scene view) camera 19 | PreExposition = 1, 20 | PrecomputedAtmosphericAttenuation = 0, // Precomputes atmospheric attenuation for the directional light on the CPU, which makes it independent from the fragment's position, which is faster but wrong 21 | #if ENABLE_RAYTRACING 22 | Raytracing = 1, 23 | #else 24 | Raytracing = 0, 25 | #endif 26 | #if ENABLE_VR 27 | XrMaxViews = 2, // Used for single-pass rendering (with fast path in vertex shader code when forced to 2) 28 | #else 29 | XrMaxViews = 1, 30 | #endif 31 | AreaLights = 1, 32 | 33 | DeferredShadowFiltering = HDShadowFilteringQuality.Medium, 34 | BarnDoor = 0 35 | }; 36 | 37 | // Note: #define can't be use in include file in C# so we chose this way to configure both C# and hlsl 38 | // Changing a value in this enum Config here require to regenerate the hlsl include and recompile C# and shaders 39 | public class ShaderConfig 40 | { 41 | public static int s_CameraRelativeRendering = (int)ShaderOptions.CameraRelativeRendering; 42 | public static int s_PreExposition = (int)ShaderOptions.PreExposition; 43 | public static int s_XrMaxViews = (int)ShaderOptions.XrMaxViews; 44 | public static int s_PrecomputedAtmosphericAttenuation = (int)ShaderOptions.PrecomputedAtmosphericAttenuation; 45 | public static int s_AreaLights = (int)ShaderOptions.AreaLights; 46 | public static int s_BarnDoor = (int)ShaderOptions.BarnDoor; 47 | public static HDShadowFilteringQuality s_DeferredShadowFiltering = (HDShadowFilteringQuality)ShaderOptions.DeferredShadowFiltering; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs.hlsl: -------------------------------------------------------------------------------- 1 | // 2 | // This file was automatically generated. Please don't edit by hand. 3 | // 4 | 5 | #ifndef SHADERCONFIG_CS_HLSL 6 | #define SHADERCONFIG_CS_HLSL 7 | // 8 | // UnityEngine.Rendering.HighDefinition.HDShadowFilteringQuality: static fields 9 | // 10 | #define HDSHADOWFILTERINGQUALITY_LOW (0) 11 | #define HDSHADOWFILTERINGQUALITY_MEDIUM (1) 12 | #define HDSHADOWFILTERINGQUALITY_HIGH (2) 13 | 14 | // 15 | // UnityEngine.Rendering.HighDefinition.ShaderOptions: static fields 16 | // 17 | #define SHADEROPTIONS_CAMERA_RELATIVE_RENDERING (1) 18 | #define SHADEROPTIONS_PRE_EXPOSITION (1) 19 | #define SHADEROPTIONS_PRECOMPUTED_ATMOSPHERIC_ATTENUATION (0) 20 | #define SHADEROPTIONS_RAYTRACING (1) 21 | #define SHADEROPTIONS_XR_MAX_VIEWS (2) 22 | #define SHADEROPTIONS_AREA_LIGHTS (1) 23 | #define SHADEROPTIONS_DEFERRED_SHADOW_FILTERING (1) 24 | #define SHADEROPTIONS_BARN_DOOR (0) 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcb8aa9f314d49b4c97aa1f3f3511e7b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 488b9213a64c77540bca3fe167edbe6c 3 | timeCreated: 1475742183 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/Unity.RenderPipelines.HighDefinition.Config.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.RenderPipelines.HighDefinition.Config.Runtime", 3 | "references": [ 4 | "GUID:df380645f10b7bc4b97d4f5eb6303d95" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": true, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [] 14 | } -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/Runtime/Unity.RenderPipelines.HighDefinition.Config.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a075b55b404a34748ac14ea9b6039911 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.render-pipelines.high-definition-config", 3 | "description": "Configuration files for the High Definition Render Pipeline.", 4 | "version": "7.3.1", 5 | "unity": "2019.3", 6 | "unityRelease": "2f1", 7 | "displayName": "High Definition RP Config", 8 | "dependencies": { 9 | "com.unity.render-pipelines.core": "7.3.1" 10 | }, 11 | "repository": { 12 | "footprint": "9e433f6fdca61b8ea6ab979d79fa7199650a0ccd", 13 | "type": "git", 14 | "url": "https://github.com/Unity-Technologies/ScriptableRenderPipeline.git", 15 | "revision": "3e04a9da77f7658a9bec4a2a8de3a4a40b169865" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/LocalPackages/com.unity.render-pipelines.high-definition-config/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af6e0e6bb9a468845bfb9c9381e3219b 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to the RaytracedHardShadow package will be documented in this file. 3 | 4 | ## [0.6.0-preview] - 2021-04-22 5 | 6 | * feat: Make RTHS compatible with HDRP and Universal RP. 7 | * fix: "Preview in Scene View" is always reset 8 | * fix: package warnings 9 | * fix: internal shadow creation 10 | 11 | ## [0.5.2-preview] - 2019-08-07 12 | 13 | - Converting To Package format 14 | 15 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efa66ba08c1fbb1419db81b790d0e8db 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/Editor: -------------------------------------------------------------------------------- 1 | ../../../Editor -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81cde0aca08739c44b8959b3ed9c54e8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/Runtime: -------------------------------------------------------------------------------- 1 | ../../../Runtime -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95048507f03609b499fc55edc0578878 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.raytracedhardshadow", 3 | "displayName": "Raytraced Hard Shadow", 4 | "version": "0.6.0-preview", 5 | "unity": "2019.4", 6 | "description": "DXR based pixel-precise hard shadow. primarily intended to use with toon shader.\nDXR-capable system is required. Specifically, Windows 10 version 1803 (April 2018 Update) or newer with GeForce 1070 or newer NVIDIA video card. As of July 2019, no video cards except NVIDIA supports DXR.", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/unity3d-jp/RaytracedHardShadow.git" 10 | }, 11 | 12 | "samples": [ 13 | 14 | { 15 | "displayName": "Primitive Objects", 16 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 17 | "path": "Samples~/PrimitiveObjects" 18 | } 19 | ], 20 | "contributors": [ 21 | "Seiya Ishibashi (https://github.com/i-saint)", 22 | "Sindharta Tanuwijaya (https://github.com/sindharta)", 23 | "Toshiyuki Mori (https://github.com/higeometry)" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/com.unity.raytracedhardshadow/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7eab0b9dbe047a748b3ca881334df374 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.rider": "1.1.4", 4 | "com.unity.ide.vscode": "1.2.3", 5 | "com.unity.render-pipelines.high-definition": "7.3.1", 6 | "com.unity.render-pipelines.high-definition-config": "file:../LocalPackages/com.unity.render-pipelines.high-definition-config", 7 | "com.unity.test-framework": "1.1.24", 8 | "com.unity.textmeshpro": "2.1.4", 9 | "com.unity.timeline": "1.2.18", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: cbfe36cfddfde964d9dfce63a355d5dd 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 0 16 | m_EtcTextureFastCompressor: 2 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 5 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/HDRPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 63a2978a97e4fc04cb9d905947216f3d, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 1 16 | m_DefaultScenePrefabSaved: {fileID: 5823510469358171751, guid: f9e3ff5a1b8f49c4fa8686e68d2dadae, 17 | type: 3} 18 | m_DefaultDXRScenePrefabSaved: {fileID: 4798200196228829883, guid: 5e517fc87a66d5b4e8471c3f90fa4940, 19 | type: 3} 20 | m_ProjectSettingFolderPath: HDRPDefaultResources 21 | m_WizardPopupAtStart: 0 22 | m_WizardPopupAlreadyShownOnce: 0 23 | m_WizardActiveTab: 2 24 | m_WizardNeedRestartAfterChangingToDX12: 0 25 | m_WizardNeedToRunFixAllAgainAfterDomainReload: 0 26 | m_LastMaterialVersion: 2 27 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 1020 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 13 | type: 2} 14 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.24f1 2 | m_EditorVersionWithRevision: 2019.4.24f1 (5da6f0345e82) 3 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Normal 11 | pixelLightCount: 2 12 | shadows: 2 13 | shadowResolution: 1 14 | shadowProjection: 1 15 | shadowCascades: 2 16 | shadowDistance: 40 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 1 21 | skinWeights: 255 22 | textureQuality: 0 23 | anisotropicTextures: 1 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 1 27 | realtimeReflectionProbes: 1 28 | billboardsFaceCameraPosition: 1 29 | vSyncCount: 1 30 | lodBias: 1 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 256 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | m_PerPlatformDefaultQuality: 45 | Android: 0 46 | Nintendo 3DS: 0 47 | Nintendo Switch: 0 48 | PS4: 0 49 | PSP2: 0 50 | Stadia: 0 51 | Standalone: 0 52 | Tizen: 0 53 | WebGL: 0 54 | WiiU: 0 55 | Windows Store Apps: 0 56 | XboxOne: 0 57 | iPhone: 0 58 | tvOS: 0 59 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} 7 | m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} 8 | m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} 9 | m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /RaytracedHardShadowHDRP~/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 558255460b74ec04fa70b5570e9327bd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/AudioCompressedInMemory.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dd802e4d37c65149922028d3e973832 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/AudioStreaming.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86bcce7f5575b54408aa0f3a7d321039 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/Defaults.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71ea82b02df99c2439e0dc8e4e1ebc24 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/Defaults/AlbedoTexture_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8537455c6c08bd4e8bf0be3707da685 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/Defaults/AudioDecompressOnLoad.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7689051185d12f4298e1ebb2693a29f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/Defaults/DirectionalLight_Default.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 463065d4f17d1d94d848aa127b94dd43 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/NormalTexture.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14a57cf3b9fa1c74b884aa7e0dcf1faa 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Presets/UtilityTexture.preset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45f7b2e3c78185248b3adbb14429c2ab 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2655988077585873504 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Readme.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83c2ed844a8c74b779a4c823d16594b1 3 | timeCreated: 1484217493 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/SamplesUniversalRP: -------------------------------------------------------------------------------- 1 | ../../SamplesUniversalRP~ -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/SamplesUniversalRP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed9038b74a3741b419710e33df1dd20a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a4ecf1a11857dd4ab1ed39fbb7a16af 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1c3109bdb54ad54c8a2b2838528e640 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0735c275001a2c84dafdb30deced5d8d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings/ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: ForwardRenderer 14 | m_EditorClassIdentifier: 15 | m_RendererFeatures: [] 16 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 17 | shaders: 18 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 19 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 20 | screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, 21 | type: 3} 22 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 23 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 24 | m_OpaqueLayerMask: 25 | serializedVersion: 2 26 | m_Bits: 4294967295 27 | m_TransparentLayerMask: 28 | serializedVersion: 2 29 | m_Bits: 4294967295 30 | m_DefaultStencilState: 31 | overrideStencilState: 0 32 | stencilReference: 0 33 | stencilCompareFunction: 8 34 | passOperation: 0 35 | failOperation: 0 36 | zFailOperation: 0 37 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings/ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a8e21d5c33334b11b34a596161b9360 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings/SampleSceneProfile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10fc4df2da32a41aaa32d77bc913491c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings/UniversalRP-HighQuality.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: UniversalRP-HighQuality 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 5 16 | k_AssetPreviousVersion: 5 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 4a8e21d5c33334b11b34a596161b9360, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsHDR: 1 26 | m_MSAA: 2 27 | m_RenderScale: 1 28 | m_MainLightRenderingMode: 1 29 | m_MainLightShadowsSupported: 1 30 | m_MainLightShadowmapResolution: 2048 31 | m_AdditionalLightsRenderingMode: 1 32 | m_AdditionalLightsPerObjectLimit: 4 33 | m_AdditionalLightShadowsSupported: 1 34 | m_AdditionalLightsShadowmapResolution: 512 35 | m_ShadowDistance: 50 36 | m_ShadowCascades: 1 37 | m_Cascade2Split: 0.25 38 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} 39 | m_ShadowDepthBias: 1 40 | m_ShadowNormalBias: 1 41 | m_SoftShadowsSupported: 1 42 | m_UseSRPBatcher: 1 43 | m_SupportsDynamicBatching: 0 44 | m_MixedLightingSupported: 1 45 | m_DebugLevel: 0 46 | m_ColorGradingMode: 0 47 | m_ColorGradingLutSize: 32 48 | m_ShadowType: 1 49 | m_LocalShadowsSupported: 0 50 | m_LocalShadowsAtlasResolution: 256 51 | m_MaxPixelLights: 0 52 | m_ShadowAtlasResolution: 256 53 | m_ShaderVariantLogLevel: 0 54 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Assets/Settings/UniversalRP-HighQuality.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19ba41d7c0026c3459d37c2fe90c55a0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to the RaytracedHardShadow package will be documented in this file. 3 | 4 | ## [0.6.0-preview] - 2021-04-22 5 | 6 | * feat: Make RTHS compatible with HDRP and Universal RP. 7 | * fix: "Preview in Scene View" is always reset 8 | * fix: package warnings 9 | * fix: internal shadow creation 10 | 11 | ## [0.5.2-preview] - 2019-08-07 12 | 13 | - Converting To Package format 14 | 15 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0aabdf7234207d549ba586212571304d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/Editor: -------------------------------------------------------------------------------- 1 | ../../../Editor -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 949833d33a680974c950da35fa92b63c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/Runtime: -------------------------------------------------------------------------------- 1 | ../../../Runtime -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b74e6d851a013ea4383cf753848b749a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.raytracedhardshadow", 3 | "displayName": "Raytraced Hard Shadow", 4 | "version": "0.6.0-preview", 5 | "unity": "2019.4", 6 | "description": "DXR based pixel-precise hard shadow. primarily intended to use with toon shader.\nDXR-capable system is required. Specifically, Windows 10 version 1803 (April 2018 Update) or newer with GeForce 1070 or newer NVIDIA video card. As of July 2019, no video cards except NVIDIA supports DXR.", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/unity3d-jp/RaytracedHardShadow.git" 10 | }, 11 | 12 | "samples": [ 13 | 14 | { 15 | "displayName": "Primitive Objects", 16 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 17 | "path": "Samples~/PrimitiveObjects" 18 | } 19 | ], 20 | "contributors": [ 21 | "Seiya Ishibashi (https://github.com/i-saint)", 22 | "Sindharta Tanuwijaya (https://github.com/sindharta)", 23 | "Toshiyuki Mori (https://github.com/higeometry)" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/com.unity.raytracedhardshadow/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06b5616fc96e932468a30d5d6682e018 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.rider": "1.1.4", 4 | "com.unity.ide.vscode": "1.2.3", 5 | "com.unity.render-pipelines.universal": "7.3.1", 6 | "com.unity.test-framework": "1.1.24", 7 | "com.unity.textmeshpro": "2.1.4", 8 | "com.unity.timeline": "1.2.18", 9 | "com.unity.ugui": "1.0.0", 10 | "com.unity.modules.ai": "1.0.0", 11 | "com.unity.modules.androidjni": "1.0.0", 12 | "com.unity.modules.animation": "1.0.0", 13 | "com.unity.modules.assetbundle": "1.0.0", 14 | "com.unity.modules.audio": "1.0.0", 15 | "com.unity.modules.cloth": "1.0.0", 16 | "com.unity.modules.director": "1.0.0", 17 | "com.unity.modules.imageconversion": "1.0.0", 18 | "com.unity.modules.imgui": "1.0.0", 19 | "com.unity.modules.jsonserialize": "1.0.0", 20 | "com.unity.modules.particlesystem": "1.0.0", 21 | "com.unity.modules.physics": "1.0.0", 22 | "com.unity.modules.physics2d": "1.0.0", 23 | "com.unity.modules.screencapture": "1.0.0", 24 | "com.unity.modules.terrain": "1.0.0", 25 | "com.unity.modules.terrainphysics": "1.0.0", 26 | "com.unity.modules.tilemap": "1.0.0", 27 | "com.unity.modules.ui": "1.0.0", 28 | "com.unity.modules.uielements": "1.0.0", 29 | "com.unity.modules.umbra": "1.0.0", 30 | "com.unity.modules.unityanalytics": "1.0.0", 31 | "com.unity.modules.unitywebrequest": "1.0.0", 32 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 33 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 34 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 35 | "com.unity.modules.unitywebrequestwww": "1.0.0", 36 | "com.unity.modules.vehicles": "1.0.0", 37 | "com.unity.modules.video": "1.0.0", 38 | "com.unity.modules.vr": "1.0.0", 39 | "com.unity.modules.wind": "1.0.0", 40 | "com.unity.modules.xr": "1.0.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 7 37 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: d1c3109bdb54ad54c8a2b2838528e640 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: 463065d4f17d1d94d848aa127b94dd43, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: e7689051185d12f4298e1ebb2693a29f, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: e8537455c6c08bd4e8bf0be3707da685, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.24f1 2 | m_EditorVersionWithRevision: 2019.4.24f1 (5da6f0345e82) 3 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 1 16 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /RaytracedHardShadowUniversalRP~/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/RaytracedHardShadowPackaging.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using UnityEditor; 4 | 5 | 6 | public class RaytracedHardShadowPackaging 7 | { 8 | [MenuItem("Assets/Make RaytracedHardShadow.unitypackage")] 9 | public static void MakePackage() 10 | { 11 | string[] files = new string[] 12 | { 13 | "Assets/UTJ/RaytracedHardShadow", 14 | }; 15 | AssetDatabase.ExportPackage(files, "RaytracedHardShadow.unitypackage", ExportPackageOptions.Recurse); 16 | } 17 | 18 | } 19 | #endif // UNITY_EDITOR 20 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/RaytracedHardShadowPackaging.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbd7aff9483974040aa679e180b4e87e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Samples: -------------------------------------------------------------------------------- 1 | ../../Samples~ -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da07fdf0431bd9544a1f42543481dccc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8830568e6419e045a4fc8d46bace547 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/LightIndex.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59bdeeaa8ecda904f882650a9be8dfe8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/ShadowBitmask.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: ShadowBitmask 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | serializedVersion: 3 16 | m_Width: 1920 17 | m_Height: 1080 18 | m_AntiAliasing: 1 19 | m_DepthFormat: 2 20 | m_ColorFormat: 37 21 | m_MipMap: 0 22 | m_GenerateMips: 1 23 | m_SRGB: 0 24 | m_UseDynamicScale: 0 25 | m_BindMS: 0 26 | m_EnableCompatibleFormat: 1 27 | m_TextureSettings: 28 | serializedVersion: 2 29 | m_FilterMode: 1 30 | m_Aniso: 0 31 | m_MipBias: 0 32 | m_WrapU: 1 33 | m_WrapV: 1 34 | m_WrapW: 1 35 | m_Dimension: 2 36 | m_VolumeDepth: 1 37 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/ShadowBitmask.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6244f9b65272f414f831bfb660012939 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/SkinnedMeshes.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f6d69532e9ec4348aa3e49e609b5539 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/SpotLight.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 530158b7ece4e4a4ab5feed55ec71723 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Scenes/TestLayer.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7075df90abbd5a24898aea6a1e3d13da 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f038341575e78204398a2bf87a9ffc81 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 880e70356e2b1d04cb4719d1f821fd6e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Materials/VisualizeBitmask.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VisualizeBitmask 11 | m_Shader: {fileID: 4800000, guid: 7c2f63a707dd0d94d9e059a4262ac904, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 8400000, guid: 6244f9b65272f414f831bfb660012939, type: 2} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Intensity: 0.25 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 1 76 | m_Colors: 77 | - _Color: {r: 1, g: 1, b: 1, a: 1} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Materials/VisualizeBitmask.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2942df0eaf0a3cf4995b33764f9462bb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Materials/VisualizeLightIndex.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VisualizeLightIndex 11 | m_Shader: {fileID: 4800000, guid: b377f0f3e36be7e42adf7e87daecbf2c, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _Multiplyer: 0.03 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 1 76 | m_Colors: 77 | - _Color: {r: 1, g: 1, b: 1, a: 1} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Materials/VisualizeLightIndex.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96f087bef55ba714b8a469291a3b17ce 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bbf57836e9d7a546823a79ccac64544 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Models/SkinnedMeshSegmented.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-jp/RaytracedHardShadow/bbba12aaf3e7c6fb1c198746ef9a0fcf408b79b9/RaytracedHardShadow~/Assets/Test/Models/SkinnedMeshSegmented.fbx -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Models/Submeshes.mtl: -------------------------------------------------------------------------------- 1 | # Created by Metasequoia 2 | 3 | newmtl mat1 4 | Ka 0.29647 0.26588 0.29647 5 | Kd 0.39529 0.35451 0.39529 6 | Ks 0.00000 0.00000 0.00000 7 | Ns 5.00000 8 | 9 | newmtl mat2 10 | Ka 0.60000 0.24941 0.21882 11 | Kd 0.80000 0.33255 0.29176 12 | Ks 0.00000 0.00000 0.00000 13 | Ns 5.00000 14 | 15 | newmtl mat3 16 | Ka 0.30824 0.40235 0.60000 17 | Kd 0.41098 0.53647 0.80000 18 | Ks 0.00000 0.00000 0.00000 19 | Ns 5.00000 20 | 21 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Models/Submeshes.mtl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52aaa7a1619971a4cbd7e47e187a5c5c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc9d7202d0f940247b668630c8de2e96 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts/DebugCommands.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ba218f2da9d771409d0c8ff65b0ad39 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts/MoveVertices.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [ExecuteInEditMode] 6 | public class MoveVertices : MonoBehaviour 7 | { 8 | public Vector3 m_moveValue; 9 | 10 | void Update() 11 | { 12 | var mf = GetComponent(); 13 | if (mf == null) 14 | return; 15 | var mesh = mf.sharedMesh; 16 | if (mesh == null) 17 | return; 18 | 19 | var vertices = new List(); 20 | mesh.GetVertices(vertices); 21 | var n = vertices.Count; 22 | for (int vi= 0; vi < n; ++vi) 23 | { 24 | var v = vertices[vi]; 25 | v += m_moveValue; 26 | vertices[vi] = v; 27 | } 28 | mesh.SetVertices(vertices); 29 | mesh.UploadMeshData(false); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts/MoveVertices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef63c52c66f364b47b4509b2468a6626 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts/Rotate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [ExecuteInEditMode] 6 | public class Rotate : MonoBehaviour 7 | { 8 | public Vector3 m_rotateValue; 9 | 10 | void Update() 11 | { 12 | var trans = transform; 13 | var rot = trans.eulerAngles; 14 | rot += m_rotateValue; 15 | trans.eulerAngles = rot; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Scripts/Rotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 236da54a3e8665142a2c3a53027b972b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccecfeb2e2371714ebb817be091c72a9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeBitmask.shader: -------------------------------------------------------------------------------- 1 | Shader "UTJ/Raytraced Hard Shadow/Visualize Bitmask" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | _Intensity("Intensity", Float) = 0.25 7 | } 8 | SubShader 9 | { 10 | Tags { "RenderType" = "Opaque" } 11 | 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma only_renderers d3d11 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | #include "UnityCG.cginc" 19 | 20 | struct ia_out 21 | { 22 | float4 vertex : POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | struct vs_out 26 | { 27 | float4 vertex : SV_POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | Texture2D _MainTex; 32 | float4 _MainTex_TexelSize; 33 | float _Intensity; 34 | 35 | vs_out vert(ia_out v) 36 | { 37 | vs_out o; 38 | o.vertex = UnityObjectToClipPos(v.vertex); 39 | o.uv = v.uv; 40 | return o; 41 | } 42 | 43 | float4 frag(vs_out i) : SV_Target 44 | { 45 | float2 uv = (1.0f.xx - i.uv) * _MainTex_TexelSize.zw; 46 | uint v = _MainTex[uv].x; 47 | 48 | float r = 0.0f; 49 | for (int i = 0; i < 32; ++i) { 50 | if ((v & (1 << i)) != 0) 51 | r += _Intensity; 52 | } 53 | return float4(r, r, r, 1.0f); 54 | } 55 | ENDCG 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeBitmask.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c2f63a707dd0d94d9e059a4262ac904 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeLightIndex.cginc: -------------------------------------------------------------------------------- 1 | #include "UnityCG.cginc" 2 | #include "Lighting.cginc" 3 | #include "AutoLight.cginc" 4 | 5 | struct ia_out 6 | { 7 | float4 vertex : POSITION; 8 | }; 9 | struct vs_out 10 | { 11 | float4 vertex : SV_POSITION; 12 | float4 wpos : TEXCOORD0; 13 | }; 14 | 15 | vs_out vert(ia_out v) 16 | { 17 | vs_out o; 18 | o.vertex = UnityObjectToClipPos(v.vertex); 19 | o.wpos = mul(unity_ObjectToWorld, v.vertex); 20 | return o; 21 | } 22 | 23 | float4 frag(vs_out i) : SV_Target 24 | { 25 | float4 c = float4(0.0f, 0.0f, 0.0f, 1.0f); 26 | if (_LightColor0.a >= 1000.0f) { 27 | uint light_index = (uint)_LightColor0.a / 1000 - 1; 28 | 29 | UNITY_LIGHT_ATTENUATION(attenuation, 0, i.wpos.xyz); 30 | float l = dot(_LightColor0.rgb, 1.0f) / 3.0f * attenuation; 31 | if (light_index % 3 == 0) c.r += l; 32 | if (light_index % 3 == 1) c.g += l; 33 | if (light_index % 3 == 2) c.b += l; 34 | } 35 | return c; 36 | } 37 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeLightIndex.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 237e11617714bd14f8e81273694f922b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeLightIndex.shader: -------------------------------------------------------------------------------- 1 | Shader "UTJ/Raytraced Hard Shadow/Visualize Light Index" 2 | { 3 | Properties 4 | { 5 | } 6 | SubShader 7 | { 8 | Tags { "RenderType"="Opaque" } 9 | 10 | Pass 11 | { 12 | Tags {"LightMode" = "ForwardBase"} 13 | 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #pragma multi_compile DIRECTIONAL POINT SPOT 18 | #include "VisualizeLightIndex.cginc" 19 | ENDCG 20 | } 21 | 22 | Pass 23 | { 24 | Tags {"LightMode" = "ForwardAdd"} 25 | Blend One One 26 | 27 | CGPROGRAM 28 | #pragma vertex vert 29 | #pragma fragment frag 30 | #pragma multi_compile DIRECTIONAL POINT SPOT 31 | #include "VisualizeLightIndex.cginc" 32 | ENDCG 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Assets/Test/Shaders/VisualizeLightIndex.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b377f0f3e36be7e42adf7e87daecbf2c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to the RaytracedHardShadow package will be documented in this file. 3 | 4 | ## [0.6.0-preview] - 2021-04-22 5 | 6 | * feat: Make RTHS compatible with HDRP and Universal RP. 7 | * fix: "Preview in Scene View" is always reset 8 | * fix: package warnings 9 | * fix: internal shadow creation 10 | 11 | ## [0.5.2-preview] - 2019-08-07 12 | 13 | - Converting To Package format 14 | 15 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 167c2af0f9aad04479eaea6344c19d49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Documentation~: -------------------------------------------------------------------------------- 1 | ../../../Documentation~/ -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Editor: -------------------------------------------------------------------------------- 1 | ../../../Editor -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7aa07ad1d795a4bbfbb9908feb9d908c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/LICENSE.md: -------------------------------------------------------------------------------- 1 | ## Raytraced Hard Shadow 2 | 3 | 本パッケージは Unity に付随するプロジェクトに適用される Unity Companion License に基づいて使用が許諾されています。詳細は、[Unity Companion License の本文](http://www.unity3d.com/jp/legal/licenses/Unity_Companion_License) (英語) をご確認ください。 4 | ​ 5 | 別に明示的な定めがない限り、本ライセンスに基づくソフトウェアは厳密に「現状のまま」で、明示であるか暗黙であるかを問わず、何らの保証もなく提供されます。本利用規約およびその他の利用規約に関する詳細については、ライセンス本文をご確認ください。 6 | 7 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23d8d677f83950e4ca5533f0a4057528 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Runtime: -------------------------------------------------------------------------------- 1 | ../../../Runtime -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51b40e0c41c2e42168ff3b533a470ac3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Tests: -------------------------------------------------------------------------------- 1 | ../../../Tests -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f152c8d35e028419db4a9cf9c25e157c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.raytracedhardshadow", 3 | "displayName": "Raytraced Hard Shadow", 4 | "version": "0.6.0-preview", 5 | "unity": "2019.4", 6 | "description": "DXR based pixel-precise hard shadow. primarily intended to use with toon shader.\nDXR-capable system is required. Specifically, Windows 10 version 1803 (April 2018 Update) or newer with GeForce 1070 or newer NVIDIA video card. As of July 2019, no video cards except NVIDIA supports DXR.", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/unity3d-jp/RaytracedHardShadow.git" 10 | }, 11 | 12 | "samples": [ 13 | 14 | { 15 | "displayName": "Primitive Objects", 16 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 17 | "path": "Samples~/PrimitiveObjects" 18 | } 19 | ], 20 | "contributors": [ 21 | "Seiya Ishibashi (https://github.com/i-saint)", 22 | "Sindharta Tanuwijaya (https://github.com/sindharta)", 23 | "Toshiyuki Mori (https://github.com/higeometry)" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/com.unity.raytracedhardshadow/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0377489512d484ffa8d5f41afae261fd 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ext.nunit": "1.0.6", 4 | "com.unity.ide.rider": "1.1.4", 5 | "com.unity.ide.vscode": "1.2.3", 6 | "com.unity.package-validation-suite": "0.10.0-preview", 7 | "com.unity.test-framework": "1.1.24", 8 | "com.unity.textmeshpro": "2.1.4", 9 | "com.unity.timeline": "1.2.18", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.24f1 2 | m_EditorVersionWithRevision: 2019.4.24f1 (5da6f0345e82) 3 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /RaytracedHardShadow~/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Readme.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23d8d677f83950e4ca5533f0a4057529 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de93732e41bbe7a4bb76f941e6a700ec 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | [assembly: InternalsVisibleTo("Unity.RaytracedHardShadow.Editor")] 3 | [assembly: InternalsVisibleTo("Unity.RaytracedHardShadow.Tests")] -------------------------------------------------------------------------------- /Runtime/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffb882408d5b41142b3d9b12611ef9f6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74baa995ffab4264fb094300febc1f00 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb2944722afa0974fb6434e24239e00e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/x86_64/rths.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-jp/RaytracedHardShadow/bbba12aaf3e7c6fb1c198746ef9a0fcf408b79b9/Runtime/Plugins/x86_64/rths.dll -------------------------------------------------------------------------------- /Runtime/Plugins/x86_64/rths.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b1281a4aae4adb4ab28fe86c586e360 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | CPU: x86_64 25 | DefaultValueInitialized: true 26 | - first: 27 | Facebook: Win 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: None 32 | - first: 33 | Facebook: Win64 34 | second: 35 | enabled: 1 36 | settings: 37 | CPU: AnyCPU 38 | - first: 39 | Standalone: Linux 40 | second: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | - first: 45 | Standalone: Linux64 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: AnyCPU 50 | - first: 51 | Standalone: LinuxUniversal 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86_64 56 | - first: 57 | Standalone: OSXUniversal 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: x86_64 62 | - first: 63 | Standalone: Win 64 | second: 65 | enabled: 0 66 | settings: 67 | CPU: None 68 | - first: 69 | Standalone: Win64 70 | second: 71 | enabled: 1 72 | settings: 73 | CPU: AnyCPU 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Runtime/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d116aa22def4e9459b0b21fb536f093 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Scripts/Blit.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/UTJ/RaytracedHardShadow/Blit" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Cull Off 10 | ZWrite Off 11 | ZTest Always 12 | 13 | Pass 14 | { 15 | CGPROGRAM 16 | #pragma vertex vert_img 17 | #pragma fragment frag 18 | 19 | #include "UnityCG.cginc" 20 | 21 | sampler2D _MainTex; 22 | 23 | float4 frag(v2f_img i) : SV_Target 24 | { 25 | float4 ret; 26 | ret.rgb = tex2D(_MainTex, i.uv).r; 27 | ret.a = 1.0; 28 | return ret; 29 | } 30 | ENDCG 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Runtime/Scripts/Blit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aec6ef94122cf64ca60f62e760bc721 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Runtime/Scripts/ShadowCasterLight.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | #if UNITY_EDITOR 3 | using UnityEditor; 4 | #endif 5 | 6 | namespace Unity.RaytracedHardShadow 7 | { 8 | internal enum ShadowCasterLightType { 9 | Directional, 10 | Spot, 11 | Point, 12 | ReversePoint, 13 | } 14 | 15 | // this component doesn't light objects. only casts shadows. intended mainly for experiments. 16 | // (ReversePooint light is supported only by this component) 17 | [ExecuteInEditMode] 18 | internal class ShadowCasterLight : MonoBehaviour { 19 | [SerializeField] ShadowCasterLightType m_lightType; 20 | [SerializeField] float m_range = 10.0f; 21 | [SerializeField] [Range(1.0f, 179.0f)] float m_spotAngle = 30.0f; 22 | 23 | public ShadowCasterLightType lightType 24 | { 25 | get { return m_lightType; } 26 | set { m_lightType = value; } 27 | } 28 | 29 | public float range 30 | { 31 | get { return m_range; } 32 | set { m_range = value; } 33 | } 34 | 35 | public float spotAngle 36 | { 37 | get { return m_spotAngle; } 38 | set { m_spotAngle = value; } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Runtime/Scripts/ShadowCasterLight.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd97e68258555b645b323ab4a44b5c9e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Scripts/ShadowRaytracer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b21f82ee99238ee4eb21b9a59244893c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Scripts/rthsAPI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09af4f5d364cbb546a1ea795569dc36a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Unity.RaytracedHardShadow.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.RaytracedHardShadow", 3 | "references": [], 4 | "includePlatforms": [ 5 | "Editor", 6 | "WindowsStandalone64" 7 | ], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Runtime/Unity.RaytracedHardShadow.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2f2fdafbf2b25e46bd82c9abb25947d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7a23ca7ff5a1049b930a9d937506e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/.sampleHDRP.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName":"Primitive Objects for HDRP", 3 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 4 | "createSeparatePackage": false 5 | } 6 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30d8eadb777c71945ade75e778965f28 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Materials/HDRPdefaultMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8669b704eeb717f498c2df92984fa98f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VisualizeShadowBuffer 11 | m_Shader: {fileID: 4800000, guid: 0b279ee8437e98740800879ba9f2b654, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 8400000, guid: ea5ae761ee3d4504f9064584797f67eb, type: 2} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e47d6dcaee991e249810a426faa70067 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 326012386721da843ae117684c2a15d5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Models/exclude.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-jp/RaytracedHardShadow/bbba12aaf3e7c6fb1c198746ef9a0fcf408b79b9/SamplesHDRP~/PrimitiveObjects/Models/exclude.fbx -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/Models/exclude.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36c11ec718898b145aa9bb564fbda4e4 3 | ModelImporter: 4 | serializedVersion: 25 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | importMaterials: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 0 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | importVisibility: 1 42 | importBlendShapes: 1 43 | importCameras: 1 44 | importLights: 1 45 | swapUVChannels: 0 46 | generateSecondaryUV: 0 47 | useFileUnits: 1 48 | keepQuads: 0 49 | weldVertices: 1 50 | preserveHierarchy: 0 51 | skinWeightsMode: 0 52 | maxBonesPerVertex: 4 53 | minBoneWeight: 0.001 54 | meshOptimizationFlags: -1 55 | indexFormat: 0 56 | secondaryUVAngleDistortion: 8 57 | secondaryUVAreaDistortion: 15.000001 58 | secondaryUVHardAngle: 88 59 | secondaryUVPackMargin: 4 60 | useFileScale: 1 61 | tangentSpace: 62 | normalSmoothAngle: 60 63 | normalImportMode: 0 64 | tangentImportMode: 3 65 | normalCalculationMode: 4 66 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 67 | blendShapeNormalImportMode: 1 68 | normalSmoothingSource: 0 69 | referencedClips: [] 70 | importAnimation: 1 71 | copyAvatar: 0 72 | humanDescription: 73 | serializedVersion: 3 74 | human: [] 75 | skeleton: [] 76 | armTwist: 0.5 77 | foreArmTwist: 0.5 78 | upperLegTwist: 0.5 79 | legTwist: 0.5 80 | armStretch: 0.05 81 | legStretch: 0.05 82 | feetSpacing: 0 83 | globalScale: 1 84 | rootMotionBoneName: 85 | hasTranslationDoF: 0 86 | hasExtraRoot: 0 87 | skeletonHasParents: 1 88 | lastHumanDescriptionAvatarSource: {instanceID: 0} 89 | animationType: 0 90 | humanoidOversampling: 1 91 | additionalBone: 0 92 | userData: 93 | assetBundleName: 94 | assetBundleVariant: 95 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/PrimitiveObjectsScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc264401f731c874a87a4cd1181436e4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/ShadowBuffer.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: ShadowBuffer 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | serializedVersion: 3 16 | m_Width: 1920 17 | m_Height: 1080 18 | m_AntiAliasing: 1 19 | m_DepthFormat: 0 20 | m_ColorFormat: 5 21 | m_MipMap: 0 22 | m_GenerateMips: 1 23 | m_SRGB: 0 24 | m_UseDynamicScale: 0 25 | m_BindMS: 0 26 | m_EnableCompatibleFormat: 1 27 | m_TextureSettings: 28 | serializedVersion: 2 29 | m_FilterMode: 1 30 | m_Aniso: 0 31 | m_MipBias: 0 32 | m_WrapU: 1 33 | m_WrapV: 1 34 | m_WrapW: 1 35 | m_Dimension: 2 36 | m_VolumeDepth: 1 37 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjects/ShadowBuffer.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea5ae761ee3d4504f9064584797f67eb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjectsDXR.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d70436a5b239da54dadf77285b3d8de1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjectsDXR/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cbe36de8ef54d449b0ec8130751748f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjectsDXR/Materials/RaytracingMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bea7b4fe35f97c48907a76eb3e3f337 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/PrimitiveObjectsDXR/PrimitiveObjectsDXRScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41396d6dea1ed1346bd7ec81a1758199 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SamplesHDRP~/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b29bf0592b0e2b4ab22ab87cbdb34a0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesHDRP~/Shaders/VisualizeShadowBuffer.shader: -------------------------------------------------------------------------------- 1 | Shader "UTJ/Raytraced Hard Shadow/Visualize Shadow Buffer" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType" = "Opaque" } 10 | 11 | Pass 12 | { 13 | CGPROGRAM 14 | #pragma only_renderers d3d11 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | struct ia_out 20 | { 21 | float4 vertex : POSITION; 22 | float2 uv : TEXCOORD0; 23 | }; 24 | struct vs_out 25 | { 26 | float4 vertex : SV_POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | Texture2D _MainTex; 31 | float4 _MainTex_TexelSize; 32 | 33 | vs_out vert(ia_out v) 34 | { 35 | vs_out o; 36 | o.vertex = UnityObjectToClipPos(v.vertex); 37 | o.uv = v.uv; 38 | return o; 39 | } 40 | 41 | float4 frag(vs_out i) : SV_Target 42 | { 43 | float2 uv = (1.0f.xx - i.uv) * _MainTex_TexelSize.zw; 44 | 45 | float r = _MainTex[uv].x; 46 | return float4(r, r, r, 1.0f); 47 | } 48 | ENDCG 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SamplesHDRP~/Shaders/VisualizeShadowBuffer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b279ee8437e98740800879ba9f2b654 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7a23ca7ff5a1049b930a9d937506e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/.sampleUniversalRP.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName":"Primitive Objects for Universal RP", 3 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 4 | "createSeparatePackage": false 5 | } 6 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30d8eadb777c71945ade75e778965f28 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Materials/Skybox_Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ffaa0b7117ba8c47a9d05ae701d4b4d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Materials/UniversalDefaultMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b97ad59c73f8e147a29aef6b0ca77be 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VisualizeShadowBuffer 11 | m_Shader: {fileID: 4800000, guid: 0b279ee8437e98740800879ba9f2b654, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 8400000, guid: ea5ae761ee3d4504f9064584797f67eb, type: 2} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e47d6dcaee991e249810a426faa70067 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 326012386721da843ae117684c2a15d5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Models/exclude.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-jp/RaytracedHardShadow/bbba12aaf3e7c6fb1c198746ef9a0fcf408b79b9/SamplesUniversalRP~/PrimitiveObjects/Models/exclude.fbx -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/PrimitiveObjectsScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc264401f731c874a87a4cd1181436e4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b29bf0592b0e2b4ab22ab87cbdb34a0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Shaders/VisualizeShadowBuffer.shader: -------------------------------------------------------------------------------- 1 | Shader "UTJ/Raytraced Hard Shadow/Visualize Shadow Buffer" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType" = "Opaque" } 10 | 11 | Pass 12 | { 13 | CGPROGRAM 14 | #pragma only_renderers d3d11 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | struct ia_out 20 | { 21 | float4 vertex : POSITION; 22 | float2 uv : TEXCOORD0; 23 | }; 24 | struct vs_out 25 | { 26 | float4 vertex : SV_POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | Texture2D _MainTex; 31 | float4 _MainTex_TexelSize; 32 | 33 | vs_out vert(ia_out v) 34 | { 35 | vs_out o; 36 | o.vertex = UnityObjectToClipPos(v.vertex); 37 | o.uv = v.uv; 38 | return o; 39 | } 40 | 41 | float4 frag(vs_out i) : SV_Target 42 | { 43 | float2 uv = (1.0f.xx - i.uv) * _MainTex_TexelSize.zw; 44 | 45 | float r = _MainTex[uv].x; 46 | return float4(r, r, r, 1.0f); 47 | } 48 | ENDCG 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/Shaders/VisualizeShadowBuffer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b279ee8437e98740800879ba9f2b654 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/ShadowBuffer.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: ShadowBuffer 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | serializedVersion: 3 16 | m_Width: 1920 17 | m_Height: 1080 18 | m_AntiAliasing: 1 19 | m_DepthFormat: 0 20 | m_ColorFormat: 5 21 | m_MipMap: 0 22 | m_GenerateMips: 1 23 | m_SRGB: 0 24 | m_UseDynamicScale: 0 25 | m_BindMS: 0 26 | m_EnableCompatibleFormat: 1 27 | m_TextureSettings: 28 | serializedVersion: 2 29 | m_FilterMode: 1 30 | m_Aniso: 0 31 | m_MipBias: 0 32 | m_WrapU: 1 33 | m_WrapV: 1 34 | m_WrapW: 1 35 | m_Dimension: 2 36 | m_VolumeDepth: 1 37 | -------------------------------------------------------------------------------- /SamplesUniversalRP~/PrimitiveObjects/ShadowBuffer.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea5ae761ee3d4504f9064584797f67eb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7a23ca7ff5a1049b930a9d937506e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/.sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName":"Primitive Objects", 3 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 4 | "createSeparatePackage": false 5 | } 6 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30d8eadb777c71945ade75e778965f28 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VisualizeShadowBuffer 11 | m_Shader: {fileID: 4800000, guid: 0b279ee8437e98740800879ba9f2b654, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 8400000, guid: ea5ae761ee3d4504f9064584797f67eb, type: 2} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Materials/VisualizeShadowBuffer.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e47d6dcaee991e249810a426faa70067 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 326012386721da843ae117684c2a15d5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Models/exclude.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unity3d-jp/RaytracedHardShadow/bbba12aaf3e7c6fb1c198746ef9a0fcf408b79b9/Samples~/PrimitiveObjects/Models/exclude.fbx -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/PrimitiveObjectsScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc264401f731c874a87a4cd1181436e4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b29bf0592b0e2b4ab22ab87cbdb34a0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Shaders/VisualizeShadowBuffer.shader: -------------------------------------------------------------------------------- 1 | Shader "UTJ/Raytraced Hard Shadow/Visualize Shadow Buffer" 2 | { 3 | Properties 4 | { 5 | _MainTex("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType" = "Opaque" } 10 | 11 | Pass 12 | { 13 | CGPROGRAM 14 | #pragma only_renderers d3d11 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | struct ia_out 20 | { 21 | float4 vertex : POSITION; 22 | float2 uv : TEXCOORD0; 23 | }; 24 | struct vs_out 25 | { 26 | float4 vertex : SV_POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | Texture2D _MainTex; 31 | float4 _MainTex_TexelSize; 32 | 33 | vs_out vert(ia_out v) 34 | { 35 | vs_out o; 36 | o.vertex = UnityObjectToClipPos(v.vertex); 37 | o.uv = v.uv; 38 | return o; 39 | } 40 | 41 | float4 frag(vs_out i) : SV_Target 42 | { 43 | float2 uv = (1.0f.xx - i.uv) * _MainTex_TexelSize.zw; 44 | 45 | float r = _MainTex[uv].x; 46 | return float4(r, r, r, 1.0f); 47 | } 48 | ENDCG 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/Shaders/VisualizeShadowBuffer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b279ee8437e98740800879ba9f2b654 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/ShadowBuffer.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: ShadowBuffer 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_ForcedFallbackFormat: 4 14 | m_DownscaleFallback: 0 15 | serializedVersion: 3 16 | m_Width: 1920 17 | m_Height: 1080 18 | m_AntiAliasing: 1 19 | m_DepthFormat: 0 20 | m_ColorFormat: 5 21 | m_MipMap: 0 22 | m_GenerateMips: 1 23 | m_SRGB: 0 24 | m_UseDynamicScale: 0 25 | m_BindMS: 0 26 | m_EnableCompatibleFormat: 1 27 | m_TextureSettings: 28 | serializedVersion: 2 29 | m_FilterMode: 1 30 | m_Aniso: 0 31 | m_MipBias: 0 32 | m_WrapU: 1 33 | m_WrapV: 1 34 | m_WrapW: 1 35 | m_Dimension: 2 36 | m_VolumeDepth: 1 37 | -------------------------------------------------------------------------------- /Samples~/PrimitiveObjects/ShadowBuffer.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea5ae761ee3d4504f9064584797f67eb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 380a5a31f405f403fb1339bf89ec12f4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 882cf9f7ae3ae41389ab45b7dcf1a58d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/PluginTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using UnityEngine.Windows; 3 | 4 | namespace Unity.RaytracedHardShadow.EditorTests { 5 | 6 | internal class PluginTests { 7 | 8 | [Test] 9 | public void CheckPluginExist() { 10 | const string PATH = "Packages/com.unity.raytracedhardshadow/Runtime/Plugins/x86_64/rths.dll"; 11 | Assert.True(File.Exists(PATH)); 12 | } 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/Editor/PluginTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f2239ff7bc647329766d2ce4d67d66 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Unity.RaytracedHardShadow.EditorTests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.RaytracedHardShadow.EditorTests", 3 | "references": [ 4 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 5 | "GUID:0acc523941302664db1f4e527237feb3" 6 | ], 7 | "includePlatforms": [ 8 | "Editor", 9 | "WindowsStandalone64" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [ 15 | "nunit.framework.dll" 16 | ], 17 | "autoReferenced": false, 18 | "defineConstraints": [ 19 | "UNITY_INCLUDE_TESTS" 20 | ], 21 | "versionDefines": [], 22 | "noEngineReferences": false 23 | } -------------------------------------------------------------------------------- /Tests/Editor/Unity.RaytracedHardShadow.EditorTests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 727ecdd9f885343fb9b5beeae9f4b6b0 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Tests/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41be7a8da2f3d1d4aa8b79ba6a5988f2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Runtime/RTHSAPITest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace Unity.RaytracedHardShadow.Tests { 4 | internal class RTHSAPITest { 5 | [Test] 6 | public void RTHSInitialization() { 7 | rthsRenderer renderer = rthsRenderer.Create(); 8 | renderer.Release(); 9 | } 10 | } 11 | 12 | } // end namespace 13 | -------------------------------------------------------------------------------- /Tests/Runtime/RTHSAPITest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a83755c14a508114eb22ce31b040b063 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Runtime/Unity.RaytracedHardShadow.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.RaytracedHardShadow.Tests", 3 | "references": [ 4 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 5 | "GUID:0acc523941302664db1f4e527237feb3", 6 | "GUID:d2f2fdafbf2b25e46bd82c9abb25947d" 7 | ], 8 | "includePlatforms": [ 9 | "Editor", 10 | "WindowsStandalone64" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": true, 15 | "precompiledReferences": [ 16 | "nunit.framework.dll" 17 | ], 18 | "autoReferenced": false, 19 | "defineConstraints": [ 20 | "UNITY_INCLUDE_TESTS" 21 | ], 22 | "versionDefines": [], 23 | "noEngineReferences": false 24 | } -------------------------------------------------------------------------------- /Tests/Runtime/Unity.RaytracedHardShadow.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e0a13baacc764440913196275950603 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.unity.raytracedhardshadow", 3 | "displayName": "Raytraced Hard Shadow", 4 | "version": "0.6.0-preview", 5 | "unity": "2019.4", 6 | "description": "DXR based pixel-precise hard shadow. primarily intended to use with toon shader.\nDXR-capable system is required. Specifically, Windows 10 version 1803 (April 2018 Update) or newer with GeForce 1070 or newer NVIDIA video card. As of July 2019, no video cards except NVIDIA supports DXR.", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/unity3d-jp/RaytracedHardShadow.git" 10 | }, 11 | 12 | "samples": [ 13 | 14 | { 15 | "displayName": "Primitive Objects", 16 | "description": "A sample scene with primitive objects, which uses DirectX Raytracing (DXR) Hard Shadow", 17 | "path": "Samples~/PrimitiveObjects" 18 | } 19 | ], 20 | "contributors": [ 21 | "Seiya Ishibashi (https://github.com/i-saint)", 22 | "Sindharta Tanuwijaya (https://github.com/sindharta)", 23 | "Toshiyuki Mori (https://github.com/higeometry)" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfbf6b086b50b7e43a01653fe639b3e1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------