├── .gitattributes ├── .gitignore ├── Assets ├── Demo.meta ├── Demo │ ├── Materials.meta │ ├── Materials │ │ ├── Background.mat │ │ ├── Background.mat.meta │ │ ├── part1.mat │ │ ├── part1.mat.meta │ │ ├── part2.mat │ │ ├── part2.mat.meta │ │ ├── part3.mat │ │ ├── part3.mat.meta │ │ ├── part4.mat │ │ └── part4.mat.meta │ ├── Meshes.meta │ ├── Meshes │ │ ├── lowpoly.fbx │ │ └── lowpoly.fbx.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Scene1.unity │ │ └── Scene1.unity.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── GGX.shader │ │ └── GGX.shader.meta │ ├── Textures.meta │ └── Textures │ │ ├── Environments.meta │ │ ├── Environments │ │ ├── prefiltered2.asset │ │ └── prefiltered2.asset.meta │ │ ├── Normals.meta │ │ └── Normals │ │ ├── lowpoly_Material.001_Normal.png │ │ ├── lowpoly_Material.001_Normal.png.meta │ │ ├── lowpoly_Material.002_Normal.png │ │ ├── lowpoly_Material.002_Normal.png.meta │ │ ├── lowpoly_Material.003_Normal.png │ │ ├── lowpoly_Material.003_Normal.png.meta │ │ ├── lowpoly_Material_Normal.png │ │ └── lowpoly_Material_Normal.png.meta ├── Prefiltering.meta ├── Prefiltering │ ├── Editor.meta │ ├── Editor │ │ ├── EnvMapEditor.cs │ │ └── EnvMapEditor.cs.meta │ ├── Shaders.meta │ └── Shaders │ │ ├── EnvMapPrefilter_GGX.shader │ │ ├── EnvMapPrefilter_GGX.shader.meta │ │ ├── EnvMapPrefilter_Phong.shader │ │ ├── EnvMapPrefilter_Phong.shader.meta │ │ ├── EnvMapShader.shader │ │ ├── EnvMapShader.shader.meta │ │ ├── PrefilterCommon.cginc │ │ └── PrefilterCommon.cginc.meta ├── ggx_brdf.asset └── ggx_brdf.asset.meta ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── docs ├── LICENSE.md ├── README.md ├── banner.png └── envmapeditor.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /.hg/ 8 | 9 | # Visual Studio 2015 cache directory 10 | /.vs/ 11 | 12 | # Autogenerated VS/MD/Consulo solution and project files 13 | ExportedObj/ 14 | .consulo/ 15 | *.csproj 16 | *.unityproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.booproj 24 | *.svd 25 | *.pdb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | .hgignore 37 | -------------------------------------------------------------------------------- /Assets/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 378905835908065468f7060916a171b2 3 | folderAsset: yes 4 | timeCreated: 1519596481 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c986984cf6d7de4fb5e1954d237f7e6 3 | folderAsset: yes 4 | timeCreated: 1492548450 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/Background.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Background 10 | m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _Tex: 58 | m_Texture: {fileID: 8900000, guid: a151d4b474eb0cf4aa08c75e6f515d64, type: 2} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Floats: 62 | - _BumpScale: 1 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _Exposure: 1 67 | - _GlossMapScale: 1 68 | - _Glossiness: 0.5 69 | - _GlossyReflections: 1 70 | - _Metallic: 0 71 | - _Mode: 0 72 | - _OcclusionStrength: 1 73 | - _Parallax: 0.02 74 | - _Rotation: 0 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 84 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/Background.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9b2fe79985936244943454081d9755a 3 | timeCreated: 1520116411 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part1.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: part1 10 | m_Shader: {fileID: 4800000, guid: a62344185489f924fa8b614721ababda, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BRDF: 22 | m_Texture: {fileID: 2800000, guid: f63e20ffa698bdc44a45c5ec6086c949, type: 2} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _Envmap: 46 | m_Texture: {fileID: 8900000, guid: a151d4b474eb0cf4aa08c75e6f515d64, type: 2} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MainTex: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _MetalSmooth: 54 | m_Texture: {fileID: 2800000, guid: c8b5d2759d390d84e8e7e87d92a77e4a, type: 3} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _MetallicGlossMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _NormalMap: 62 | m_Texture: {fileID: 2800000, guid: 979794877c66d574397401bf288f9e2b, type: 3} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _OcclusionMap: 66 | m_Texture: {fileID: 0} 67 | m_Scale: {x: 1, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _ParallaxMap: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - _Smooth: 74 | m_Texture: {fileID: 2800000, guid: 22939c9698a75cd4b9879bf511de993d, type: 3} 75 | m_Scale: {x: 1, y: 1} 76 | m_Offset: {x: 0, y: 0} 77 | m_Floats: 78 | - _BumpScale: 1 79 | - _Cutoff: 0.5 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _Metallic: 0 86 | - _Metalness: 0.13 87 | - _Mode: 0 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _Roughness: 0.016 91 | - _SmoothnessTextureChannel: 0 92 | - _SpecularHighlights: 1 93 | - _SrcBlend: 1 94 | - _UVSec: 0 95 | - _ZWrite: 1 96 | m_Colors: 97 | - _Color: {r: 0.36551714, g: 0, b: 1, a: 1} 98 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 99 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a1163e7247d1a84b8654e93e4ad64d0 3 | timeCreated: 1519497240 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part2.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: part2 10 | m_Shader: {fileID: 4800000, guid: a62344185489f924fa8b614721ababda, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BRDF: 22 | m_Texture: {fileID: 2800000, guid: f63e20ffa698bdc44a45c5ec6086c949, type: 2} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _Envmap: 46 | m_Texture: {fileID: 8900000, guid: a151d4b474eb0cf4aa08c75e6f515d64, type: 2} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MainTex: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _MetalSmooth: 54 | m_Texture: {fileID: 2800000, guid: 4bd7eb72b89f16d498c08e3b6669c929, type: 3} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _MetallicGlossMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _NormalMap: 62 | m_Texture: {fileID: 2800000, guid: e605e242e80ae2f429aacde8aae58c27, type: 3} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _OcclusionMap: 66 | m_Texture: {fileID: 0} 67 | m_Scale: {x: 1, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _ParallaxMap: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - _Smooth: 74 | m_Texture: {fileID: 2800000, guid: 58e575e2ad92cb541980716d1c0bce20, type: 3} 75 | m_Scale: {x: 1, y: 1} 76 | m_Offset: {x: 0, y: 0} 77 | m_Floats: 78 | - _BumpScale: 1 79 | - _Cutoff: 0.5 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _Metallic: 0 86 | - _Metalness: 1 87 | - _Mode: 0 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _Roughness: 0.283 91 | - _SmoothnessTextureChannel: 0 92 | - _SpecularHighlights: 1 93 | - _SrcBlend: 1 94 | - _UVSec: 0 95 | - _ZWrite: 1 96 | m_Colors: 97 | - _Color: {r: 1, g: 1, b: 1, a: 1} 98 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 99 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5563a247962e2784c8e73454c2a0febb 3 | timeCreated: 1519497240 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part3.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: part3 10 | m_Shader: {fileID: 4800000, guid: a62344185489f924fa8b614721ababda, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BRDF: 22 | m_Texture: {fileID: 2800000, guid: f63e20ffa698bdc44a45c5ec6086c949, type: 2} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _Envmap: 46 | m_Texture: {fileID: 8900000, guid: a151d4b474eb0cf4aa08c75e6f515d64, type: 2} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MainTex: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _MetalSmooth: 54 | m_Texture: {fileID: 2800000, guid: fe687ff599d36364b82702f02a19fc38, type: 3} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _MetallicGlossMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _NormalMap: 62 | m_Texture: {fileID: 2800000, guid: 4f25960044fb5384f8758eed5b7d87ab, type: 3} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _OcclusionMap: 66 | m_Texture: {fileID: 0} 67 | m_Scale: {x: 1, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _ParallaxMap: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - _Smooth: 74 | m_Texture: {fileID: 2800000, guid: 435cff7a0c1fb71429fb3516d5d488e4, type: 3} 75 | m_Scale: {x: 1, y: 1} 76 | m_Offset: {x: 0, y: 0} 77 | m_Floats: 78 | - _BumpScale: 1 79 | - _Cutoff: 0.5 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _Metallic: 0 86 | - _Metalness: 0.13 87 | - _Mode: 0 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _Roughness: 0.016 91 | - _SmoothnessTextureChannel: 0 92 | - _SpecularHighlights: 1 93 | - _SrcBlend: 1 94 | - _UVSec: 0 95 | - _ZWrite: 1 96 | m_Colors: 97 | - _Color: {r: 0.36551714, g: 0, b: 1, a: 1} 98 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 99 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part3.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02e9a11dbbb73344ab578573e891ee36 3 | timeCreated: 1519497240 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part4.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: part4 10 | m_Shader: {fileID: 4800000, guid: a62344185489f924fa8b614721ababda, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BRDF: 22 | m_Texture: {fileID: 2800000, guid: f63e20ffa698bdc44a45c5ec6086c949, type: 2} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _Envmap: 46 | m_Texture: {fileID: 8900000, guid: a151d4b474eb0cf4aa08c75e6f515d64, type: 2} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MainTex: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _MetalSmooth: 54 | m_Texture: {fileID: 2800000, guid: 1bd4d26c67e5b47489e0fcef6246edc5, type: 3} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _MetallicGlossMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - _NormalMap: 62 | m_Texture: {fileID: 2800000, guid: 60ae7a6baab8f0f4f864c1b5fe2ce9d3, type: 3} 63 | m_Scale: {x: 1, y: 1} 64 | m_Offset: {x: 0, y: 0} 65 | - _OcclusionMap: 66 | m_Texture: {fileID: 0} 67 | m_Scale: {x: 1, y: 1} 68 | m_Offset: {x: 0, y: 0} 69 | - _ParallaxMap: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - _Smooth: 74 | m_Texture: {fileID: 2800000, guid: 291dc5b67246f5248ae74cdca954107a, type: 3} 75 | m_Scale: {x: 1, y: 1} 76 | m_Offset: {x: 0, y: 0} 77 | m_Floats: 78 | - _BumpScale: 1 79 | - _Cutoff: 0.5 80 | - _DetailNormalMapScale: 1 81 | - _DstBlend: 0 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _Metallic: 0 86 | - _Metalness: 1 87 | - _Mode: 0 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _Roughness: 0.092 91 | - _SmoothnessTextureChannel: 0 92 | - _SpecularHighlights: 1 93 | - _SrcBlend: 1 94 | - _UVSec: 0 95 | - _ZWrite: 1 96 | m_Colors: 97 | - _Color: {r: 0.64705884, g: 0.09039794, b: 0.09039794, a: 1} 98 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 99 | -------------------------------------------------------------------------------- /Assets/Demo/Materials/part4.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b6d487f17f020748b9bf5ec014b03cf 3 | timeCreated: 1519497240 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50fc87d3a3938da47aa5cc57853d8575 3 | folderAsset: yes 4 | timeCreated: 1492548414 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Meshes/lowpoly.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pieroaccardi/Unity_PBR_Prefilter/3e4b33c86b9f78944c042ce61464fe949ed813a7/Assets/Demo/Meshes/lowpoly.fbx -------------------------------------------------------------------------------- /Assets/Demo/Meshes/lowpoly.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 569855f775bc88a4f9fa2ebcfe339589 3 | timeCreated: 1519594721 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 21 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Sphere.001 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | animations: 18 | legacyGenerateAnimations: 4 19 | bakeSimulation: 0 20 | resampleCurves: 1 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | rigImportErrors: 24 | rigImportWarnings: 25 | animationImportErrors: 26 | animationImportWarnings: 27 | animationRetargetingWarnings: 28 | animationDoRetargetingWarnings: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | extraUserProperties: [] 36 | clipAnimations: [] 37 | isReadable: 1 38 | meshes: 39 | lODScreenPercentages: [] 40 | globalScale: 1 41 | meshCompression: 0 42 | addColliders: 0 43 | importVisibility: 1 44 | importBlendShapes: 1 45 | importCameras: 1 46 | importLights: 1 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | optimizeMeshForGPU: 1 51 | keepQuads: 0 52 | weldVertices: 1 53 | secondaryUVAngleDistortion: 8 54 | secondaryUVAreaDistortion: 15.000001 55 | secondaryUVHardAngle: 88 56 | secondaryUVPackMargin: 4 57 | useFileScale: 1 58 | tangentSpace: 59 | normalSmoothAngle: 60 60 | normalImportMode: 0 61 | tangentImportMode: 3 62 | normalCalculationMode: 4 63 | importAnimation: 1 64 | copyAvatar: 0 65 | humanDescription: 66 | serializedVersion: 2 67 | human: [] 68 | skeleton: [] 69 | armTwist: 0.5 70 | foreArmTwist: 0.5 71 | upperLegTwist: 0.5 72 | legTwist: 0.5 73 | armStretch: 0.05 74 | legStretch: 0.05 75 | feetSpacing: 0 76 | rootMotionBoneName: 77 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 78 | hasTranslationDoF: 0 79 | hasExtraRoot: 0 80 | skeletonHasParents: 1 81 | lastHumanDescriptionAvatarSource: {instanceID: 0} 82 | animationType: 0 83 | humanoidOversampling: 1 84 | additionalBone: 0 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9c6d702d37e2214b9812872ee43920a 3 | folderAsset: yes 4 | timeCreated: 1492546988 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/Scene1.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1.1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: e9b2fe79985936244943454081d9755a, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 1 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 112000002, guid: 5f40b1a6857a0724e8dd3c507976297f, 90 | type: 2} 91 | m_UseShadowmask: 0 92 | --- !u!196 &4 93 | NavMeshSettings: 94 | serializedVersion: 2 95 | m_ObjectHideFlags: 0 96 | m_BuildSettings: 97 | serializedVersion: 2 98 | agentTypeID: 0 99 | agentRadius: 0.5 100 | agentHeight: 2 101 | agentSlope: 45 102 | agentClimb: 0.4 103 | ledgeDropHeight: 0 104 | maxJumpAcrossDistance: 0 105 | minRegionArea: 2 106 | manualCellSize: 0 107 | cellSize: 0.16666667 108 | manualTileSize: 0 109 | tileSize: 256 110 | accuratePlacement: 0 111 | m_NavMeshData: {fileID: 0} 112 | --- !u!1 &142711694 113 | GameObject: 114 | m_ObjectHideFlags: 0 115 | m_PrefabParentObject: {fileID: 0} 116 | m_PrefabInternal: {fileID: 0} 117 | serializedVersion: 5 118 | m_Component: 119 | - component: {fileID: 142711698} 120 | - component: {fileID: 142711697} 121 | - component: {fileID: 142711696} 122 | - component: {fileID: 142711695} 123 | m_Layer: 0 124 | m_Name: Plane 125 | m_TagString: Untagged 126 | m_Icon: {fileID: 0} 127 | m_NavMeshLayer: 0 128 | m_StaticEditorFlags: 0 129 | m_IsActive: 1 130 | --- !u!23 &142711695 131 | MeshRenderer: 132 | m_ObjectHideFlags: 0 133 | m_PrefabParentObject: {fileID: 0} 134 | m_PrefabInternal: {fileID: 0} 135 | m_GameObject: {fileID: 142711694} 136 | m_Enabled: 1 137 | m_CastShadows: 1 138 | m_ReceiveShadows: 1 139 | m_MotionVectors: 1 140 | m_LightProbeUsage: 1 141 | m_ReflectionProbeUsage: 1 142 | m_Materials: 143 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 144 | m_StaticBatchInfo: 145 | firstSubMesh: 0 146 | subMeshCount: 0 147 | m_StaticBatchRoot: {fileID: 0} 148 | m_ProbeAnchor: {fileID: 0} 149 | m_LightProbeVolumeOverride: {fileID: 0} 150 | m_ScaleInLightmap: 1 151 | m_PreserveUVs: 1 152 | m_IgnoreNormalsForChartDetection: 0 153 | m_ImportantGI: 0 154 | m_SelectedEditorRenderState: 3 155 | m_MinimumChartSize: 4 156 | m_AutoUVMaxDistance: 0.5 157 | m_AutoUVMaxAngle: 89 158 | m_LightmapParameters: {fileID: 0} 159 | m_SortingLayerID: 0 160 | m_SortingLayer: 0 161 | m_SortingOrder: 0 162 | --- !u!64 &142711696 163 | MeshCollider: 164 | m_ObjectHideFlags: 0 165 | m_PrefabParentObject: {fileID: 0} 166 | m_PrefabInternal: {fileID: 0} 167 | m_GameObject: {fileID: 142711694} 168 | m_Material: {fileID: 0} 169 | m_IsTrigger: 0 170 | m_Enabled: 1 171 | serializedVersion: 2 172 | m_Convex: 0 173 | m_InflateMesh: 0 174 | m_SkinWidth: 0.01 175 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 176 | --- !u!33 &142711697 177 | MeshFilter: 178 | m_ObjectHideFlags: 0 179 | m_PrefabParentObject: {fileID: 0} 180 | m_PrefabInternal: {fileID: 0} 181 | m_GameObject: {fileID: 142711694} 182 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 183 | --- !u!4 &142711698 184 | Transform: 185 | m_ObjectHideFlags: 0 186 | m_PrefabParentObject: {fileID: 0} 187 | m_PrefabInternal: {fileID: 0} 188 | m_GameObject: {fileID: 142711694} 189 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 190 | m_LocalPosition: {x: 0, y: -1.33, z: 0} 191 | m_LocalScale: {x: 0.65692866, y: 0.6569286, z: 0.6569286} 192 | m_Children: [] 193 | m_Father: {fileID: 0} 194 | m_RootOrder: 3 195 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 196 | --- !u!1001 &832244868 197 | Prefab: 198 | m_ObjectHideFlags: 0 199 | serializedVersion: 2 200 | m_Modification: 201 | m_TransformParent: {fileID: 0} 202 | m_Modifications: 203 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 204 | propertyPath: m_LocalPosition.x 205 | value: -0 206 | objectReference: {fileID: 0} 207 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 208 | propertyPath: m_LocalPosition.y 209 | value: 0 210 | objectReference: {fileID: 0} 211 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 212 | propertyPath: m_LocalPosition.z 213 | value: 0 214 | objectReference: {fileID: 0} 215 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 216 | propertyPath: m_LocalRotation.x 217 | value: 0 218 | objectReference: {fileID: 0} 219 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 220 | propertyPath: m_LocalRotation.y 221 | value: -0 222 | objectReference: {fileID: 0} 223 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 224 | propertyPath: m_LocalRotation.z 225 | value: -0 226 | objectReference: {fileID: 0} 227 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 228 | propertyPath: m_LocalRotation.w 229 | value: 1 230 | objectReference: {fileID: 0} 231 | - target: {fileID: 400000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 232 | propertyPath: m_RootOrder 233 | value: 1 234 | objectReference: {fileID: 0} 235 | - target: {fileID: 2300000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 236 | propertyPath: m_Materials.Array.data[3] 237 | value: 238 | objectReference: {fileID: 2100000, guid: 2a1163e7247d1a84b8654e93e4ad64d0, type: 2} 239 | - target: {fileID: 2300000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 240 | propertyPath: m_Materials.Array.data[2] 241 | value: 242 | objectReference: {fileID: 2100000, guid: 5563a247962e2784c8e73454c2a0febb, type: 2} 243 | - target: {fileID: 2300000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 244 | propertyPath: m_Materials.Array.data[1] 245 | value: 246 | objectReference: {fileID: 2100000, guid: 02e9a11dbbb73344ab578573e891ee36, type: 2} 247 | - target: {fileID: 2300000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 248 | propertyPath: m_Materials.Array.data[0] 249 | value: 250 | objectReference: {fileID: 2100000, guid: 3b6d487f17f020748b9bf5ec014b03cf, type: 2} 251 | m_RemovedComponents: [] 252 | m_ParentPrefab: {fileID: 100100000, guid: 569855f775bc88a4f9fa2ebcfe339589, type: 3} 253 | m_IsPrefabParent: 0 254 | --- !u!1 &987419177 255 | GameObject: 256 | m_ObjectHideFlags: 0 257 | m_PrefabParentObject: {fileID: 0} 258 | m_PrefabInternal: {fileID: 0} 259 | serializedVersion: 5 260 | m_Component: 261 | - component: {fileID: 987419182} 262 | - component: {fileID: 987419181} 263 | - component: {fileID: 987419180} 264 | - component: {fileID: 987419179} 265 | - component: {fileID: 987419178} 266 | m_Layer: 0 267 | m_Name: Main Camera 268 | m_TagString: MainCamera 269 | m_Icon: {fileID: 0} 270 | m_NavMeshLayer: 0 271 | m_StaticEditorFlags: 0 272 | m_IsActive: 1 273 | --- !u!81 &987419178 274 | AudioListener: 275 | m_ObjectHideFlags: 0 276 | m_PrefabParentObject: {fileID: 0} 277 | m_PrefabInternal: {fileID: 0} 278 | m_GameObject: {fileID: 987419177} 279 | m_Enabled: 1 280 | --- !u!124 &987419179 281 | Behaviour: 282 | m_ObjectHideFlags: 0 283 | m_PrefabParentObject: {fileID: 0} 284 | m_PrefabInternal: {fileID: 0} 285 | m_GameObject: {fileID: 987419177} 286 | m_Enabled: 1 287 | --- !u!92 &987419180 288 | Behaviour: 289 | m_ObjectHideFlags: 0 290 | m_PrefabParentObject: {fileID: 0} 291 | m_PrefabInternal: {fileID: 0} 292 | m_GameObject: {fileID: 987419177} 293 | m_Enabled: 1 294 | --- !u!20 &987419181 295 | Camera: 296 | m_ObjectHideFlags: 0 297 | m_PrefabParentObject: {fileID: 0} 298 | m_PrefabInternal: {fileID: 0} 299 | m_GameObject: {fileID: 987419177} 300 | m_Enabled: 1 301 | serializedVersion: 2 302 | m_ClearFlags: 1 303 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 304 | m_NormalizedViewPortRect: 305 | serializedVersion: 2 306 | x: 0 307 | y: 0 308 | width: 1 309 | height: 1 310 | near clip plane: 0.3 311 | far clip plane: 1000 312 | field of view: 60 313 | orthographic: 0 314 | orthographic size: 5 315 | m_Depth: -1 316 | m_CullingMask: 317 | serializedVersion: 2 318 | m_Bits: 4294967295 319 | m_RenderingPath: 1 320 | m_TargetTexture: {fileID: 0} 321 | m_TargetDisplay: 0 322 | m_TargetEye: 3 323 | m_HDR: 0 324 | m_AllowMSAA: 1 325 | m_ForceIntoRT: 0 326 | m_OcclusionCulling: 1 327 | m_StereoConvergence: 10 328 | m_StereoSeparation: 0.022 329 | m_StereoMirrorMode: 0 330 | --- !u!4 &987419182 331 | Transform: 332 | m_ObjectHideFlags: 0 333 | m_PrefabParentObject: {fileID: 0} 334 | m_PrefabInternal: {fileID: 0} 335 | m_GameObject: {fileID: 987419177} 336 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 337 | m_LocalPosition: {x: 0, y: 1, z: -10} 338 | m_LocalScale: {x: 1, y: 1, z: 1} 339 | m_Children: [] 340 | m_Father: {fileID: 0} 341 | m_RootOrder: 0 342 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 343 | --- !u!1 &990885158 344 | GameObject: 345 | m_ObjectHideFlags: 0 346 | m_PrefabParentObject: {fileID: 0} 347 | m_PrefabInternal: {fileID: 0} 348 | serializedVersion: 5 349 | m_Component: 350 | - component: {fileID: 990885160} 351 | - component: {fileID: 990885159} 352 | m_Layer: 0 353 | m_Name: Directional light 354 | m_TagString: Untagged 355 | m_Icon: {fileID: 0} 356 | m_NavMeshLayer: 0 357 | m_StaticEditorFlags: 0 358 | m_IsActive: 1 359 | --- !u!108 &990885159 360 | Light: 361 | m_ObjectHideFlags: 0 362 | m_PrefabParentObject: {fileID: 0} 363 | m_PrefabInternal: {fileID: 0} 364 | m_GameObject: {fileID: 990885158} 365 | m_Enabled: 1 366 | serializedVersion: 8 367 | m_Type: 1 368 | m_Color: {r: 1, g: 1, b: 1, a: 1} 369 | m_Intensity: 1 370 | m_Range: 10 371 | m_SpotAngle: 30 372 | m_CookieSize: 10 373 | m_Shadows: 374 | m_Type: 2 375 | m_Resolution: -1 376 | m_CustomResolution: -1 377 | m_Strength: 0.869 378 | m_Bias: 0.05 379 | m_NormalBias: 0.4 380 | m_NearPlane: 0.2 381 | m_Cookie: {fileID: 0} 382 | m_DrawHalo: 0 383 | m_Flare: {fileID: 0} 384 | m_RenderMode: 1 385 | m_CullingMask: 386 | serializedVersion: 2 387 | m_Bits: 4294967295 388 | m_Lightmapping: 4 389 | m_AreaSize: {x: 1, y: 1} 390 | m_BounceIntensity: 1 391 | m_ColorTemperature: 6570 392 | m_UseColorTemperature: 0 393 | m_ShadowRadius: 0 394 | m_ShadowAngle: 0 395 | --- !u!4 &990885160 396 | Transform: 397 | m_ObjectHideFlags: 0 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 0} 400 | m_GameObject: {fileID: 990885158} 401 | m_LocalRotation: {x: 0.53601056, y: -0.68491715, z: 0.47090462, w: 0.14774996} 402 | m_LocalPosition: {x: 0.8, y: -7.1775026, z: -10.906817} 403 | m_LocalScale: {x: 1, y: 1, z: 1} 404 | m_Children: [] 405 | m_Father: {fileID: 0} 406 | m_RootOrder: 2 407 | m_LocalEulerAnglesHint: {x: 53.461002, y: -210.528, z: -91.744} 408 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/Scene1.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9c739ff0279a62459470c3e75c50e5c 3 | timeCreated: 1492546997 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14b885e5eda04b047930a4a6e354f606 3 | folderAsset: yes 4 | timeCreated: 1492549417 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Shaders/GGX.shader: -------------------------------------------------------------------------------- 1 | Shader "PBR/GGX" 2 | { 3 | Properties 4 | { 5 | _Color("Color", Color) = (0, 0, 0, 1) 6 | _NormalMap("Normal Map", 2D) = "white" {} 7 | _Roughness("Roughness", Range(0, 1)) = 0 8 | _Metalness("Metalness", Range(0, 1)) = 0.04 9 | _Envmap("Envmap", Cube) = "white" {} 10 | _BRDF("BRDF", 2D) = "white" {} 11 | } 12 | SubShader 13 | { 14 | Tags{ "RenderType" = "Opaque" "LightMode" = "ForwardBase" } 15 | LOD 100 16 | 17 | Pass 18 | { 19 | CGPROGRAM 20 | #pragma vertex vert 21 | #pragma fragment frag 22 | #pragma multi_compile_fwdadd_fullshadows 23 | 24 | #include "UnityCG.cginc" 25 | #include "AutoLight.cginc" 26 | 27 | struct appdata 28 | { 29 | float4 vertex : POSITION; 30 | float2 uv : TEXCOORD0; 31 | float3 normal : NORMAL; 32 | float4 tangent : TANGENT; 33 | }; 34 | 35 | struct v2f 36 | { 37 | float4 pos : SV_POSITION; 38 | float2 uv : TEXCOORD0; 39 | float4 world_pos : TEXCOORD1; 40 | float3 world_normal : TEXCOORD2; 41 | float4 world_tangent : TEXCOORD3; 42 | LIGHTING_COORDS(4, 5) 43 | }; 44 | 45 | sampler2D _NormalMap; 46 | samplerCUBE _Envmap; 47 | sampler2D _BRDF; 48 | 49 | float4 _Color; 50 | float _Roughness; 51 | float _Metalness; 52 | 53 | v2f vert(appdata v) 54 | { 55 | v2f o; 56 | o.pos = UnityObjectToClipPos(v.vertex); 57 | o.uv = v.uv; 58 | 59 | o.world_normal = UnityObjectToWorldNormal(v.normal); 60 | o.world_tangent = float4(UnityObjectToWorldDir(v.tangent), v.tangent.w); 61 | 62 | o.world_pos = mul(unity_ObjectToWorld, v.vertex); 63 | 64 | TRANSFER_VERTEX_TO_FRAGMENT(o); 65 | 66 | return o; 67 | } 68 | 69 | fixed4 frag(v2f i) : SV_Target 70 | { 71 | //VECTORS 72 | float3 vertexN = normalize(i.world_normal); 73 | float3 T = normalize(i.world_tangent); 74 | float3 B = cross(vertexN, T) * i.world_tangent.w; 75 | float3x3 worldToTangent = float3x3(T, B, vertexN); 76 | float3 tangentN = UnpackNormal(tex2D(_NormalMap, i.uv)); 77 | float3 N = mul(tangentN, worldToTangent); 78 | float3 V = normalize(_WorldSpaceCameraPos.xyz - i.world_pos); 79 | float3 R = reflect(-V, N); 80 | 81 | //DOTS 82 | float NdotV = saturate(dot(N, V)); 83 | 84 | //INDIRECT SPECULAR 85 | float2 brdfUV = float2(NdotV, _Roughness); 86 | float2 preBRDF = tex2D(_BRDF, brdfUV).xy; 87 | 88 | float4 indirectSpecular = texCUBElod(_Envmap, float4(R, _Roughness * 5)) * (_Metalness * preBRDF.x + preBRDF.y); 89 | 90 | //INDIRECT DIFFUSE 91 | float atten = LIGHT_ATTENUATION(i); 92 | float lambert = saturate(max(0, dot(N, _WorldSpaceLightPos0)) * atten); 93 | float4 indirectDiffuse = texCUBElod(_Envmap, float4(N, 5)) * _Color * lambert; 94 | 95 | //FRESNEL FACTOR 96 | float VdotH5 = pow(1.0f - NdotV, 5); 97 | float F = _Metalness + (1.0f - _Metalness) * VdotH5; 98 | 99 | return lerp(indirectDiffuse, indirectSpecular, F); 100 | } 101 | 102 | ENDCG 103 | } 104 | } 105 | 106 | FallBack "Diffuse" 107 | } 108 | -------------------------------------------------------------------------------- /Assets/Demo/Shaders/GGX.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a62344185489f924fa8b614721ababda 3 | timeCreated: 1519503605 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da3021abfe8cf084e814ac00524d3ae1 3 | folderAsset: yes 4 | timeCreated: 1492546863 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Environments.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee8cacf5713890c438c6ad73ff599f0e 3 | folderAsset: yes 4 | timeCreated: 1519855776 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Environments/prefiltered2.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a151d4b474eb0cf4aa08c75e6f515d64 3 | timeCreated: 1520115247 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 8900000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 363bc326928f1b244ae9405d20c2f9b5 3 | folderAsset: yes 4 | timeCreated: 1519594985 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.001_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pieroaccardi/Unity_PBR_Prefilter/3e4b33c86b9f78944c042ce61464fe949ed813a7/Assets/Demo/Textures/Normals/lowpoly_Material.001_Normal.png -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.001_Normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e605e242e80ae2f429aacde8aae58c27 3 | timeCreated: 1519594845 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 1 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | spritePackingTag: 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.002_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pieroaccardi/Unity_PBR_Prefilter/3e4b33c86b9f78944c042ce61464fe949ed813a7/Assets/Demo/Textures/Normals/lowpoly_Material.002_Normal.png -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.002_Normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f25960044fb5384f8758eed5b7d87ab 3 | timeCreated: 1519594845 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 1 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | spritePackingTag: 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.003_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pieroaccardi/Unity_PBR_Prefilter/3e4b33c86b9f78944c042ce61464fe949ed813a7/Assets/Demo/Textures/Normals/lowpoly_Material.003_Normal.png -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material.003_Normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60ae7a6baab8f0f4f864c1b5fe2ce9d3 3 | timeCreated: 1519594845 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 1 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | spritePackingTag: 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pieroaccardi/Unity_PBR_Prefilter/3e4b33c86b9f78944c042ce61464fe949ed813a7/Assets/Demo/Textures/Normals/lowpoly_Material_Normal.png -------------------------------------------------------------------------------- /Assets/Demo/Textures/Normals/lowpoly_Material_Normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 979794877c66d574397401bf288f9e2b 3 | timeCreated: 1519594845 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 1 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | - buildTarget: Standalone 67 | maxTextureSize: 2048 68 | textureFormat: -1 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | spritePackingTag: 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Prefiltering.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd464021a54618c4fb8bc307d6901826 3 | folderAsset: yes 4 | timeCreated: 1519596328 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3fffbd7133c87e4899cbe3c9fc6f7fa 3 | folderAsset: yes 4 | timeCreated: 1493586018 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Editor/EnvMapEditor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Rendering; 5 | using UnityEditor; 6 | 7 | public enum PotSize 8 | { 9 | _16 = 16, 10 | _32 = 32, 11 | _64 = 64, 12 | _128 = 128, 13 | _256 = 256, 14 | _512 = 512, 15 | _1024 = 1024, 16 | _2048 = 2048, 17 | _4096 = 4096 18 | } 19 | 20 | public enum BRDF 21 | { 22 | Phong, 23 | GGX 24 | } 25 | 26 | public class EnvMapEditor : EditorWindow 27 | { 28 | [MenuItem("Window/EnvMap")] 29 | public static void ShowWindow() 30 | { 31 | EditorWindow.GetWindow(typeof(EnvMapEditor)); 32 | } 33 | 34 | //PUBLIC FIELDS 35 | public Cubemap input_cubemap; 36 | public RenderTextureFormat output_format; 37 | public PotSize output_size = PotSize._1024; 38 | public bool output_srgb = true; 39 | public BRDF brdf; 40 | public float startAlpha; 41 | public float alphaMipDrop; 42 | 43 | //PRIVATE FIELDS 44 | private string prefiltered_name = ""; 45 | private int view_mip = 0; 46 | private int num_mips = 0; 47 | private Material view_mat; 48 | private RenderTexture output_cubemap; 49 | 50 | private SerializedObject so; 51 | private SerializedProperty sp_input_cubemap; 52 | private SerializedProperty sp_output_format; 53 | private SerializedProperty sp_output_size; 54 | private SerializedProperty sp_output_srgb; 55 | private SerializedProperty sp_brdf; 56 | private SerializedProperty sp_startAlpha; 57 | private SerializedProperty sp_alphaMipDrop; 58 | 59 | //PRIVATE METHODS 60 | private void Awake() 61 | { 62 | Initialize(); 63 | } 64 | 65 | private void OnFocus() 66 | { 67 | Initialize(); 68 | } 69 | 70 | private void Initialize() 71 | { 72 | so = new SerializedObject(this); 73 | sp_input_cubemap = so.FindProperty("input_cubemap"); 74 | sp_output_format = so.FindProperty("output_format"); 75 | sp_output_size = so.FindProperty("output_size"); 76 | sp_output_srgb = so.FindProperty("output_srgb"); 77 | sp_brdf = so.FindProperty("brdf"); 78 | sp_startAlpha = so.FindProperty("startAlpha"); 79 | sp_alphaMipDrop = so.FindProperty("alphaMipDrop"); 80 | } 81 | 82 | //Convert a RenderTextureFormat to TextureFormat 83 | private TextureFormat ConvertFormat(RenderTextureFormat input_format) 84 | { 85 | TextureFormat output_format = TextureFormat.RGBA32; 86 | 87 | switch (input_format) 88 | { 89 | case RenderTextureFormat.ARGB32: 90 | output_format = TextureFormat.RGBA32; 91 | break; 92 | 93 | case RenderTextureFormat.ARGBHalf: 94 | output_format = TextureFormat.RGBAHalf; 95 | break; 96 | 97 | case RenderTextureFormat.ARGBFloat: 98 | output_format = TextureFormat.RGBAFloat; 99 | break; 100 | 101 | default: 102 | string format_string = System.Enum.GetName(typeof(RenderTextureFormat), input_format); 103 | int format_int = (int)System.Enum.Parse(typeof(TextureFormat), format_string); 104 | output_format = (TextureFormat)format_int; 105 | break; 106 | } 107 | 108 | return output_format; 109 | } 110 | 111 | private void OnGUI() 112 | { 113 | //input section 114 | EditorGUILayout.Space(); 115 | 116 | EditorGUILayout.PropertyField(sp_input_cubemap); 117 | 118 | //input texture info 119 | if (input_cubemap != null) 120 | { 121 | string info = input_cubemap.width.ToString() + "x" + input_cubemap.height.ToString() + " " + input_cubemap.format.ToString(); 122 | EditorGUILayout.LabelField(info); 123 | } 124 | 125 | EditorGUILayout.Space(); 126 | EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); 127 | EditorGUILayout.Space(); 128 | 129 | EditorGUILayout.PropertyField(sp_output_size); 130 | EditorGUILayout.PropertyField(sp_output_format); 131 | EditorGUILayout.PropertyField(sp_output_srgb); 132 | EditorGUILayout.PropertyField(sp_brdf); 133 | 134 | if (brdf == BRDF.Phong) 135 | { 136 | EditorGUILayout.PropertyField(sp_startAlpha); 137 | EditorGUILayout.PropertyField(sp_alphaMipDrop); 138 | } 139 | 140 | so.ApplyModifiedProperties(); 141 | 142 | 143 | //prefilter section 144 | GUI.enabled = input_cubemap != null; 145 | 146 | if (GUILayout.Button("Prefilter")) 147 | { 148 | num_mips = Mathf.Min(6, 1 + (int)Mathf.Log((float)((int)output_size), 2)); //max 6 mipmaps 149 | 150 | input_cubemap.filterMode = FilterMode.Trilinear; 151 | input_cubemap.wrapMode = TextureWrapMode.Clamp; 152 | 153 | input_cubemap.SmoothEdges(); 154 | 155 | RenderTextureDescriptor rtd = new RenderTextureDescriptor(); 156 | rtd.autoGenerateMips = false; 157 | rtd.colorFormat = output_format; 158 | rtd.depthBufferBits = 0; 159 | rtd.dimension = TextureDimension.Cube; 160 | rtd.enableRandomWrite = false; 161 | rtd.height = (int)output_size; 162 | rtd.memoryless = RenderTextureMemoryless.None; 163 | rtd.msaaSamples = 1; 164 | rtd.shadowSamplingMode = ShadowSamplingMode.None; 165 | rtd.sRGB = output_srgb; 166 | rtd.useMipMap = true; 167 | rtd.volumeDepth = 1; 168 | rtd.width = (int)output_size; 169 | 170 | output_cubemap = new RenderTexture(rtd); 171 | output_cubemap.filterMode = FilterMode.Trilinear; 172 | output_cubemap.wrapMode = TextureWrapMode.Clamp; 173 | 174 | CommandBuffer cb = new CommandBuffer(); 175 | 176 | Material mat = null; 177 | 178 | if (brdf == BRDF.Phong) 179 | mat = new Material(Shader.Find("PBR/EnvMapPrefilter_Phong")); 180 | else if (brdf == BRDF.GGX) 181 | mat = new Material(Shader.Find("PBR/EnvMapPrefilter_GGX")); 182 | 183 | mat.SetTexture("input_envmap", input_cubemap); 184 | mat.SetFloat("_CubeSize", rtd.width); 185 | mat.SetFloat("numLod", num_mips); 186 | 187 | float alpha = startAlpha; 188 | if (brdf == BRDF.GGX) 189 | alpha = 0.0f; 190 | 191 | //cycle mips and faces 192 | for (int mip = 0; mip < num_mips; ++mip) 193 | { 194 | if (brdf == BRDF.GGX) 195 | { 196 | alpha = mip / (float)(num_mips - 1); 197 | } 198 | 199 | cb.SetGlobalFloat("_Lod", mip); 200 | cb.SetGlobalFloat("alpha", alpha); 201 | 202 | for (int face = 0; face < 6; ++face) 203 | { 204 | cb.SetRenderTarget(output_cubemap, mip, (CubemapFace)face); 205 | cb.SetGlobalFloat("face", face); 206 | cb.DrawProcedural(Matrix4x4.identity, mat, 0, MeshTopology.Triangles, 3); 207 | } 208 | 209 | if (brdf == BRDF.Phong) 210 | { 211 | alpha *= alphaMipDrop; 212 | } 213 | } 214 | Graphics.ExecuteCommandBuffer(cb); 215 | 216 | Object.DestroyImmediate(mat); 217 | } 218 | 219 | //this is for saving the precomputed second term of the splitted sum formula (from the UE4 pbr paper) 220 | if (brdf == BRDF.GGX) 221 | { 222 | if (GUILayout.Button("Save GGX BRDF")) 223 | { 224 | RenderTexture brdf_rt = new RenderTexture(512, 512, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); 225 | brdf_rt.Create(); 226 | Material mat = new Material(Shader.Find("PBR/EnvMapPrefilter_GGX")); 227 | 228 | CommandBuffer cb = new CommandBuffer(); 229 | cb.SetRenderTarget(brdf_rt); 230 | cb.DrawProcedural(Matrix4x4.identity, mat, 1, MeshTopology.Triangles, 3); 231 | 232 | Graphics.ExecuteCommandBuffer(cb); 233 | 234 | Object.DestroyImmediate(mat); 235 | 236 | Texture2D brdf_tex = new Texture2D(512, 512, TextureFormat.RGBAFloat, false, true); 237 | brdf_tex.wrapMode = TextureWrapMode.Clamp; 238 | RenderTexture.active = brdf_rt; 239 | brdf_tex.ReadPixels(new Rect(0, 0, 512, 512), 0, 0); 240 | brdf_tex.Apply(); 241 | 242 | AssetDatabase.CreateAsset(brdf_tex, "Assets/ggx_brdf.asset"); 243 | } 244 | } 245 | 246 | //save section 247 | GUI.enabled = true; 248 | 249 | EditorGUILayout.Space(); 250 | EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); 251 | EditorGUILayout.Space(); 252 | 253 | so.ApplyModifiedProperties(); 254 | 255 | EditorGUILayout.Space(); 256 | 257 | prefiltered_name = EditorGUILayout.TextField("Prefiltered name", prefiltered_name); 258 | bool save_enabled = prefiltered_name != "" && output_cubemap != null; 259 | GUI.enabled = save_enabled; 260 | 261 | if (GUILayout.Button("Save")) 262 | { 263 | int current_size = (int)output_size; 264 | Cubemap asset_to_save = new Cubemap(current_size, ConvertFormat(output_format), true); 265 | asset_to_save.filterMode = FilterMode.Trilinear; 266 | asset_to_save.wrapMode = TextureWrapMode.Clamp; 267 | 268 | RenderTextureDescriptor desc = new RenderTextureDescriptor(); 269 | desc.autoGenerateMips = false; 270 | desc.colorFormat = output_format; 271 | desc.depthBufferBits = 0; 272 | desc.dimension = TextureDimension.Tex2D; 273 | desc.enableRandomWrite = false; 274 | desc.msaaSamples = 1; 275 | desc.sRGB = output_cubemap.sRGB; 276 | desc.useMipMap = true; 277 | desc.volumeDepth = 1; 278 | 279 | //cycle foreach mip level and foreach face 280 | for (int mip = 0; mip < num_mips; ++mip) 281 | { 282 | //need a temporary texture2d and render target 283 | Texture2D tmp_tex = new Texture2D(current_size, current_size, asset_to_save.format, false, output_cubemap.sRGB); 284 | tmp_tex.filterMode = FilterMode.Trilinear; 285 | tmp_tex.wrapMode = TextureWrapMode.Clamp; 286 | 287 | desc.width = desc.height = current_size; 288 | RenderTexture tmp_rt = new RenderTexture(desc); 289 | tmp_rt.filterMode = FilterMode.Trilinear; 290 | tmp_rt.wrapMode = TextureWrapMode.Clamp; 291 | tmp_rt.Create(); 292 | 293 | for (int face = 0; face < 6; ++face) 294 | { 295 | //first copy the selected face for the selected mip into the temporary render target 296 | Graphics.CopyTexture(output_cubemap, face, mip, tmp_rt, 0, 0); 297 | 298 | //then copy from the temporary render target to the temporary texture 2d 299 | RenderTexture.active = tmp_rt; 300 | tmp_tex.ReadPixels(new Rect(0, 0, current_size, current_size), 0, 0, false); 301 | 302 | //then from the temporary texture to the cubemap (all of this workaround is because cubemap class doesn't provide a ReadPixels method) 303 | Color[] colors = tmp_tex.GetPixels(); 304 | Color[] flipped = new Color[colors.Length]; 305 | 306 | //need to flip the y 307 | for (int y = 0; y < current_size; ++y) 308 | { 309 | for (int x = 0; x < current_size; ++x) 310 | { 311 | int flipped_y = current_size - 1 - y; 312 | int src_index = flipped_y * current_size + x; 313 | int dest_index = y * current_size + x; 314 | flipped[dest_index] = colors[src_index]; 315 | } 316 | } 317 | 318 | asset_to_save.SetPixels(flipped, (CubemapFace)face, mip); 319 | } 320 | 321 | current_size /= 2; 322 | } 323 | 324 | asset_to_save.Apply(false); 325 | 326 | asset_to_save.SmoothEdges(10); 327 | 328 | AssetDatabase.CreateAsset(asset_to_save, prefiltered_name); 329 | } 330 | 331 | GUI.enabled = output_cubemap != null; 332 | if (GUILayout.Button("Delete")) 333 | { 334 | output_cubemap.Release(); 335 | Object.DestroyImmediate(output_cubemap); 336 | output_cubemap = null; 337 | } 338 | 339 | //view section 340 | EditorGUILayout.Space(); 341 | EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); 342 | EditorGUILayout.Space(); 343 | 344 | GUI.enabled = output_cubemap != null; 345 | 346 | if (GUILayout.Button("View")) 347 | { 348 | view_mat = new Material(Shader.Find("PBR/EnvMapShader")); 349 | view_mat.SetTexture("_EnvMap", output_cubemap); 350 | view_mat.SetFloat("_LodLevel", view_mip); 351 | 352 | RenderSettings.skybox = view_mat; 353 | } 354 | 355 | EditorGUI.BeginChangeCheck(); 356 | 357 | view_mip = (int)EditorGUILayout.Slider("Mip level", view_mip, 0, num_mips); 358 | 359 | if (EditorGUI.EndChangeCheck()) 360 | { 361 | view_mat.SetFloat("_LodLevel", view_mip); 362 | } 363 | 364 | GUI.enabled = true; 365 | 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Editor/EnvMapEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6aa6c15034c111a4fa5ec98fb2e253bb 3 | timeCreated: 1508962397 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54d19ad6a3a8cc341a4eaf7fe8f7cfb1 3 | folderAsset: yes 4 | timeCreated: 1519596354 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapPrefilter_GGX.shader: -------------------------------------------------------------------------------- 1 | Shader "PBR/EnvMapPrefilter_GGX" 2 | { 3 | SubShader 4 | { 5 | Tags{ "RenderType" = "Opaque" } 6 | LOD 100 7 | 8 | Pass //prefiltering pass 9 | { 10 | CGPROGRAM 11 | 12 | #pragma vertex vert 13 | #pragma fragment frag 14 | 15 | #pragma enable_d3d11_debug_symbols 16 | 17 | #include "UnityCG.cginc" 18 | #include "Assets/Prefiltering/Shaders/PrefilterCommon.cginc" 19 | 20 | struct PS_INPUT 21 | { 22 | float4 Position : SV_POSITION; 23 | float2 UV : TEXCOORD0; 24 | float3 R : TEXCOORD1; 25 | }; 26 | 27 | samplerCUBE input_envmap; 28 | 29 | uint face; 30 | float _CubeSize; 31 | float _Lod; 32 | float numLod; 33 | float alpha; 34 | 35 | PS_INPUT vert(uint index : SV_VERTEXID) 36 | { 37 | PS_INPUT output; 38 | output.UV = float2((index << 1) & 2, index & 2); 39 | output.Position = float4(output.UV * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f); 40 | 41 | //reflection vector 42 | uint n = (uint)(face/ 2); 43 | uint s = face % 2; 44 | float sign = (s == 0) ? 1 : -1; 45 | switch (n) 46 | { 47 | case 0: 48 | output.R.x = sign; 49 | output.R.zy = output.UV * float2(-2 * sign, -2) - float2(-1 * sign, -1); 50 | break; 51 | 52 | case 1: 53 | output.R.y = sign; 54 | output.R.xz = output.UV * float2(2, 2 * sign) - float2(1, 1 * sign); 55 | break; 56 | 57 | case 2: 58 | output.R.z = sign; 59 | output.R.xy = output.UV * float2(2 * sign, -2) - float2(1 * sign, -1); 60 | break; 61 | } 62 | 63 | return output; 64 | } 65 | 66 | fixed4 frag(PS_INPUT input) : SV_Target 67 | { 68 | float3 R = normalize(input.R);// fix_cube_lookup_for_lod(normalize(input.R), _CubeSize, _Lod); 69 | float3 N = R; 70 | float3 V = R; 71 | 72 | float3 prefilteredColor = float3(0, 0, 0); 73 | float totalWeight = 0.0; 74 | 75 | const uint numSamples = 2048; 76 | for (uint i = 0; i < numSamples; ++i) 77 | { 78 | float2 Xi = Hammersley(i, numSamples); 79 | 80 | float3 H = ImportanceGGX(Xi, alpha, N); 81 | float3 L = 2 * dot(V, H) * H - V; 82 | 83 | float NoL = saturate(dot(N, L)); 84 | if (NoL > 0) 85 | { 86 | float NoH = saturate(dot(N, H)); 87 | float HoV = saturate(dot(H, V)); 88 | float NoH2 = NoH * NoH; 89 | float alpha2 = alpha * alpha; 90 | float den = NoH2 * alpha2 + (1.0f - NoH2); 91 | float D = alpha2 / (PI * den * den); 92 | float pdf = (D * NoH / (4 * HoV)) + 0.0001f; 93 | 94 | float saTexel = 4.0f * PI / (6.0f * 1024 * 1024); 95 | float saSample = 1.0f / (numSamples * pdf + 0.00001f); 96 | float mipLevel = alpha == 0.0f ? 0.0f : 0.5f * log2(saSample / saTexel); 97 | 98 | prefilteredColor += texCUBElod(input_envmap, float4(L, mipLevel +1)).rgb * NoL; 99 | totalWeight += NoL; 100 | } 101 | } 102 | 103 | float3 final = prefilteredColor / totalWeight; 104 | return float4(final, 1.0); 105 | } 106 | 107 | ENDCG 108 | } 109 | 110 | Pass //brdf pass 111 | { 112 | Cull Off 113 | ZTest Always 114 | 115 | CGPROGRAM 116 | 117 | #pragma vertex vert 118 | #pragma fragment frag 119 | 120 | #pragma enable_d3d11_debug_symbols 121 | 122 | #include "UnityCG.cginc" 123 | #include "Assets/Prefiltering/Shaders/PrefilterCommon.cginc" 124 | 125 | struct PS_INPUT 126 | { 127 | float4 Position : SV_POSITION; 128 | float2 UV : TEXCOORD0; 129 | }; 130 | 131 | PS_INPUT vert(uint index : SV_VERTEXID) 132 | { 133 | PS_INPUT output; 134 | output.UV = float2((index << 1) & 2, index & 2); 135 | output.Position = float4(output.UV * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f); 136 | return output; 137 | } 138 | 139 | float4 frag(PS_INPUT input) : SV_Target 140 | { 141 | float NoV = input.UV.x; 142 | float alpha = input.UV.y; 143 | 144 | float3 N = float3(0, 0, 1); 145 | float3 V = 0; 146 | V.x = sqrt(1.0f - NoV * NoV); 147 | V.y = 0; 148 | V.z = NoV; 149 | 150 | float A = 0; 151 | float B = 0; 152 | 153 | const uint numSamples = 4096; 154 | for (uint i = 0; i < numSamples; ++i) 155 | { 156 | float2 Xi = Hammersley(i, numSamples); 157 | 158 | float3 H = ImportanceGGX(Xi, alpha, N); 159 | float3 L = 2 * dot(V, H) * H - V; 160 | 161 | float NoL = saturate(L.z); 162 | float NoH = saturate(H.z); 163 | float VoH = saturate(dot(V, H)); 164 | 165 | if (NoL > 0) 166 | { 167 | float k = alpha * alpha * 0.5; 168 | float G1 = NoV / (NoV * (1 - k) + k); 169 | float G2 = NoL / (NoL * (1 - k) + k); 170 | float G = G1 * G2 * VoH / (NoH * NoV); 171 | float fc = pow(1 - VoH, 5); 172 | A += (1 - fc) * G; 173 | B += fc * G; 174 | } 175 | } 176 | 177 | return float4(float2(A, B) / numSamples, 0, 0); 178 | } 179 | 180 | ENDCG 181 | } 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapPrefilter_GGX.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d148fde41a4e0f44ca29b36923257158 3 | timeCreated: 1508965114 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapPrefilter_Phong.shader: -------------------------------------------------------------------------------- 1 | Shader "PBR/EnvMapPrefilter_Phong" 2 | { 3 | SubShader 4 | { 5 | Tags{ "RenderType" = "Opaque" } 6 | LOD 100 7 | 8 | Pass 9 | { 10 | CGPROGRAM 11 | 12 | #pragma vertex vert 13 | #pragma fragment frag 14 | 15 | #pragma enable_d3d11_debug_symbols 16 | 17 | #include "UnityCG.cginc" 18 | 19 | struct PS_INPUT 20 | { 21 | float4 Position : SV_POSITION; 22 | float2 UV : TEXCOORD0; 23 | float3 R : TEXCOORD1; 24 | }; 25 | 26 | samplerCUBE input_envmap; 27 | 28 | uint face; 29 | float _CubeSize; 30 | float _Lod; 31 | float numLod; 32 | float alpha; 33 | 34 | PS_INPUT vert(uint index : SV_VERTEXID) 35 | { 36 | PS_INPUT output; 37 | output.UV = float2((index << 1) & 2, index & 2); 38 | output.Position = float4(output.UV * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f); 39 | 40 | //reflection vector 41 | uint n = (uint)(face/ 2); 42 | uint s = face % 2; 43 | float sign = (s == 0) ? 1 : -1; 44 | switch (n) 45 | { 46 | case 0: 47 | output.R.x = sign; 48 | output.R.zy = output.UV * float2(-2 * sign, -2) - float2(-1 * sign, -1); 49 | break; 50 | 51 | case 1: 52 | output.R.y = sign; 53 | output.R.xz = output.UV * float2(2, 2 * sign) - float2(1, 1 * sign); 54 | break; 55 | 56 | case 2: 57 | output.R.z = sign; 58 | output.R.xy = output.UV * float2(2 * sign, -2) - float2(1 * sign, -1); 59 | break; 60 | } 61 | 62 | return output; 63 | } 64 | 65 | static const float PI = 3.1415926535897932384626433832795; 66 | 67 | float radicalInverse_VdC(uint bits) 68 | { 69 | bits = (bits << 16u) | (bits >> 16u); 70 | bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 71 | bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 72 | bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 73 | bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 74 | 75 | return float(bits) * 2.3283064365386963e-10; // / 0x100000000 76 | } 77 | 78 | float2 Hammersley(uint i, uint n) 79 | { 80 | return float2((float)i / (float)n, radicalInverse_VdC(i)); 81 | } 82 | 83 | float3 ImportancePhong(float2 Xi, float Roughness, float3 R) 84 | { 85 | float Phi = 2 * PI * Xi.x; 86 | float CosTheta = pow(Xi.y, 1.0 / (Roughness + 2)); 87 | float SinTheta = sqrt(1 - CosTheta * CosTheta); 88 | float3 H; 89 | H.x = SinTheta * cos(Phi); 90 | H.y = SinTheta * sin(Phi); 91 | H.z = CosTheta; 92 | float3 UpVector = abs(R.y) < 0.999 ? float3(0, 1, 0) : float3(1, 0, 0); 93 | float3 TangentX = normalize(cross(R, UpVector)); 94 | float3 TangentY = cross(R, TangentX); 95 | return TangentX * H.x + TangentY * H.y + R * H.z; 96 | } 97 | 98 | float3 fix_cube_lookup_for_lod(float3 v, float cube_size, float lod) 99 | { 100 | float M = max(max(abs(v.x), abs(v.y)), abs(v.z)); 101 | float scale = 1 - exp2(lod) / cube_size; 102 | if (abs(v.x) != M) v.x *= scale; 103 | if (abs(v.y) != M) v.y *= scale; 104 | if (abs(v.z) != M) v.z *= scale; 105 | return v; 106 | } 107 | 108 | fixed4 frag(PS_INPUT input) : SV_Target 109 | { 110 | float3 R = fix_cube_lookup_for_lod(input.R, _CubeSize, _Lod); 111 | float3 N = R; 112 | float3 V = R; 113 | 114 | float3 prefilteredColor = float3(0, 0, 0); 115 | 116 | const uint numSamples = 2048; 117 | for (uint i = 0; i < numSamples; ++i) 118 | { 119 | float2 Xi = Hammersley(i, numSamples); 120 | 121 | float3 L = ImportancePhong(Xi, alpha, N); 122 | 123 | prefilteredColor += texCUBE(input_envmap, L).rgb; 124 | } 125 | 126 | float3 final = prefilteredColor / numSamples; 127 | return float4(final, 1.0); 128 | } 129 | 130 | ENDCG 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapPrefilter_Phong.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 498ff431ebf8f71499317c8517af1bf2 3 | timeCreated: 1508965114 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapShader.shader: -------------------------------------------------------------------------------- 1 | Shader "PBR/EnvMapShader" 2 | { 3 | Properties 4 | { 5 | _EnvMap ("Texture", Cube) = "white" {} 6 | _LodLevel("Lod Level", Int) = 0 7 | } 8 | SubShader 9 | { 10 | Tags { "Queue"="Background" } 11 | LOD 100 12 | 13 | Pass 14 | { 15 | ZWrite Off 16 | Cull Off 17 | 18 | CGPROGRAM 19 | #pragma vertex vert 20 | #pragma fragment frag 21 | 22 | #include "UnityCG.cginc" 23 | 24 | struct appdata 25 | { 26 | float4 vertex : POSITION; 27 | float3 uv : TEXCOORD0; 28 | }; 29 | 30 | struct v2f 31 | { 32 | float4 vertex : SV_POSITION; 33 | float3 uv : TEXCOORD0; 34 | }; 35 | 36 | samplerCUBE _EnvMap; 37 | int _LodLevel; 38 | 39 | v2f vert (appdata v) 40 | { 41 | v2f o; 42 | o.vertex = UnityObjectToClipPos(v.vertex); 43 | o.uv = v.uv; 44 | return o; 45 | } 46 | 47 | fixed4 frag (v2f i) : SV_Target 48 | { 49 | return texCUBElod(_EnvMap, float4(i.uv, _LodLevel)); 50 | } 51 | ENDCG 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/EnvMapShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: feacfc8867d64c2478b72f3258ae35c3 3 | timeCreated: 1508962384 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/PrefilterCommon.cginc: -------------------------------------------------------------------------------- 1 | static const float PI = 3.1415926535897932384626433832795; 2 | 3 | float radicalInverse_VdC(uint bits) 4 | { 5 | bits = (bits << 16u) | (bits >> 16u); 6 | bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 7 | bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 8 | bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 9 | bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 10 | 11 | return float(bits) * 2.3283064365386963e-10; // / 0x100000000 12 | } 13 | 14 | float2 Hammersley(uint i, uint n) 15 | { 16 | return float2((float)i / (float)n, radicalInverse_VdC(i)); 17 | } 18 | 19 | float3 ImportanceGGX(float2 Xi, float Roughness, float3 N) 20 | { 21 | float a = Roughness * Roughness; 22 | 23 | float phi = 2.0 * PI * Xi.x; 24 | float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a*a - 1.0) * Xi.y)); 25 | float sinTheta = sqrt(1.0 - cosTheta*cosTheta); 26 | 27 | float3 H; 28 | H.x = cos(phi) * sinTheta; 29 | H.y = sin(phi) * sinTheta; 30 | H.z = cosTheta; 31 | 32 | float3 up = abs(N.z) < 0.999 ? float3(0.0, 0.0, 1.0) : float3(1.0, 0.0, 0.0); 33 | float3 tangent = normalize(cross(up, N)); 34 | float3 bitangent = cross(N, tangent); 35 | 36 | return tangent * H.x + bitangent * H.y + N * H.z; 37 | } 38 | 39 | float3 fix_cube_lookup_for_lod(float3 v, float cube_size, float lod) 40 | { 41 | float M = max(max(abs(v.x), abs(v.y)), abs(v.z)); 42 | float scale = 1 - exp2(lod) / cube_size; 43 | if (abs(v.x) != M) v.x *= scale; 44 | if (abs(v.y) != M) v.y *= scale; 45 | if (abs(v.z) != M) v.z *= scale; 46 | return v; 47 | } -------------------------------------------------------------------------------- /Assets/Prefiltering/Shaders/PrefilterCommon.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8c236f135abb0a478c868a66128da27 3 | timeCreated: 1519423219 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ggx_brdf.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f63e20ffa698bdc44a45c5ec6086c949 3 | timeCreated: 1519857371 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2800000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /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: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 3 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_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 4 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 2 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | m_CollabEditorSettings: 16 | inProgressEnabled: 1 17 | -------------------------------------------------------------------------------- /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 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /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 | m_SettingNames: 89 | - Humanoid 90 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 3 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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AlwaysShowColliders: 0 28 | m_ShowColliderSleep: 1 29 | m_ShowColliderContacts: 0 30 | m_ShowColliderAABB: 0 31 | m_ContactArrowScale: 0.2 32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 37 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | productGUID: daf2767011227c647b636cc493d2cc5e 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 4 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: DefaultCompany 14 | productName: PBR 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 0 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | n3dsDisableStereoscopicView: 0 99 | n3dsEnableSharedListOpt: 1 100 | n3dsEnableVSync: 0 101 | ignoreAlphaClear: 0 102 | xboxOneResolution: 0 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | videoMemoryForVertexBuffers: 0 107 | psp2PowerMode: 0 108 | psp2AcquireBGM: 1 109 | wiiUTVResolution: 0 110 | wiiUGamePadMSAA: 1 111 | wiiUSupportsNunchuk: 0 112 | wiiUSupportsClassicController: 0 113 | wiiUSupportsBalanceBoard: 0 114 | wiiUSupportsMotionPlus: 0 115 | wiiUSupportsProController: 0 116 | wiiUAllowScreenCapture: 1 117 | wiiUControllerCount: 0 118 | m_SupportedAspectRatios: 119 | 4:3: 1 120 | 5:4: 1 121 | 16:10: 1 122 | 16:9: 1 123 | Others: 1 124 | bundleVersion: 1.0 125 | preloadedAssets: [] 126 | metroInputSource: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | hololens: 138 | depthFormat: 1 139 | protectGraphicsMemory: 0 140 | useHDRDisplay: 0 141 | targetPixelDensity: 0 142 | resolutionScalingMode: 0 143 | applicationIdentifier: 144 | Android: com.Company.ProductName 145 | Standalone: unity.DefaultCompany.PBR 146 | Tizen: com.Company.ProductName 147 | iOS: com.Company.ProductName 148 | tvOS: com.Company.ProductName 149 | buildNumber: 150 | iOS: 0 151 | AndroidBundleVersionCode: 1 152 | AndroidMinSdkVersion: 16 153 | AndroidTargetSdkVersion: 0 154 | AndroidPreferredInstallLocation: 1 155 | aotOptions: 156 | stripEngineCode: 1 157 | iPhoneStrippingLevel: 0 158 | iPhoneScriptCallOptimization: 0 159 | ForceInternetPermission: 0 160 | ForceSDCardPermission: 0 161 | CreateWallpaper: 0 162 | APKExpansionFiles: 0 163 | keepLoadedShadersAlive: 0 164 | StripUnusedMeshComponents: 0 165 | VertexChannelCompressionMask: 166 | serializedVersion: 2 167 | m_Bits: 238 168 | iPhoneSdkVersion: 988 169 | iOSTargetOSVersionString: 170 | tvOSSdkVersion: 0 171 | tvOSRequireExtendedGameController: 0 172 | tvOSTargetOSVersionString: 173 | uIPrerenderedIcon: 0 174 | uIRequiresPersistentWiFi: 0 175 | uIRequiresFullScreen: 1 176 | uIStatusBarHidden: 1 177 | uIExitOnSuspend: 0 178 | uIStatusBarStyle: 0 179 | iPhoneSplashScreen: {fileID: 0} 180 | iPhoneHighResSplashScreen: {fileID: 0} 181 | iPhoneTallHighResSplashScreen: {fileID: 0} 182 | iPhone47inSplashScreen: {fileID: 0} 183 | iPhone55inPortraitSplashScreen: {fileID: 0} 184 | iPhone55inLandscapeSplashScreen: {fileID: 0} 185 | iPadPortraitSplashScreen: {fileID: 0} 186 | iPadHighResPortraitSplashScreen: {fileID: 0} 187 | iPadLandscapeSplashScreen: {fileID: 0} 188 | iPadHighResLandscapeSplashScreen: {fileID: 0} 189 | appleTVSplashScreen: {fileID: 0} 190 | tvOSSmallIconLayers: [] 191 | tvOSLargeIconLayers: [] 192 | tvOSTopShelfImageLayers: [] 193 | tvOSTopShelfImageWideLayers: [] 194 | iOSLaunchScreenType: 0 195 | iOSLaunchScreenPortrait: {fileID: 0} 196 | iOSLaunchScreenLandscape: {fileID: 0} 197 | iOSLaunchScreenBackgroundColor: 198 | serializedVersion: 2 199 | rgba: 0 200 | iOSLaunchScreenFillPct: 100 201 | iOSLaunchScreenSize: 100 202 | iOSLaunchScreenCustomXibPath: 203 | iOSLaunchScreeniPadType: 0 204 | iOSLaunchScreeniPadImage: {fileID: 0} 205 | iOSLaunchScreeniPadBackgroundColor: 206 | serializedVersion: 2 207 | rgba: 0 208 | iOSLaunchScreeniPadFillPct: 100 209 | iOSLaunchScreeniPadSize: 100 210 | iOSLaunchScreeniPadCustomXibPath: 211 | iOSDeviceRequirements: [] 212 | iOSURLSchemes: [] 213 | iOSBackgroundModes: 0 214 | iOSMetalForceHardShadows: 0 215 | metalEditorSupport: 1 216 | metalAPIValidation: 1 217 | iOSRenderExtraFrameOnPause: 1 218 | appleDeveloperTeamID: 219 | iOSManualSigningProvisioningProfileID: 220 | tvOSManualSigningProvisioningProfileID: 221 | appleEnableAutomaticSigning: 0 222 | AndroidTargetDevice: 0 223 | AndroidSplashScreenScale: 0 224 | androidSplashScreen: {fileID: 0} 225 | AndroidKeystoreName: 226 | AndroidKeyaliasName: 227 | AndroidTVCompatibility: 1 228 | AndroidIsGame: 1 229 | androidEnableBanner: 1 230 | m_AndroidBanners: 231 | - width: 320 232 | height: 180 233 | banner: {fileID: 0} 234 | androidGamepadSupportLevel: 0 235 | resolutionDialogBanner: {fileID: 0} 236 | m_BuildTargetIcons: [] 237 | m_BuildTargetBatching: [] 238 | m_BuildTargetGraphicsAPIs: [] 239 | m_BuildTargetVRSettings: [] 240 | openGLRequireES31: 0 241 | openGLRequireES31AEP: 0 242 | webPlayerTemplate: APPLICATION:Default 243 | m_TemplateCustomTags: {} 244 | wiiUTitleID: 0005000011000000 245 | wiiUGroupID: 00010000 246 | wiiUCommonSaveSize: 4096 247 | wiiUAccountSaveSize: 2048 248 | wiiUOlvAccessKey: 0 249 | wiiUTinCode: 0 250 | wiiUJoinGameId: 0 251 | wiiUJoinGameModeMask: 0000000000000000 252 | wiiUCommonBossSize: 0 253 | wiiUAccountBossSize: 0 254 | wiiUAddOnUniqueIDs: [] 255 | wiiUMainThreadStackSize: 3072 256 | wiiULoaderThreadStackSize: 1024 257 | wiiUSystemHeapSize: 128 258 | wiiUTVStartupScreen: {fileID: 0} 259 | wiiUGamePadStartupScreen: {fileID: 0} 260 | wiiUDrcBufferDisabled: 0 261 | wiiUProfilerLibPath: 262 | playModeTestRunnerEnabled: 0 263 | actionOnDotNetUnhandledException: 1 264 | enableInternalProfiler: 0 265 | logObjCUncaughtExceptions: 1 266 | enableCrashReportAPI: 0 267 | cameraUsageDescription: 268 | locationUsageDescription: 269 | microphoneUsageDescription: 270 | switchNetLibKey: 271 | switchSocketMemoryPoolSize: 6144 272 | switchSocketAllocatorPoolSize: 128 273 | switchSocketConcurrencyLimit: 14 274 | switchScreenResolutionBehavior: 2 275 | switchUseCPUProfiler: 0 276 | switchApplicationID: 0x0005000C10000001 277 | switchNSODependencies: 278 | switchTitleNames_0: 279 | switchTitleNames_1: 280 | switchTitleNames_2: 281 | switchTitleNames_3: 282 | switchTitleNames_4: 283 | switchTitleNames_5: 284 | switchTitleNames_6: 285 | switchTitleNames_7: 286 | switchTitleNames_8: 287 | switchTitleNames_9: 288 | switchTitleNames_10: 289 | switchTitleNames_11: 290 | switchPublisherNames_0: 291 | switchPublisherNames_1: 292 | switchPublisherNames_2: 293 | switchPublisherNames_3: 294 | switchPublisherNames_4: 295 | switchPublisherNames_5: 296 | switchPublisherNames_6: 297 | switchPublisherNames_7: 298 | switchPublisherNames_8: 299 | switchPublisherNames_9: 300 | switchPublisherNames_10: 301 | switchPublisherNames_11: 302 | switchIcons_0: {fileID: 0} 303 | switchIcons_1: {fileID: 0} 304 | switchIcons_2: {fileID: 0} 305 | switchIcons_3: {fileID: 0} 306 | switchIcons_4: {fileID: 0} 307 | switchIcons_5: {fileID: 0} 308 | switchIcons_6: {fileID: 0} 309 | switchIcons_7: {fileID: 0} 310 | switchIcons_8: {fileID: 0} 311 | switchIcons_9: {fileID: 0} 312 | switchIcons_10: {fileID: 0} 313 | switchIcons_11: {fileID: 0} 314 | switchSmallIcons_0: {fileID: 0} 315 | switchSmallIcons_1: {fileID: 0} 316 | switchSmallIcons_2: {fileID: 0} 317 | switchSmallIcons_3: {fileID: 0} 318 | switchSmallIcons_4: {fileID: 0} 319 | switchSmallIcons_5: {fileID: 0} 320 | switchSmallIcons_6: {fileID: 0} 321 | switchSmallIcons_7: {fileID: 0} 322 | switchSmallIcons_8: {fileID: 0} 323 | switchSmallIcons_9: {fileID: 0} 324 | switchSmallIcons_10: {fileID: 0} 325 | switchSmallIcons_11: {fileID: 0} 326 | switchManualHTML: 327 | switchAccessibleURLs: 328 | switchLegalInformation: 329 | switchMainThreadStackSize: 1048576 330 | switchPresenceGroupId: 0x0005000C10000001 331 | switchLogoHandling: 0 332 | switchReleaseVersion: 0 333 | switchDisplayVersion: 1.0.0 334 | switchStartupUserAccount: 0 335 | switchTouchScreenUsage: 0 336 | switchSupportedLanguagesMask: 0 337 | switchLogoType: 0 338 | switchApplicationErrorCodeCategory: 339 | switchUserAccountSaveDataSize: 0 340 | switchUserAccountSaveDataJournalSize: 0 341 | switchApplicationAttribute: 0 342 | switchCardSpecSize: 4 343 | switchCardSpecClock: 25 344 | switchRatingsMask: 0 345 | switchRatingsInt_0: 0 346 | switchRatingsInt_1: 0 347 | switchRatingsInt_2: 0 348 | switchRatingsInt_3: 0 349 | switchRatingsInt_4: 0 350 | switchRatingsInt_5: 0 351 | switchRatingsInt_6: 0 352 | switchRatingsInt_7: 0 353 | switchRatingsInt_8: 0 354 | switchRatingsInt_9: 0 355 | switchRatingsInt_10: 0 356 | switchRatingsInt_11: 0 357 | switchLocalCommunicationIds_0: 0x0005000C10000001 358 | switchLocalCommunicationIds_1: 359 | switchLocalCommunicationIds_2: 360 | switchLocalCommunicationIds_3: 361 | switchLocalCommunicationIds_4: 362 | switchLocalCommunicationIds_5: 363 | switchLocalCommunicationIds_6: 364 | switchLocalCommunicationIds_7: 365 | switchParentalControl: 0 366 | switchAllowsScreenshot: 1 367 | switchDataLossConfirmation: 0 368 | switchSupportedNpadStyles: 3 369 | switchSocketConfigEnabled: 0 370 | switchTcpInitialSendBufferSize: 32 371 | switchTcpInitialReceiveBufferSize: 64 372 | switchTcpAutoSendBufferSizeMax: 256 373 | switchTcpAutoReceiveBufferSizeMax: 256 374 | switchUdpSendBufferSize: 9 375 | switchUdpReceiveBufferSize: 42 376 | switchSocketBufferEfficiency: 4 377 | switchSocketInitializeEnabled: 1 378 | switchNetworkInterfaceManagerInitializeEnabled: 1 379 | switchPlayerConnectionEnabled: 1 380 | ps4NPAgeRating: 12 381 | ps4NPTitleSecret: 382 | ps4NPTrophyPackPath: 383 | ps4ParentalLevel: 1 384 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 385 | ps4Category: 0 386 | ps4MasterVersion: 01.00 387 | ps4AppVersion: 01.00 388 | ps4AppType: 0 389 | ps4ParamSfxPath: 390 | ps4VideoOutPixelFormat: 0 391 | ps4VideoOutInitialWidth: 1920 392 | ps4VideoOutBaseModeInitialWidth: 1920 393 | ps4VideoOutReprojectionRate: 120 394 | ps4PronunciationXMLPath: 395 | ps4PronunciationSIGPath: 396 | ps4BackgroundImagePath: 397 | ps4StartupImagePath: 398 | ps4SaveDataImagePath: 399 | ps4SdkOverride: 400 | ps4BGMPath: 401 | ps4ShareFilePath: 402 | ps4ShareOverlayImagePath: 403 | ps4PrivacyGuardImagePath: 404 | ps4NPtitleDatPath: 405 | ps4RemotePlayKeyAssignment: -1 406 | ps4RemotePlayKeyMappingDir: 407 | ps4PlayTogetherPlayerCount: 0 408 | ps4EnterButtonAssignment: 1 409 | ps4ApplicationParam1: 0 410 | ps4ApplicationParam2: 0 411 | ps4ApplicationParam3: 0 412 | ps4ApplicationParam4: 0 413 | ps4DownloadDataSize: 0 414 | ps4GarlicHeapSize: 2048 415 | ps4ProGarlicHeapSize: 2560 416 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 417 | ps4pnSessions: 1 418 | ps4pnPresence: 1 419 | ps4pnFriends: 1 420 | ps4pnGameCustomData: 1 421 | playerPrefsSupport: 0 422 | restrictedAudioUsageRights: 0 423 | ps4UseResolutionFallback: 0 424 | ps4ReprojectionSupport: 0 425 | ps4UseAudio3dBackend: 0 426 | ps4SocialScreenEnabled: 0 427 | ps4ScriptOptimizationLevel: 3 428 | ps4Audio3dVirtualSpeakerCount: 14 429 | ps4attribCpuUsage: 0 430 | ps4PatchPkgPath: 431 | ps4PatchLatestPkgPath: 432 | ps4PatchChangeinfoPath: 433 | ps4PatchDayOne: 0 434 | ps4attribUserManagement: 0 435 | ps4attribMoveSupport: 0 436 | ps4attrib3DSupport: 0 437 | ps4attribShareSupport: 0 438 | ps4attribExclusiveVR: 0 439 | ps4disableAutoHideSplash: 0 440 | ps4videoRecordingFeaturesUsed: 0 441 | ps4contentSearchFeaturesUsed: 0 442 | ps4attribEyeToEyeDistanceSettingVR: 0 443 | ps4IncludedModules: [] 444 | monoEnv: 445 | psp2Splashimage: {fileID: 0} 446 | psp2NPTrophyPackPath: 447 | psp2NPSupportGBMorGJP: 0 448 | psp2NPAgeRating: 12 449 | psp2NPTitleDatPath: 450 | psp2NPCommsID: 451 | psp2NPCommunicationsID: 452 | psp2NPCommsPassphrase: 453 | psp2NPCommsSig: 454 | psp2ParamSfxPath: 455 | psp2ManualPath: 456 | psp2LiveAreaGatePath: 457 | psp2LiveAreaBackroundPath: 458 | psp2LiveAreaPath: 459 | psp2LiveAreaTrialPath: 460 | psp2PatchChangeInfoPath: 461 | psp2PatchOriginalPackage: 462 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 463 | psp2KeystoneFile: 464 | psp2MemoryExpansionMode: 0 465 | psp2DRMType: 0 466 | psp2StorageType: 0 467 | psp2MediaCapacity: 0 468 | psp2DLCConfigPath: 469 | psp2ThumbnailPath: 470 | psp2BackgroundPath: 471 | psp2SoundPath: 472 | psp2TrophyCommId: 473 | psp2TrophyPackagePath: 474 | psp2PackagedResourcesPath: 475 | psp2SaveDataQuota: 10240 476 | psp2ParentalLevel: 1 477 | psp2ShortTitle: Not Set 478 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 479 | psp2Category: 0 480 | psp2MasterVersion: 01.00 481 | psp2AppVersion: 01.00 482 | psp2TVBootMode: 0 483 | psp2EnterButtonAssignment: 2 484 | psp2TVDisableEmu: 0 485 | psp2AllowTwitterDialog: 1 486 | psp2Upgradable: 0 487 | psp2HealthWarning: 0 488 | psp2UseLibLocation: 0 489 | psp2InfoBarOnStartup: 0 490 | psp2InfoBarColor: 0 491 | psp2ScriptOptimizationLevel: 0 492 | psmSplashimage: {fileID: 0} 493 | splashScreenBackgroundSourceLandscape: {fileID: 0} 494 | splashScreenBackgroundSourcePortrait: {fileID: 0} 495 | spritePackerPolicy: 496 | webGLMemorySize: 256 497 | webGLExceptionSupport: 1 498 | webGLNameFilesAsHashes: 0 499 | webGLDataCaching: 0 500 | webGLDebugSymbols: 0 501 | webGLEmscriptenArgs: 502 | webGLModulesDirectory: 503 | webGLTemplate: APPLICATION:Default 504 | webGLAnalyzeBuildSize: 0 505 | webGLUseEmbeddedResources: 0 506 | webGLUseWasm: 0 507 | webGLCompressionFormat: 1 508 | scriptingDefineSymbols: {} 509 | platformArchitecture: {} 510 | scriptingBackend: {} 511 | incrementalIl2cppBuild: {} 512 | additionalIl2CppArgs: 513 | scriptingRuntimeVersion: 0 514 | apiCompatibilityLevelPerPlatform: {} 515 | m_RenderingPath: 1 516 | m_MobileRenderingPath: 1 517 | metroPackageName: PBR 518 | metroPackageVersion: 519 | metroCertificatePath: 520 | metroCertificatePassword: 521 | metroCertificateSubject: 522 | metroCertificateIssuer: 523 | metroCertificateNotAfter: 0000000000000000 524 | metroApplicationDescription: PBR 525 | wsaImages: {} 526 | metroTileShortName: 527 | metroCommandLineArgsFile: 528 | metroTileShowName: 0 529 | metroMediumTileShowName: 0 530 | metroLargeTileShowName: 0 531 | metroWideTileShowName: 0 532 | metroDefaultTileSize: 1 533 | metroTileForegroundText: 2 534 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 535 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 536 | a: 1} 537 | metroSplashScreenUseBackgroundColor: 0 538 | platformCapabilities: {} 539 | metroFTAName: 540 | metroFTAFileTypes: [] 541 | metroProtocolName: 542 | metroCompilationOverrides: 1 543 | tizenProductDescription: 544 | tizenProductURL: 545 | tizenSigningProfileName: 546 | tizenGPSPermissions: 0 547 | tizenMicrophonePermissions: 0 548 | tizenDeploymentTarget: 549 | tizenDeploymentTargetType: 0 550 | tizenMinOSVersion: 1 551 | n3dsUseExtSaveData: 0 552 | n3dsCompressStaticMem: 1 553 | n3dsExtSaveDataNumber: 0x12345 554 | n3dsStackSize: 131072 555 | n3dsTargetPlatform: 2 556 | n3dsRegion: 7 557 | n3dsMediaSize: 0 558 | n3dsLogoStyle: 3 559 | n3dsTitle: GameName 560 | n3dsProductCode: 561 | n3dsApplicationId: 0xFF3FF 562 | stvDeviceAddress: 563 | stvProductDescription: 564 | stvProductAuthor: 565 | stvProductAuthorEmail: 566 | stvProductLink: 567 | stvProductCategory: 0 568 | XboxOneProductId: 569 | XboxOneUpdateKey: 570 | XboxOneSandboxId: 571 | XboxOneContentId: 572 | XboxOneTitleId: 573 | XboxOneSCId: 574 | XboxOneGameOsOverridePath: 575 | XboxOnePackagingOverridePath: 576 | XboxOneAppManifestOverridePath: 577 | XboxOnePackageEncryption: 0 578 | XboxOnePackageUpdateGranularity: 2 579 | XboxOneDescription: 580 | XboxOneLanguage: 581 | - enus 582 | XboxOneCapability: [] 583 | XboxOneGameRating: {} 584 | XboxOneIsContentPackage: 0 585 | XboxOneEnableGPUVariability: 0 586 | XboxOneSockets: {} 587 | XboxOneSplashScreen: {fileID: 0} 588 | XboxOneAllowedProductIds: [] 589 | XboxOnePersistentLocalStorageSize: 0 590 | xboxOneScriptCompiler: 0 591 | vrEditorSettings: 592 | daydream: 593 | daydreamIconForeground: {fileID: 0} 594 | daydreamIconBackground: {fileID: 0} 595 | cloudServicesEnabled: {} 596 | facebookSdkVersion: 7.9.1 597 | apiCompatibilityLevel: 2 598 | cloudProjectId: 599 | projectName: 600 | organizationId: 601 | cloudEnabled: 0 602 | enableNativePlatformBackendsForNewInputSystem: 0 603 | disableOldInputManagerSupport: 0 604 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.1f1 2 | -------------------------------------------------------------------------------- /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: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Fast 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Simple 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: Good 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Beautiful 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Fantastic 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 50 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | PS4: 5 181 | PSM: 5 182 | PSP2: 2 183 | Samsung TV: 2 184 | Standalone: 5 185 | Tizen: 2 186 | Web: 5 187 | WebGL: 3 188 | WiiU: 5 189 | Windows Store Apps: 5 190 | XboxOne: 5 191 | iPhone: 2 192 | tvOS: 5 193 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /docs/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Accardi Piero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Unity PBR Envmap Prefilter Tool 2 |
3 |
4 |
11 |
12 |