diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..5e7c3be --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 97799a7dc9aafef4bb6b8a62f81d0037 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Animations/Player.meta b/Assets/Animations/Player.meta new file mode 100644 index 0000000..7390f97 --- /dev/null +++ b/Assets/Animations/Player.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f75bae821972b7f4b9c9b28628a8cb09 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Animations/Player/Dead.anim b/Assets/Animations/Player/Dead.anim new file mode 100644 index 0000000..ab516a0 Binary files /dev/null and b/Assets/Animations/Player/Dead.anim differ diff --git a/Assets/Animations/Player/Dead.anim.meta b/Assets/Animations/Player/Dead.anim.meta new file mode 100644 index 0000000..8feaed6 --- /dev/null +++ b/Assets/Animations/Player/Dead.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 54b208f9feb0c4f49bfe55247bce0971 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/BehaviorTree.meta b/Assets/BehaviorTree.meta new file mode 100644 index 0000000..da5a595 --- /dev/null +++ b/Assets/BehaviorTree.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 0f777a5c66cdc534082ce96ee8af482e +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/BehaviorTree/AiDelay.psd b/Assets/BehaviorTree/AiDelay.psd new file mode 100644 index 0000000..b9059dd Binary files /dev/null and b/Assets/BehaviorTree/AiDelay.psd differ diff --git a/Assets/BehaviorTree/AiDelay.psd.meta b/Assets/BehaviorTree/AiDelay.psd.meta new file mode 100644 index 0000000..8f62171 --- /dev/null +++ b/Assets/BehaviorTree/AiDelay.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 75cff1be3576d61429363834ca95e010 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiEntry.psd b/Assets/BehaviorTree/AiEntry.psd new file mode 100644 index 0000000..83a06b2 Binary files /dev/null and b/Assets/BehaviorTree/AiEntry.psd differ diff --git a/Assets/BehaviorTree/AiEntry.psd.meta b/Assets/BehaviorTree/AiEntry.psd.meta new file mode 100644 index 0000000..0209cd7 --- /dev/null +++ b/Assets/BehaviorTree/AiEntry.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: ded096a5301fa644e8891d1f6101b751 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiInterrupt.psd b/Assets/BehaviorTree/AiInterrupt.psd new file mode 100644 index 0000000..7b3864e Binary files /dev/null and b/Assets/BehaviorTree/AiInterrupt.psd differ diff --git a/Assets/BehaviorTree/AiInterrupt.psd.meta b/Assets/BehaviorTree/AiInterrupt.psd.meta new file mode 100644 index 0000000..5c446a3 --- /dev/null +++ b/Assets/BehaviorTree/AiInterrupt.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 5795d114447579d4a98bb8883caff446 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiInverter.psd b/Assets/BehaviorTree/AiInverter.psd new file mode 100644 index 0000000..b76103f Binary files /dev/null and b/Assets/BehaviorTree/AiInverter.psd differ diff --git a/Assets/BehaviorTree/AiInverter.psd.meta b/Assets/BehaviorTree/AiInverter.psd.meta new file mode 100644 index 0000000..94aed70 --- /dev/null +++ b/Assets/BehaviorTree/AiInverter.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 50453c57d72f4764f91cac3e9da6775d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiLeaf.psd b/Assets/BehaviorTree/AiLeaf.psd new file mode 100644 index 0000000..53f26cc Binary files /dev/null and b/Assets/BehaviorTree/AiLeaf.psd differ diff --git a/Assets/BehaviorTree/AiLeaf.psd.meta b/Assets/BehaviorTree/AiLeaf.psd.meta new file mode 100644 index 0000000..591d502 --- /dev/null +++ b/Assets/BehaviorTree/AiLeaf.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 6d08017e60048a74ca44adc931b5cea0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiParallel.psd b/Assets/BehaviorTree/AiParallel.psd new file mode 100644 index 0000000..5fcdf6e Binary files /dev/null and b/Assets/BehaviorTree/AiParallel.psd differ diff --git a/Assets/BehaviorTree/AiParallel.psd.meta b/Assets/BehaviorTree/AiParallel.psd.meta new file mode 100644 index 0000000..e06ac6e --- /dev/null +++ b/Assets/BehaviorTree/AiParallel.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: c9ec39ec3da62a64d941014c71e7f028 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiRepeater.psd b/Assets/BehaviorTree/AiRepeater.psd new file mode 100644 index 0000000..cc73630 Binary files /dev/null and b/Assets/BehaviorTree/AiRepeater.psd differ diff --git a/Assets/BehaviorTree/AiRepeater.psd.meta b/Assets/BehaviorTree/AiRepeater.psd.meta new file mode 100644 index 0000000..b241d20 --- /dev/null +++ b/Assets/BehaviorTree/AiRepeater.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 6d5935485dc5991449b53931f8c2e312 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiReturnFailure.psd b/Assets/BehaviorTree/AiReturnFailure.psd new file mode 100644 index 0000000..bdd0cd0 Binary files /dev/null and b/Assets/BehaviorTree/AiReturnFailure.psd differ diff --git a/Assets/BehaviorTree/AiReturnFailure.psd.meta b/Assets/BehaviorTree/AiReturnFailure.psd.meta new file mode 100644 index 0000000..d2fcb0a --- /dev/null +++ b/Assets/BehaviorTree/AiReturnFailure.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: b3ecdd4f2d60e5149ba02592143f517b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiReturnSuccess.psd b/Assets/BehaviorTree/AiReturnSuccess.psd new file mode 100644 index 0000000..7f36ad6 Binary files /dev/null and b/Assets/BehaviorTree/AiReturnSuccess.psd differ diff --git a/Assets/BehaviorTree/AiReturnSuccess.psd.meta b/Assets/BehaviorTree/AiReturnSuccess.psd.meta new file mode 100644 index 0000000..4e2cef2 --- /dev/null +++ b/Assets/BehaviorTree/AiReturnSuccess.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 72f177c027d95ac438d85c3a968f00e3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiSelector.psd b/Assets/BehaviorTree/AiSelector.psd new file mode 100644 index 0000000..a730eb3 Binary files /dev/null and b/Assets/BehaviorTree/AiSelector.psd differ diff --git a/Assets/BehaviorTree/AiSelector.psd.meta b/Assets/BehaviorTree/AiSelector.psd.meta new file mode 100644 index 0000000..2b59dbd --- /dev/null +++ b/Assets/BehaviorTree/AiSelector.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: bcabd2f1888c8f14ca23cb37f12fefb2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiSequence.psd b/Assets/BehaviorTree/AiSequence.psd new file mode 100644 index 0000000..cbbd290 Binary files /dev/null and b/Assets/BehaviorTree/AiSequence.psd differ diff --git a/Assets/BehaviorTree/AiSequence.psd.meta b/Assets/BehaviorTree/AiSequence.psd.meta new file mode 100644 index 0000000..0f46fdc --- /dev/null +++ b/Assets/BehaviorTree/AiSequence.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 8acfd1a7d74af514c9cfa3c24b4744a8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiUntilFailure.psd b/Assets/BehaviorTree/AiUntilFailure.psd new file mode 100644 index 0000000..2be57d1 Binary files /dev/null and b/Assets/BehaviorTree/AiUntilFailure.psd differ diff --git a/Assets/BehaviorTree/AiUntilFailure.psd.meta b/Assets/BehaviorTree/AiUntilFailure.psd.meta new file mode 100644 index 0000000..b2dbc26 --- /dev/null +++ b/Assets/BehaviorTree/AiUntilFailure.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 6f3711f476005504c9f518040eab635a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiUntilSuccess.psd b/Assets/BehaviorTree/AiUntilSuccess.psd new file mode 100644 index 0000000..ff35e45 Binary files /dev/null and b/Assets/BehaviorTree/AiUntilSuccess.psd differ diff --git a/Assets/BehaviorTree/AiUntilSuccess.psd.meta b/Assets/BehaviorTree/AiUntilSuccess.psd.meta new file mode 100644 index 0000000..79f87b3 --- /dev/null +++ b/Assets/BehaviorTree/AiUntilSuccess.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 04d8851f030c93848b12cda0f318f857 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BehaviorTree/AiUntillSuccess.psd b/Assets/BehaviorTree/AiUntillSuccess.psd new file mode 100644 index 0000000..b6aa43f Binary files /dev/null and b/Assets/BehaviorTree/AiUntillSuccess.psd differ diff --git a/Assets/BehaviorTree/AiUntillSuccess.psd.meta b/Assets/BehaviorTree/AiUntillSuccess.psd.meta new file mode 100644 index 0000000..c7cf9a9 --- /dev/null +++ b/Assets/BehaviorTree/AiUntillSuccess.psd.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: bbde1a7d7d1792a46937e629e84df4e0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000..ed03ab3 --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 65f3d9235af1eaf43b9f64b516a6efef +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects.meta b/Assets/Editor/Image Effects.meta new file mode 100644 index 0000000..8790a3a --- /dev/null +++ b/Assets/Editor/Image Effects.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b1f4aac2c6667456c80bc8ab9bac6ed1 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js b/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js new file mode 100644 index 0000000..c7cdd36 --- /dev/null +++ b/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js @@ -0,0 +1,62 @@ + +#pragma strict + +@CustomEditor (AntialiasingAsPostEffect) + +class AntialiasingAsPostEffectEditor extends Editor +{ + var serObj : SerializedObject; + + var mode : SerializedProperty; + + var showGeneratedNormals : SerializedProperty; + var offsetScale : SerializedProperty; + var blurRadius : SerializedProperty; + var dlaaSharp : SerializedProperty; + + var edgeThresholdMin : SerializedProperty; + var edgeThreshold : SerializedProperty; + var edgeSharpness : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty ("mode"); + + showGeneratedNormals = serObj.FindProperty ("showGeneratedNormals"); + offsetScale = serObj.FindProperty ("offsetScale"); + blurRadius = serObj.FindProperty ("blurRadius"); + dlaaSharp = serObj.FindProperty ("dlaaSharp"); + + edgeThresholdMin = serObj.FindProperty("edgeThresholdMin"); + edgeThreshold = serObj.FindProperty("edgeThreshold"); + edgeSharpness = serObj.FindProperty("edgeSharpness"); + } + + function OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label("Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (mode, new GUIContent ("Technique")); + + var mat : Material = (target as AntialiasingAsPostEffect).CurrentAAMaterial (); + if(null == mat && (target as AntialiasingAsPostEffect).enabled) { + EditorGUILayout.HelpBox("This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning); + } + + if (mode.enumValueIndex == AAMode.NFAA) { + EditorGUILayout.PropertyField (offsetScale, new GUIContent ("Edge Detect Ofs")); + EditorGUILayout.PropertyField (blurRadius, new GUIContent ("Blur Radius")); + EditorGUILayout.PropertyField (showGeneratedNormals, new GUIContent ("Show Normals")); + } else if (mode.enumValueIndex == AAMode.DLAA) { + EditorGUILayout.PropertyField (dlaaSharp, new GUIContent ("Sharp")); + } else if (mode.enumValueIndex == AAMode.FXAA3Console) { + EditorGUILayout.PropertyField (edgeThresholdMin, new GUIContent ("Edge Min Threshhold")); + EditorGUILayout.PropertyField (edgeThreshold, new GUIContent ("Edge Threshhold")); + EditorGUILayout.PropertyField (edgeSharpness, new GUIContent ("Edge Sharpness")); + } + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js.meta b/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js.meta new file mode 100644 index 0000000..7f4b0a6 --- /dev/null +++ b/Assets/Editor/Image Effects/AntialiasingAsPostEffectEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 36f48f2018eba4c07a9ed16f79126f55 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js b/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js new file mode 100644 index 0000000..0f55c30 --- /dev/null +++ b/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js @@ -0,0 +1,155 @@ + +#pragma strict + +@CustomEditor (BloomAndLensFlares) + +class BloomAndLensFlaresEditor extends Editor +{ + var tweakMode : SerializedProperty; + var screenBlendMode : SerializedProperty; + + var serObj : SerializedObject; + + var hdr : SerializedProperty; + var sepBlurSpread : SerializedProperty; + var useSrcAlphaAsMask : SerializedProperty; + + var bloomIntensity : SerializedProperty; + var bloomThreshhold : SerializedProperty; + var bloomBlurIterations : SerializedProperty; + + var lensflares : SerializedProperty; + + var hollywoodFlareBlurIterations : SerializedProperty; + + var lensflareMode : SerializedProperty; + var hollyStretchWidth : SerializedProperty; + var lensflareIntensity : SerializedProperty; + var lensflareThreshhold : SerializedProperty; + var flareColorA : SerializedProperty; + var flareColorB : SerializedProperty; + var flareColorC : SerializedProperty; + var flareColorD : SerializedProperty; + + var blurWidth : SerializedProperty; + var lensFlareVignetteMask : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + hdr = serObj.FindProperty("hdr"); + + sepBlurSpread = serObj.FindProperty("sepBlurSpread"); + useSrcAlphaAsMask = serObj.FindProperty("useSrcAlphaAsMask"); + + bloomIntensity = serObj.FindProperty("bloomIntensity"); + bloomThreshhold = serObj.FindProperty("bloomThreshhold"); + bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); + + lensflares = serObj.FindProperty("lensflares"); + + lensflareMode = serObj.FindProperty("lensflareMode"); + hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); + hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); + lensflareIntensity = serObj.FindProperty("lensflareIntensity"); + lensflareThreshhold = serObj.FindProperty("lensflareThreshhold"); + flareColorA = serObj.FindProperty("flareColorA"); + flareColorB = serObj.FindProperty("flareColorB"); + flareColorC = serObj.FindProperty("flareColorC"); + flareColorD = serObj.FindProperty("flareColorD"); + blurWidth = serObj.FindProperty("blurWidth"); + lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); + + tweakMode = serObj.FindProperty("tweakMode"); + } + + function OnInspectorGUI () { + serObj.Update(); + + GUILayout.Label("HDR " + (hdr.enumValueIndex == 0 ? "auto detected, " : (hdr.enumValueIndex == 1 ? "forced on, " : "disabled, ")) + (useSrcAlphaAsMask.floatValue < 0.1f ? " ignoring alpha channel glow information" : " using alpha channel glow information"), EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (tweakMode, new GUIContent("Tweak mode")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); + EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); + + // display info text when screen blend mode cannot be used + var cam : Camera = (target as BloomAndLensFlares).GetComponent(Camera); + if(cam != null) { + if(screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); + } + } + + if (1 == tweakMode.intValue) + EditorGUILayout.PropertyField (lensflares, new GUIContent("Cast lens flares")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); + bloomThreshhold.floatValue = EditorGUILayout.Slider ("Threshhold", bloomThreshhold.floatValue, -0.05, 4.0); + bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", bloomBlurIterations.intValue, 1, 4); + sepBlurSpread.floatValue = EditorGUILayout.Slider ("Blur spread", sepBlurSpread.floatValue, 0.1, 10.0); + + if (1 == tweakMode.intValue) + useSrcAlphaAsMask.floatValue = EditorGUILayout.Slider (new GUIContent("Use alpha mask", "Make alpha channel define glowiness"), useSrcAlphaAsMask.floatValue, 0.0, 1.0); + else + useSrcAlphaAsMask.floatValue = 0.0; + + if (1 == tweakMode.intValue) { + EditorGUILayout.Separator (); + + if (lensflares.boolValue) { + + // further lens flare tweakings + if (0 != tweakMode.intValue) + EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens flare mode")); + else + lensflareMode.enumValueIndex = 0; + + EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent("Lens flare mask", "This mask is needed to prevent lens flare artifacts")); + + EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent("Local intensity")); + lensflareThreshhold.floatValue = EditorGUILayout.Slider ("Local threshhold", lensflareThreshhold.floatValue, 0.0, 1.0); + + if (lensflareMode.intValue == 0) { + // ghosting + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); + EditorGUILayout.EndHorizontal (); + } + else if (lensflareMode.intValue == 1) { + // hollywood + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (flareColorA, new GUIContent("Tint Color")); + } + else if (lensflareMode.intValue == 2) { + // both + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); + EditorGUILayout.EndHorizontal (); + } + } + } else + lensflares.boolValue = false; // disable lens flares in simple tweak mode + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js.meta b/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js.meta new file mode 100644 index 0000000..2b0dc48 --- /dev/null +++ b/Assets/Editor/Image Effects/BloomAndLensFlaresEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fa3c09c9b1eff448fa03c3cc1ffd0283 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/BloomEditor.js b/Assets/Editor/Image Effects/BloomEditor.js new file mode 100644 index 0000000..f9bac95 --- /dev/null +++ b/Assets/Editor/Image Effects/BloomEditor.js @@ -0,0 +1,160 @@ + +#pragma strict + +@CustomEditor (Bloom) + +class BloomEditor extends Editor +{ + var tweakMode : SerializedProperty; + var screenBlendMode : SerializedProperty; + + var serObj : SerializedObject; + + var hdr : SerializedProperty; + var quality : SerializedProperty; + var sepBlurSpread : SerializedProperty; + + var bloomIntensity : SerializedProperty; + var bloomThreshholdColor : SerializedProperty; + var bloomThreshhold : SerializedProperty; + var bloomBlurIterations : SerializedProperty; + + var hollywoodFlareBlurIterations : SerializedProperty; + + var lensflareMode : SerializedProperty; + var hollyStretchWidth : SerializedProperty; + var lensflareIntensity : SerializedProperty; + var flareRotation : SerializedProperty; + var lensFlareSaturation : SerializedProperty; + var lensflareThreshhold : SerializedProperty; + var flareColorA : SerializedProperty; + var flareColorB : SerializedProperty; + var flareColorC : SerializedProperty; + var flareColorD : SerializedProperty; + + var blurWidth : SerializedProperty; + var lensFlareVignetteMask : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + hdr = serObj.FindProperty("hdr"); + quality = serObj.FindProperty("quality"); + + sepBlurSpread = serObj.FindProperty("sepBlurSpread"); + + bloomIntensity = serObj.FindProperty("bloomIntensity"); + bloomThreshhold = serObj.FindProperty("bloomThreshhold"); + bloomThreshholdColor = serObj.FindProperty("bloomThreshholdColor"); + bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); + + lensflareMode = serObj.FindProperty("lensflareMode"); + hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); + hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); + lensflareIntensity = serObj.FindProperty("lensflareIntensity"); + lensflareThreshhold = serObj.FindProperty("lensflareThreshhold"); + lensFlareSaturation = serObj.FindProperty("lensFlareSaturation"); + flareRotation = serObj.FindProperty("flareRotation"); + flareColorA = serObj.FindProperty("flareColorA"); + flareColorB = serObj.FindProperty("flareColorB"); + flareColorC = serObj.FindProperty("flareColorC"); + flareColorD = serObj.FindProperty("flareColorD"); + blurWidth = serObj.FindProperty("blurWidth"); + lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); + + tweakMode = serObj.FindProperty("tweakMode"); + } + + function OnInspectorGUI () { + serObj.Update(); + + EditorGUILayout.LabelField("Glow and Lens Flares for bright screen pixels", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField (quality, new GUIContent("Quality", "High quality preserves high frequencies with bigger blurs and uses a better blending and down-/upsampling")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (tweakMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend")); + EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); + + EditorGUILayout.Separator (); + + // display info text when screen blend mode cannot be used + var cam : Camera = (target as Bloom).GetComponent(Camera); + if(cam != null) { + if(screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); + } + } + + EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); + bloomThreshhold.floatValue = EditorGUILayout.Slider ("Threshhold", bloomThreshhold.floatValue, -0.05, 4.0); + if (1 == tweakMode.intValue) { + EditorGUILayout.PropertyField(bloomThreshholdColor, new GUIContent(" RGB Threshhold")); + } + EditorGUILayout.Separator (); + + bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur Iterations", bloomBlurIterations.intValue, 1, 4); + sepBlurSpread.floatValue = EditorGUILayout.Slider (" Sample Distance", sepBlurSpread.floatValue, 0.1, 10.0); + EditorGUILayout.Separator (); + + if (1 == tweakMode.intValue) { + // further lens flare tweakings + if (0 != tweakMode.intValue) + EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens Flares")); + else + lensflareMode.enumValueIndex = 0; + + EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent(" Local Intensity", "0 disables lens flares entirely (optimization)")); + lensflareThreshhold.floatValue = EditorGUILayout.Slider (" Threshhold", lensflareThreshhold.floatValue, 0.0, 4.0f); + + if (Mathf.Abs(lensflareIntensity.floatValue) > Mathf.Epsilon) { + if (lensflareMode.intValue == 0) { + // ghosting + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); + EditorGUILayout.EndHorizontal (); + } + else if (lensflareMode.intValue == 1) { + // hollywood + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); + EditorGUILayout.PropertyField (flareRotation, new GUIContent( " Rotation")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" Tint Color")); + } + else if (lensflareMode.intValue == 2) { + // both + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); + EditorGUILayout.EndHorizontal (); + } + + EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent(" Mask", "This mask is needed to prevent lens flare artifacts")); + + } + } + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/BloomEditor.js.meta b/Assets/Editor/Image Effects/BloomEditor.js.meta new file mode 100644 index 0000000..c988673 --- /dev/null +++ b/Assets/Editor/Image Effects/BloomEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cf6d8fc1580864a149a13b0e37bb6659 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/CameraMotionBlurEditor.js b/Assets/Editor/Image Effects/CameraMotionBlurEditor.js new file mode 100644 index 0000000..3b0d356 --- /dev/null +++ b/Assets/Editor/Image Effects/CameraMotionBlurEditor.js @@ -0,0 +1,98 @@ + +#pragma strict + +@CustomEditor (CameraMotionBlur) +class CameraMotionBlurEditor extends Editor +{ + var serObj : SerializedObject; + + var filterType : SerializedProperty; + var preview : SerializedProperty; + var previewScale : SerializedProperty; + var movementScale : SerializedProperty; + var jitter : SerializedProperty; + var rotationScale : SerializedProperty; + var maxVelocity : SerializedProperty; + var minVelocity : SerializedProperty; + var maxNumSamples : SerializedProperty; + var velocityScale : SerializedProperty; + var velocityDownsample : SerializedProperty; + var noiseTexture : SerializedProperty; + var showVelocity : SerializedProperty; + var showVelocityScale : SerializedProperty; + var excludeLayers : SerializedProperty; + //var dynamicLayers : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + filterType = serObj.FindProperty ("filterType"); + + preview = serObj.FindProperty ("preview"); + previewScale = serObj.FindProperty ("previewScale"); + + movementScale = serObj.FindProperty ("movementScale"); + rotationScale = serObj.FindProperty ("rotationScale"); + + maxVelocity = serObj.FindProperty ("maxVelocity"); + minVelocity = serObj.FindProperty ("minVelocity"); + + maxNumSamples = serObj.FindProperty ("maxNumSamples"); + jitter = serObj.FindProperty ("jitter"); + + excludeLayers = serObj.FindProperty ("excludeLayers"); + //dynamicLayers = serObj.FindProperty ("dynamicLayers"); + + velocityScale = serObj.FindProperty ("velocityScale"); + velocityDownsample = serObj.FindProperty ("velocityDownsample"); + + noiseTexture = serObj.FindProperty ("noiseTexture"); + } + + function OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.LabelField("Simulates camera based motion blur", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField (filterType, new GUIContent("Technique")); + if (filterType.enumValueIndex == 3 && !(target as CameraMotionBlur).Dx11Support()) { + EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); + } + EditorGUILayout.PropertyField (velocityScale, new GUIContent(" Velocity Scale")); + if(filterType.enumValueIndex >= 2) { + EditorGUILayout.LabelField(" Tile size used during reconstruction filter:", EditorStyles.miniLabel); + EditorGUILayout.PropertyField (maxVelocity, new GUIContent(" Velocity Max")); + } + else + EditorGUILayout.PropertyField (maxVelocity, new GUIContent(" Velocity Max")); + EditorGUILayout.PropertyField (minVelocity, new GUIContent(" Velocity Min")); + + EditorGUILayout.Separator (); + + EditorGUILayout.LabelField("Technique Specific"); + + if(filterType.enumValueIndex == 0) { + // portal style motion blur + EditorGUILayout.PropertyField (rotationScale, new GUIContent(" Camera Rotation")); + EditorGUILayout.PropertyField (movementScale, new GUIContent(" Camera Movement")); + } + else { + // "plausible" blur or cheap, local blur + EditorGUILayout.PropertyField (excludeLayers, new GUIContent(" Exclude Layers")); + EditorGUILayout.PropertyField (velocityDownsample, new GUIContent(" Velocity Downsample")); + velocityDownsample.intValue = velocityDownsample.intValue < 1 ? 1 : velocityDownsample.intValue; + if(filterType.enumValueIndex >= 2) { // only display jitter for reconstruction + EditorGUILayout.PropertyField (noiseTexture, new GUIContent(" Sample Jitter")); + EditorGUILayout.PropertyField (jitter, new GUIContent(" Jitter Strength")); + } + } + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (preview, new GUIContent("Preview")); + if (preview.boolValue) + EditorGUILayout.PropertyField (previewScale, new GUIContent("")); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/CameraMotionBlurEditor.js.meta b/Assets/Editor/Image Effects/CameraMotionBlurEditor.js.meta new file mode 100644 index 0000000..36441de --- /dev/null +++ b/Assets/Editor/Image Effects/CameraMotionBlurEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 52641a36df9ae43a18965d3cac5fcb31 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js b/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js new file mode 100644 index 0000000..4c18b76 --- /dev/null +++ b/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js @@ -0,0 +1,137 @@ + +#pragma strict + +@CustomEditor (ColorCorrectionCurves) + +class ColorCorrectionCurvesEditor extends Editor { + var serObj : SerializedObject; + + var mode : SerializedProperty; + + var redChannel : SerializedProperty; + var greenChannel : SerializedProperty; + var blueChannel : SerializedProperty; + + var useDepthCorrection : SerializedProperty; + + var depthRedChannel : SerializedProperty; + var depthGreenChannel : SerializedProperty; + var depthBlueChannel : SerializedProperty; + + var zCurveChannel : SerializedProperty; + + var saturation : SerializedProperty; + + var selectiveCc : SerializedProperty; + var selectiveFromColor : SerializedProperty; + var selectiveToColor : SerializedProperty; + + private var applyCurveChanges : boolean = false; + + function OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty ("mode"); + + saturation = serObj.FindProperty ("saturation"); + + redChannel = serObj.FindProperty ("redChannel"); + greenChannel = serObj.FindProperty ("greenChannel"); + blueChannel = serObj.FindProperty ("blueChannel"); + + useDepthCorrection = serObj.FindProperty ("useDepthCorrection"); + + zCurveChannel = serObj.FindProperty ("zCurve"); + + depthRedChannel = serObj.FindProperty ("depthRedChannel"); + depthGreenChannel = serObj.FindProperty ("depthGreenChannel"); + depthBlueChannel = serObj.FindProperty ("depthBlueChannel"); + + if (!redChannel.animationCurveValue.length) + redChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + if (!greenChannel.animationCurveValue.length) + greenChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + if (!blueChannel.animationCurveValue.length) + blueChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + + if (!depthRedChannel.animationCurveValue.length) + depthRedChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + if (!depthGreenChannel.animationCurveValue.length) + depthGreenChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + if (!depthBlueChannel.animationCurveValue.length) + depthBlueChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + + if (!zCurveChannel.animationCurveValue.length) + zCurveChannel.animationCurveValue = new AnimationCurve(Keyframe(0, 0.0, 1.0, 1.0), Keyframe(1, 1.0, 1.0, 1.0)); + + serObj.ApplyModifiedProperties (); + + selectiveCc = serObj.FindProperty ("selectiveCc"); + selectiveFromColor = serObj.FindProperty ("selectiveFromColor"); + selectiveToColor = serObj.FindProperty ("selectiveToColor"); + } + + function CurveGui (name : String, animationCurve : SerializedProperty, color : Color) { + // @NOTE: EditorGUILayout.CurveField is buggy and flickers, using PropertyField for now + //animationCurve.animationCurveValue = EditorGUILayout.CurveField (GUIContent (name), animationCurve.animationCurveValue, color, Rect (0.0,0.0,1.0,1.0)); + EditorGUILayout.PropertyField (animationCurve, GUIContent (name)); + if (GUI.changed) + applyCurveChanges = true; + } + + function BeginCurves () { + applyCurveChanges = false; + } + + function ApplyCurves () { + if (applyCurveChanges) { + serObj.ApplyModifiedProperties (); + (serObj.targetObject as ColorCorrectionCurves).gameObject.SendMessage ("UpdateTextures"); + } + } + + function OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label ("Use curves to tweak RGB channel colors", EditorStyles.miniBoldLabel); + + saturation.floatValue = EditorGUILayout.Slider( "Saturation", saturation.floatValue, 0.0f, 5.0f); + + EditorGUILayout.PropertyField (mode, GUIContent ("Mode")); + EditorGUILayout.Separator (); + + BeginCurves (); + + CurveGui (" Red", redChannel, Color.red); + CurveGui (" Green", greenChannel, Color.green); + CurveGui (" Blue", blueChannel, Color.blue); + + EditorGUILayout.Separator (); + + if (mode.intValue > 0) + useDepthCorrection.boolValue = true; + else + useDepthCorrection.boolValue = false; + + if (useDepthCorrection.boolValue) { + CurveGui (" Red (depth)", depthRedChannel, Color.red); + CurveGui (" Green (depth)", depthGreenChannel, Color.green); + CurveGui (" Blue (depth)", depthBlueChannel, Color.blue); + EditorGUILayout.Separator (); + CurveGui (" Blend Curve", zCurveChannel, Color.grey); + } + + EditorGUILayout.Separator (); + EditorGUILayout.PropertyField (selectiveCc, GUIContent ("Selective")); + if (selectiveCc.boolValue) { + EditorGUILayout.PropertyField (selectiveFromColor, GUIContent (" Key")); + EditorGUILayout.PropertyField (selectiveToColor, GUIContent (" Target")); + } + + + ApplyCurves (); + + if (!applyCurveChanges) + serObj.ApplyModifiedProperties (); + } +} diff --git a/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js.meta b/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js.meta new file mode 100644 index 0000000..e589b58 --- /dev/null +++ b/Assets/Editor/Image Effects/ColorCorrectionCurvesEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: edb8dea92f0664f7ebdba06b4f2697da +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js b/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js new file mode 100644 index 0000000..3bb72e3 --- /dev/null +++ b/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js @@ -0,0 +1,88 @@ + + +@CustomEditor (ColorCorrectionLut) + +class ColorCorrectionLutEditor extends Editor +{ + var serObj : SerializedObject; + + function OnEnable () { + serObj = new SerializedObject (target); + } + + private var tempClutTex2D : Texture2D; + + function OnInspectorGUI () + { + serObj.Update (); + + EditorGUILayout.LabelField("Converts textures into color lookup volumes (for grading)", EditorStyles.miniLabel); + + //EditorGUILayout.LabelField("Change Lookup Texture (LUT):"); + //EditorGUILayout.BeginHorizontal (); + //var r : Rect = GUILayoutUtility.GetAspectRect(1.0f); + + var r : Rect; var t : Texture2D; + + //EditorGUILayout.Space(); + tempClutTex2D = EditorGUILayout.ObjectField (" Based on", tempClutTex2D, Texture2D, false) as Texture2D; + if (tempClutTex2D == null) { + t = AssetDatabase.LoadMainAssetAtPath((target as ColorCorrectionLut).basedOnTempTex) as Texture2D; + if (t) tempClutTex2D = t; + } + + var tex : Texture2D = tempClutTex2D; + + if (tex && (target as ColorCorrectionLut).basedOnTempTex != AssetDatabase.GetAssetPath (tex)) + { + EditorGUILayout.Separator(); + if (!(target as ColorCorrectionLut).ValidDimensions (tex)) + { + EditorGUILayout.HelpBox ("Invalid texture dimensions!\nPick another texture or adjust dimension to e.g. 256x16.", MessageType.Warning); + } + else if (GUILayout.Button ("Convert and Apply")) + { + var path : String = AssetDatabase.GetAssetPath (tex); + var textureImporter : TextureImporter = AssetImporter.GetAtPath(path) as TextureImporter; + var doImport : boolean = false; + if (textureImporter.isReadable == false) { + doImport = true; + } + if (textureImporter.mipmapEnabled == true) { + doImport = true; + } + if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor) { + doImport = true; + } + + if (doImport) + { + textureImporter.isReadable = true; + textureImporter.mipmapEnabled = false; + textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor; + AssetDatabase.ImportAsset (path, ImportAssetOptions.ForceUpdate); + //tex = AssetDatabase.LoadMainAssetAtPath(path); + } + + (target as ColorCorrectionLut).Convert (tex, path); + } + } + + if ((target as ColorCorrectionLut).basedOnTempTex != "") { + EditorGUILayout.HelpBox ("Using " + (target as ColorCorrectionLut).basedOnTempTex, MessageType.Info); + t = AssetDatabase.LoadMainAssetAtPath((target as ColorCorrectionLut).basedOnTempTex) as Texture2D; + if (t) { + r = GUILayoutUtility.GetLastRect(); + r = GUILayoutUtility.GetRect(r.width, 20); + r.x += r.width * 0.05f/2.0f; + r.width *= 0.95f; + GUI.DrawTexture (r, t); + GUILayoutUtility.GetRect(r.width, 4); + } + } + + //EditorGUILayout.EndHorizontal (); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js.meta b/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js.meta new file mode 100644 index 0000000..a84f770 --- /dev/null +++ b/Assets/Editor/Image Effects/ColorCorrectionLutEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8edd86d270edb1a47955aa151efab0fe +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/DepthOfField34Editor.js b/Assets/Editor/Image Effects/DepthOfField34Editor.js new file mode 100644 index 0000000..9a904ae --- /dev/null +++ b/Assets/Editor/Image Effects/DepthOfField34Editor.js @@ -0,0 +1,144 @@ + +#pragma strict + +@CustomEditor (DepthOfField34) +class DepthOfField34Editor extends Editor +{ + var serObj : SerializedObject; + + var simpleTweakMode : SerializedProperty; + + var focalPoint : SerializedProperty; + var smoothness : SerializedProperty; + + var focalSize : SerializedProperty; + + var focalZDistance : SerializedProperty; + var focalStartCurve : SerializedProperty; + var focalEndCurve : SerializedProperty; + + var visualizeCoc : SerializedProperty; + + var resolution : SerializedProperty; + var quality : SerializedProperty; + + var objectFocus : SerializedProperty; + + var bokeh : SerializedProperty; + var bokehScale : SerializedProperty; + var bokehIntensity : SerializedProperty; + var bokehThreshholdLuminance : SerializedProperty; + var bokehThreshholdContrast : SerializedProperty; + var bokehDownsample : SerializedProperty; + var bokehTexture : SerializedProperty; + var bokehDestination : SerializedProperty; + + var bluriness : SerializedProperty; + var maxBlurSpread : SerializedProperty; + var foregroundBlurExtrude : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + simpleTweakMode = serObj.FindProperty ("simpleTweakMode"); + + // simple tweak mode + focalPoint = serObj.FindProperty ("focalPoint"); + smoothness = serObj.FindProperty ("smoothness"); + + // complex tweak mode + focalZDistance = serObj.FindProperty ("focalZDistance"); + focalStartCurve = serObj.FindProperty ("focalZStartCurve"); + focalEndCurve = serObj.FindProperty ("focalZEndCurve"); + focalSize = serObj.FindProperty ("focalSize"); + + visualizeCoc = serObj.FindProperty ("visualize"); + + objectFocus = serObj.FindProperty ("objectFocus"); + + resolution = serObj.FindProperty ("resolution"); + quality = serObj.FindProperty ("quality"); + bokehThreshholdContrast = serObj.FindProperty ("bokehThreshholdContrast"); + bokehThreshholdLuminance = serObj.FindProperty ("bokehThreshholdLuminance"); + + bokeh = serObj.FindProperty ("bokeh"); + bokehScale = serObj.FindProperty ("bokehScale"); + bokehIntensity = serObj.FindProperty ("bokehIntensity"); + bokehDownsample = serObj.FindProperty ("bokehDownsample"); + bokehTexture = serObj.FindProperty ("bokehTexture"); + bokehDestination = serObj.FindProperty ("bokehDestination"); + + bluriness = serObj.FindProperty ("bluriness"); + maxBlurSpread = serObj.FindProperty ("maxBlurSpread"); + foregroundBlurExtrude = serObj.FindProperty ("foregroundBlurExtrude"); + } + + function OnInspectorGUI () { + serObj.Update (); + + var go : GameObject = (target as DepthOfField34).gameObject; + + if (!go) + return; + + if (!go.GetComponent(Camera)) + return; + + if (simpleTweakMode.boolValue) + GUILayout.Label ("Current: "+go.GetComponent(Camera).name+", near "+go.GetComponent(Camera).nearClipPlane+", far: "+go.GetComponent(Camera).farClipPlane+", focal: "+focalPoint.floatValue, EditorStyles.miniBoldLabel); + else + GUILayout.Label ("Current: "+go.GetComponent(Camera).name+", near "+go.GetComponent(Camera).nearClipPlane+", far: "+go.GetComponent(Camera).farClipPlane+", focal: "+focalZDistance.floatValue, EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); + EditorGUILayout.PropertyField (quality, new GUIContent("Quality")); + + EditorGUILayout.PropertyField (simpleTweakMode, new GUIContent("Simple tweak")); + EditorGUILayout.PropertyField (visualizeCoc, new GUIContent("Visualize focus")); + EditorGUILayout.PropertyField (bokeh, new GUIContent("Enable bokeh")); + + + EditorGUILayout.Separator (); + + GUILayout.Label ("Focal Settings", EditorStyles.boldLabel); + + if (simpleTweakMode.boolValue) { + focalPoint.floatValue = EditorGUILayout.Slider ("Focal distance", focalPoint.floatValue, go.GetComponent(Camera).nearClipPlane, go.GetComponent(Camera).farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + EditorGUILayout.PropertyField (smoothness, new GUIContent("Smoothness")); + focalSize.floatValue = EditorGUILayout.Slider ("Focal size", focalSize.floatValue, 0.0f, (go.GetComponent(Camera).farClipPlane - go.GetComponent(Camera).nearClipPlane)); + } + else { + focalZDistance.floatValue = EditorGUILayout.Slider ("Distance", focalZDistance.floatValue, go.GetComponent(Camera).nearClipPlane, go.GetComponent(Camera).farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + focalSize.floatValue = EditorGUILayout.Slider ("Size", focalSize.floatValue, 0.0f, (go.GetComponent(Camera).farClipPlane - go.GetComponent(Camera).nearClipPlane)); + focalStartCurve.floatValue = EditorGUILayout.Slider ("Start curve", focalStartCurve.floatValue, 0.05f, 20.0f); + focalEndCurve.floatValue = EditorGUILayout.Slider ("End curve", focalEndCurve.floatValue, 0.05f, 20.0f); + } + + EditorGUILayout.Separator (); + + GUILayout.Label ("Blur (Fore- and Background)", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bluriness, new GUIContent("Blurriness")); + EditorGUILayout.PropertyField (maxBlurSpread, new GUIContent("Blur spread")); + + if (quality.enumValueIndex > 0) { + EditorGUILayout.PropertyField (foregroundBlurExtrude, new GUIContent("Foreground size")); + } + + EditorGUILayout.Separator (); + + if (bokeh.boolValue) { + EditorGUILayout.Separator (); + GUILayout.Label ("Bokeh Settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bokehDestination, new GUIContent("Destination")); + bokehIntensity.floatValue = EditorGUILayout.Slider ("Intensity", bokehIntensity.floatValue, 0.0f, 1.0f); + bokehThreshholdLuminance.floatValue = EditorGUILayout.Slider ("Min luminance", bokehThreshholdLuminance.floatValue, 0.0f, 0.99f); + bokehThreshholdContrast.floatValue = EditorGUILayout.Slider ("Min contrast", bokehThreshholdContrast.floatValue, 0.0f, 0.25f); + bokehDownsample.intValue = EditorGUILayout.IntSlider ("Downsample", bokehDownsample.intValue, 1, 3); + bokehScale.floatValue = EditorGUILayout.Slider ("Size scale", bokehScale.floatValue, 0.0f, 20.0f); + EditorGUILayout.PropertyField (bokehTexture , new GUIContent("Texture mask")); + } + + serObj.ApplyModifiedProperties(); + } +} \ No newline at end of file diff --git a/Assets/Editor/Image Effects/DepthOfField34Editor.js.meta b/Assets/Editor/Image Effects/DepthOfField34Editor.js.meta new file mode 100644 index 0000000..9c15e18 --- /dev/null +++ b/Assets/Editor/Image Effects/DepthOfField34Editor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7582ab3f881264059af1f28fe5b7e44b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js b/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js new file mode 100644 index 0000000..dd500c5 --- /dev/null +++ b/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js @@ -0,0 +1,98 @@ + +#pragma strict + +@CustomEditor (DepthOfFieldScatter) +class DepthOfFieldScatterEditor extends Editor +{ + var serObj : SerializedObject; + + var visualizeFocus : SerializedProperty; + var focalLength : SerializedProperty; + var focalSize : SerializedProperty; + var aperture : SerializedProperty; + var focalTransform : SerializedProperty; + var maxBlurSize : SerializedProperty; + var highResolution : SerializedProperty; + + var blurType : SerializedProperty; + var blurSampleCount : SerializedProperty; + + var nearBlur : SerializedProperty; + var foregroundOverlap : SerializedProperty; + + var dx11BokehThreshhold : SerializedProperty; + var dx11SpawnHeuristic : SerializedProperty; + var dx11BokehTexture : SerializedProperty; + var dx11BokehScale : SerializedProperty; + var dx11BokehIntensity : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + visualizeFocus = serObj.FindProperty ("visualizeFocus"); + + focalLength = serObj.FindProperty ("focalLength"); + focalSize = serObj.FindProperty ("focalSize"); + aperture = serObj.FindProperty ("aperture"); + focalTransform = serObj.FindProperty ("focalTransform"); + maxBlurSize = serObj.FindProperty ("maxBlurSize"); + highResolution = serObj.FindProperty ("highResolution"); + + blurType = serObj.FindProperty ("blurType"); + blurSampleCount = serObj.FindProperty ("blurSampleCount"); + + nearBlur = serObj.FindProperty ("nearBlur"); + foregroundOverlap = serObj.FindProperty ("foregroundOverlap"); + + dx11BokehThreshhold = serObj.FindProperty ("dx11BokehThreshhold"); + dx11SpawnHeuristic = serObj.FindProperty ("dx11SpawnHeuristic"); + dx11BokehTexture = serObj.FindProperty ("dx11BokehTexture"); + dx11BokehScale = serObj.FindProperty ("dx11BokehScale"); + dx11BokehIntensity = serObj.FindProperty ("dx11BokehIntensity"); + } + + function OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.LabelField("Simulates camera lens defocus", EditorStyles.miniLabel); + + GUILayout.Label ("Focal Settings"); + EditorGUILayout.PropertyField (visualizeFocus, new GUIContent(" Visualize")); + EditorGUILayout.PropertyField (focalLength, new GUIContent(" Focal Distance")); + EditorGUILayout.PropertyField (focalSize, new GUIContent(" Focal Size")); + EditorGUILayout.PropertyField (focalTransform, new GUIContent(" Focus on Transform")); + EditorGUILayout.PropertyField (aperture, new GUIContent(" Aperture")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (blurType, new GUIContent("Defocus Type")); + + if (!(target as DepthOfFieldScatter).Dx11Support() && blurType.enumValueIndex>0) { + EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); + } + + if(blurType.enumValueIndex<1) + EditorGUILayout.PropertyField (blurSampleCount, new GUIContent(" Sample Count")); + + EditorGUILayout.PropertyField (maxBlurSize, new GUIContent(" Max Blur Distance")); + EditorGUILayout.PropertyField (highResolution, new GUIContent(" High Resolution")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (nearBlur, new GUIContent("Near Blur")); + EditorGUILayout.PropertyField (foregroundOverlap, new GUIContent(" Overlap Size")); + + EditorGUILayout.Separator (); + + if(blurType.enumValueIndex>0) { + GUILayout.Label ("DX11 Bokeh Settings"); + EditorGUILayout.PropertyField (dx11BokehTexture, new GUIContent(" Bokeh Texture")); + EditorGUILayout.PropertyField (dx11BokehScale, new GUIContent(" Bokeh Scale")); + EditorGUILayout.PropertyField (dx11BokehIntensity, new GUIContent(" Bokeh Intensity")); + EditorGUILayout.PropertyField (dx11BokehThreshhold, new GUIContent(" Min Luminance")); + EditorGUILayout.PropertyField (dx11SpawnHeuristic, new GUIContent(" Spawn Heuristic")); + } + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js.meta b/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js.meta new file mode 100644 index 0000000..875de43 --- /dev/null +++ b/Assets/Editor/Image Effects/DepthOfFieldScatterEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 04777896b3565514c89ff279f6ff35a7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js b/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js new file mode 100644 index 0000000..e4e84d7 --- /dev/null +++ b/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js @@ -0,0 +1,67 @@ + +@CustomEditor (EdgeDetectEffectNormals) + +class EdgeDetectEffectNormalsEditor extends Editor +{ + var serObj : SerializedObject; + + var mode : SerializedProperty; + var sensitivityDepth : SerializedProperty; + var sensitivityNormals : SerializedProperty; + + var lumThreshhold : SerializedProperty; + + var edgesOnly : SerializedProperty; + var edgesOnlyBgColor : SerializedProperty; + + var edgeExp : SerializedProperty; + var sampleDist : SerializedProperty; + + + function OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty("mode"); + + sensitivityDepth = serObj.FindProperty("sensitivityDepth"); + sensitivityNormals = serObj.FindProperty("sensitivityNormals"); + + lumThreshhold = serObj.FindProperty("lumThreshhold"); + + edgesOnly = serObj.FindProperty("edgesOnly"); + edgesOnlyBgColor = serObj.FindProperty("edgesOnlyBgColor"); + + edgeExp = serObj.FindProperty("edgeExp"); + sampleDist = serObj.FindProperty("sampleDist"); + } + + function OnInspectorGUI () + { + serObj.Update (); + + GUILayout.Label("Detects spatial differences and converts into black outlines", EditorStyles.miniBoldLabel); + EditorGUILayout.PropertyField (mode, new GUIContent("Mode")); + + if(mode.intValue < 2) { + EditorGUILayout.PropertyField (sensitivityDepth, new GUIContent(" Depth Sensitivity")); + EditorGUILayout.PropertyField (sensitivityNormals, new GUIContent(" Normals Sensitivity")); + } + else if (mode.intValue < 4) { + EditorGUILayout.PropertyField (edgeExp, new GUIContent(" Edge Exponent")); + } + else { + // lum based mode + EditorGUILayout.PropertyField (lumThreshhold, new GUIContent(" Luminance Threshold")); + } + + EditorGUILayout.PropertyField (sampleDist, new GUIContent(" Sample Distance")); + + EditorGUILayout.Separator (); + + GUILayout.Label ("Background Options"); + edgesOnly.floatValue = EditorGUILayout.Slider (" Edges only", edgesOnly.floatValue, 0.0, 1.0); + EditorGUILayout.PropertyField (edgesOnlyBgColor, new GUIContent (" Color")); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js.meta b/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js.meta new file mode 100644 index 0000000..b10e65a --- /dev/null +++ b/Assets/Editor/Image Effects/EdgeDetectEffectNormalsEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e04ef121228444287a4c957e442a58c1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/NoiseAndGrainEditor.js b/Assets/Editor/Image Effects/NoiseAndGrainEditor.js new file mode 100644 index 0000000..87b2794 --- /dev/null +++ b/Assets/Editor/Image Effects/NoiseAndGrainEditor.js @@ -0,0 +1,106 @@ + +#pragma strict + +@CustomEditor ( NoiseAndGrain) + +class NoiseAndGrainEditor extends Editor +{ + var serObj : SerializedObject; + + var intensityMultiplier : SerializedProperty; + var generalIntensity : SerializedProperty; + var blackIntensity : SerializedProperty; + var whiteIntensity : SerializedProperty; + var midGrey : SerializedProperty; + + var dx11Grain : SerializedProperty; + var softness : SerializedProperty; + var monochrome : SerializedProperty; + + var intensities : SerializedProperty; + var tiling : SerializedProperty; + var monochromeTiling : SerializedProperty; + + var noiseTexture : SerializedProperty; + var filterMode : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + intensityMultiplier = serObj.FindProperty("intensityMultiplier"); + generalIntensity = serObj.FindProperty("generalIntensity"); + blackIntensity = serObj.FindProperty("blackIntensity"); + whiteIntensity = serObj.FindProperty("whiteIntensity"); + midGrey = serObj.FindProperty("midGrey"); + + dx11Grain = serObj.FindProperty("dx11Grain"); + softness = serObj.FindProperty("softness"); + monochrome = serObj.FindProperty("monochrome"); + + intensities = serObj.FindProperty("intensities"); + tiling = serObj.FindProperty("tiling"); + monochromeTiling = serObj.FindProperty("monochromeTiling"); + + noiseTexture = serObj.FindProperty("noiseTexture"); + filterMode = serObj.FindProperty("filterMode"); + } + + function OnInspectorGUI () { + serObj.Update(); + + EditorGUILayout.LabelField("Overlays animated noise patterns", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField(dx11Grain, new GUIContent("DirectX 11 Grain")); + + if(dx11Grain.boolValue && !(target as NoiseAndGrain).Dx11Support()) { + EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); + } + + EditorGUILayout.PropertyField(monochrome, new GUIContent("Monochrome")); + + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(intensityMultiplier, new GUIContent("Intensity Multiplier")); + EditorGUILayout.PropertyField(generalIntensity, new GUIContent(" General")); + EditorGUILayout.PropertyField(blackIntensity, new GUIContent(" Black Boost")); + EditorGUILayout.PropertyField(whiteIntensity, new GUIContent(" White Boost")); + midGrey.floatValue = EditorGUILayout.Slider( new GUIContent(" Mid Grey (for Boost)"), midGrey.floatValue, 0.0f, 1.0f); + if(monochrome.boolValue == false) { + var c : Color = new Color(intensities.vector3Value.x,intensities.vector3Value.y,intensities.vector3Value.z,1.0f); + c = EditorGUILayout.ColorField(new GUIContent(" Color Weights"), c); + intensities.vector3Value.x = c.r; + intensities.vector3Value.y = c.g; + intensities.vector3Value.z = c.b; + } + + if(!dx11Grain.boolValue) { + EditorGUILayout.Separator(); + + EditorGUILayout.LabelField("Noise Shape"); + EditorGUILayout.PropertyField(noiseTexture, new GUIContent(" Texture")); + EditorGUILayout.PropertyField(filterMode, new GUIContent(" Filter")); + } + else { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Noise Shape"); + } + + softness.floatValue = EditorGUILayout.Slider( new GUIContent(" Softness"),softness.floatValue, 0.0f, 0.99f); + + if(!dx11Grain.boolValue) { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Advanced"); + + if(monochrome.boolValue == false) { + tiling.vector3Value.x = EditorGUILayout.FloatField(new GUIContent(" Tiling (Red)"), tiling.vector3Value.x); + tiling.vector3Value.y = EditorGUILayout.FloatField(new GUIContent(" Tiling (Green)"), tiling.vector3Value.y); + tiling.vector3Value.z = EditorGUILayout.FloatField(new GUIContent(" Tiling (Blue)"), tiling.vector3Value.z); + } + else { + EditorGUILayout.PropertyField(monochromeTiling, new GUIContent(" Tiling")); + } + } + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/NoiseAndGrainEditor.js.meta b/Assets/Editor/Image Effects/NoiseAndGrainEditor.js.meta new file mode 100644 index 0000000..a2f6c75 --- /dev/null +++ b/Assets/Editor/Image Effects/NoiseAndGrainEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 178e954e5548fe5419ef0614d731c36e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/SunShaftsEditor.js b/Assets/Editor/Image Effects/SunShaftsEditor.js new file mode 100644 index 0000000..49ed4d1 --- /dev/null +++ b/Assets/Editor/Image Effects/SunShaftsEditor.js @@ -0,0 +1,102 @@ + +#pragma strict + +@CustomEditor (SunShafts) + +class SunShaftsEditor extends Editor +{ + var serObj : SerializedObject; + + var sunTransform : SerializedProperty; + var radialBlurIterations : SerializedProperty; + var sunColor : SerializedProperty; + var sunThreshold : SerializedProperty; + var sunShaftBlurRadius : SerializedProperty; + var sunShaftIntensity : SerializedProperty; + var useDepthTexture : SerializedProperty; + var resolution : SerializedProperty; + var screenBlendMode : SerializedProperty; + var maxRadius : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + + sunTransform = serObj.FindProperty("sunTransform"); + sunColor = serObj.FindProperty("sunColor"); + sunThreshold = serObj.FindProperty("sunThreshold"); + + sunShaftBlurRadius = serObj.FindProperty("sunShaftBlurRadius"); + radialBlurIterations = serObj.FindProperty("radialBlurIterations"); + + sunShaftIntensity = serObj.FindProperty("sunShaftIntensity"); + + resolution = serObj.FindProperty("resolution"); + + maxRadius = serObj.FindProperty("maxRadius"); + + useDepthTexture = serObj.FindProperty("useDepthTexture"); + } + + function OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.BeginHorizontal(); + + var oldVal : boolean = useDepthTexture.boolValue; + EditorGUILayout.PropertyField (useDepthTexture, new GUIContent ("Rely on Z Buffer?")); + if((target as SunShafts).GetComponent(Camera)) + GUILayout.Label("Current camera mode: "+ (target as SunShafts).GetComponent(Camera).depthTextureMode, EditorStyles.miniBoldLabel); + + EditorGUILayout.EndHorizontal(); + + // depth buffer need + /* + var newVal : boolean = useDepthTexture.boolValue; + if (newVal != oldVal) { + if(newVal) + (target as SunShafts).camera.depthTextureMode |= DepthTextureMode.Depth; + else + (target as SunShafts).camera.depthTextureMode &= ~DepthTextureMode.Depth; + } + */ + + EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); + + EditorGUILayout.Separator (); + + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.PropertyField (sunTransform, new GUIContent("Shafts caster", "Chose a transform that acts as a root point for the produced sun shafts")); + if((target as SunShafts).sunTransform && (target as SunShafts).GetComponent(Camera)) { + if (GUILayout.Button("Center on " + (target as SunShafts).GetComponent(Camera).name)) { + if (EditorUtility.DisplayDialog ("Move sun shafts source?", "The SunShafts caster named "+ (target as SunShafts).sunTransform.name +"\n will be centered along "+(target as SunShafts).GetComponent(Camera).name+". Are you sure? ", "Please do", "Don't")) { + var ray : Ray = (target as SunShafts).GetComponent(Camera).ViewportPointToRay(Vector3(0.5,0.5,0)); + (target as SunShafts).sunTransform.position = ray.origin + ray.direction * 500.0; + (target as SunShafts).sunTransform.LookAt ((target as SunShafts).transform); + } + } + } + + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (sunThreshold, new GUIContent ("Threshold color")); + EditorGUILayout.PropertyField (sunColor, new GUIContent ("Shafts color")); + maxRadius.floatValue = 1.0f - EditorGUILayout.Slider ("Distance falloff", 1.0f - maxRadius.floatValue, 0.1, 1.0); + + EditorGUILayout.Separator (); + + sunShaftBlurRadius.floatValue = EditorGUILayout.Slider ("Blur size", sunShaftBlurRadius.floatValue, 1.0, 10.0); + radialBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", radialBlurIterations.intValue, 1, 3); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (sunShaftIntensity, new GUIContent("Intensity")); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/SunShaftsEditor.js.meta b/Assets/Editor/Image Effects/SunShaftsEditor.js.meta new file mode 100644 index 0000000..5addb16 --- /dev/null +++ b/Assets/Editor/Image Effects/SunShaftsEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d78256471dee4d869e7f18f13f73945 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/TonemappingEditor.js b/Assets/Editor/Image Effects/TonemappingEditor.js new file mode 100644 index 0000000..2c9ec2e --- /dev/null +++ b/Assets/Editor/Image Effects/TonemappingEditor.js @@ -0,0 +1,77 @@ + +#pragma strict + +@CustomEditor (Tonemapping) + +class TonemappingEditor extends Editor +{ + var serObj : SerializedObject; + + var type : SerializedProperty;; + + // CURVE specific parameter + var remapCurve : SerializedProperty; + + var exposureAdjustment : SerializedProperty; + + // REINHARD specific parameter + var middleGrey : SerializedProperty; + var white : SerializedProperty; + var adaptionSpeed : SerializedProperty; + var adaptiveTextureSize : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + type = serObj.FindProperty ("type"); + remapCurve = serObj.FindProperty ("remapCurve"); + exposureAdjustment = serObj.FindProperty ("exposureAdjustment"); + middleGrey = serObj.FindProperty ("middleGrey"); + white = serObj.FindProperty ("white"); + adaptionSpeed = serObj.FindProperty ("adaptionSpeed"); + adaptiveTextureSize = serObj.FindProperty("adaptiveTextureSize"); + } + + function OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label("Mapping HDR to LDR ranges since 1982", EditorStyles.miniLabel); + + var cam : Camera = (target as Tonemapping).GetComponent(Camera); + if(cam != null) { + if(!cam.hdr) { + EditorGUILayout.HelpBox("The camera is not HDR enabled. This will likely break the Tonemapper.", MessageType.Warning); + } + else if(!(target as Tonemapping).validRenderTextureFormat) { + EditorGUILayout.HelpBox("The input to Tonemapper is not in HDR. Make sure that all effects prior to this are executed in HDR.", MessageType.Warning); + } + } + + EditorGUILayout.PropertyField (type, new GUIContent ("Technique")); + + if (type.enumValueIndex == Tonemapping.TonemapperType.UserCurve) { + EditorGUILayout.PropertyField (remapCurve, new GUIContent ("Remap curve", "Specify the mapping of luminances yourself")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.SimpleReinhard) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.Hable) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.Photographic) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.OptimizedHejiDawson) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.AdaptiveReinhard) { + EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); + EditorGUILayout.PropertyField (white, new GUIContent ("White", "Smallest luminance value that will be mapped to white")); + EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); + EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); + } else if (type.enumValueIndex == Tonemapping.TonemapperType.AdaptiveReinhardAutoWhite) { + EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); + EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); + EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); + } + + GUILayout.Label("All following effects will use LDR color buffers", EditorStyles.miniBoldLabel); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/TonemappingEditor.js.meta b/Assets/Editor/Image Effects/TonemappingEditor.js.meta new file mode 100644 index 0000000..b127920 --- /dev/null +++ b/Assets/Editor/Image Effects/TonemappingEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 49b4d4c810eb44642b415cf62b24efe3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/Image Effects/VignettingEditor.js b/Assets/Editor/Image Effects/VignettingEditor.js new file mode 100644 index 0000000..23962a6 --- /dev/null +++ b/Assets/Editor/Image Effects/VignettingEditor.js @@ -0,0 +1,56 @@ + +#pragma strict + +@CustomEditor (Vignetting) +class VignettingEditor extends Editor +{ + var serObj : SerializedObject; + + var mode : SerializedProperty; + var intensity : SerializedProperty; // intensity == 0 disables pre pass (optimization) + var chromaticAberration : SerializedProperty; + var axialAberration : SerializedProperty; + var blur : SerializedProperty; // blur == 0 disables blur pass (optimization) + var blurSpread : SerializedProperty; + var blurDistance : SerializedProperty; + var luminanceDependency : SerializedProperty; + + function OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty ("mode"); + intensity = serObj.FindProperty ("intensity"); + chromaticAberration = serObj.FindProperty ("chromaticAberration"); + axialAberration = serObj.FindProperty ("axialAberration"); + blur = serObj.FindProperty ("blur"); + blurSpread = serObj.FindProperty ("blurSpread"); + luminanceDependency = serObj.FindProperty ("luminanceDependency"); + blurDistance = serObj.FindProperty ("blurDistance"); + } + + function OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.LabelField("Simulates the common lens artifacts 'Vignette' and 'Aberration'", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField (intensity, new GUIContent("Vignetting")); + EditorGUILayout.PropertyField (blur, new GUIContent(" Blurred Corners")); + if(blur.floatValue>0.0f) + EditorGUILayout.PropertyField (blurSpread, new GUIContent(" Blur Distance")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (mode, new GUIContent("Aberration")); + if(mode.intValue>0) + { + EditorGUILayout.PropertyField (chromaticAberration, new GUIContent(" Tangential Aberration")); + EditorGUILayout.PropertyField (axialAberration, new GUIContent(" Axial Aberration")); + luminanceDependency.floatValue = EditorGUILayout.Slider(" Contrast Dependency", luminanceDependency.floatValue, 0.001f, 1.0f); + blurDistance.floatValue = EditorGUILayout.Slider(" Blur Distance", blurDistance.floatValue, 0.001f, 5.0f); + } + else + EditorGUILayout.PropertyField (chromaticAberration, new GUIContent(" Chromatic Aberration")); + + serObj.ApplyModifiedProperties(); + } +} diff --git a/Assets/Editor/Image Effects/VignettingEditor.js.meta b/Assets/Editor/Image Effects/VignettingEditor.js.meta new file mode 100644 index 0000000..c0ab5d5 --- /dev/null +++ b/Assets/Editor/Image Effects/VignettingEditor.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9632fe331f54a4b7eb377365cc94b406 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Editor/LevelEditor.cs b/Assets/Editor/LevelEditor.cs new file mode 100644 index 0000000..ad9c713 --- /dev/null +++ b/Assets/Editor/LevelEditor.cs @@ -0,0 +1,97 @@ +using UnityEngine; +using UnityEditor; +using UnityEngine.UI; +using System.Collections; + +public class LevelEditor : EditorWindow +{ + string myString = "Hello World"; + bool groupEnabled; + bool myBool = true; + float myFloat = 1.23f; + public int pixelsToUnits = 8; + + + // Add menu item named "My Window" to the Window menu + [MenuItem("Window/LevelEditor")] + public static void ShowWindow() + { + //Show existing window instance. If one doesn't exist, make one. + EditorWindow.GetWindow(typeof(LevelEditor)); + + } + + public static LevelEditor GetEditor(){ + return (LevelEditor)EditorWindow.GetWindow(typeof(LevelEditor), false); + } + + [MenuItem ("LevelEditor/Aling position %g")] + public static void AlignStatic(){ + var editor = GetEditor(); + editor.AlignPositionToGrid(); + } + + float AlingToGrid(float value, float gridStep){ + float div = value / gridStep; + int cellId = Mathf.FloorToInt (div); + float frac = div - (float)cellId; + return (float)cellId * gridStep + (Mathf.Abs(frac) > 0.5f ? gridStep : 0.0f); + } + + Vector3 AlingToGrid(Vector3 value, float gridStep){ + return new Vector3 ( + AlingToGrid(value.x, gridStep), + AlingToGrid(value.y, gridStep), + value.z); + //AlingToGrid(value.z, gridStep)); + } + + void AlignPositionToGrid(){ + float gridStep = 1.0f / pixelsToUnits; + foreach(var obj in Selection.objects){ + GameObject go = obj as GameObject; + if(go != null){ + go.transform.position = AlingToGrid(go.transform.position, gridStep); + } + } + } + + void OnGUI() + { + pixelsToUnits = EditorGUILayout.IntField("PixelsToUnits", pixelsToUnits); + + GUILayout.Label ("Blocks alignment", EditorStyles.boldLabel); + if (GUILayout.Button ("Aling position to grid")) { + AlignPositionToGrid(); + } + + if (GUILayout.Button ("Aling rotation to grid")) { + foreach(var obj in Selection.objects){ + GameObject go = obj as GameObject; + if(go != null){ + go.transform.rotation = Quaternion.Euler(AlingToGrid(go.transform.rotation.eulerAngles, 45.0f)); + } + } + } + + if (GUILayout.Button("Add physics extension")) { + var rb = FindObjectsOfType(); + foreach (var body in rb) { + var ex = body.GetComponent(); + if (ex == null) { + ex = body.gameObject.AddComponent(); + Debug.Log("Add PhysicsEx to " + body.name); + } + } + //rb[0].worldCenterOfMass + // rb[0].GetPointVelocity() + } + + /*myString = EditorGUILayout.TextField ("Text Field", myString); + + groupEnabled = EditorGUILayout.BeginToggleGroup ("Optional Settings", groupEnabled); + myBool = EditorGUILayout.Toggle ("Toggle", myBool); + myFloat = EditorGUILayout.Slider ("Slider", myFloat, -3, 3); + EditorGUILayout.EndToggleGroup ();*/ + } +} \ No newline at end of file diff --git a/Assets/Editor/LevelEditor.cs.meta b/Assets/Editor/LevelEditor.cs.meta new file mode 100644 index 0000000..2b8d3b7 --- /dev/null +++ b/Assets/Editor/LevelEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5729c56e5cd10404ca4a13bf7d80522a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Fonts.meta b/Assets/Fonts.meta new file mode 100644 index 0000000..143ab3d --- /dev/null +++ b/Assets/Fonts.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 6e352a46861d5994f83491a11729128a +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Fonts/DS-DIGI.TTF b/Assets/Fonts/DS-DIGI.TTF new file mode 100644 index 0000000..0925877 Binary files /dev/null and b/Assets/Fonts/DS-DIGI.TTF differ diff --git a/Assets/Fonts/DS-DIGI.TTF.meta b/Assets/Fonts/DS-DIGI.TTF.meta new file mode 100644 index 0000000..7f8947c --- /dev/null +++ b/Assets/Fonts/DS-DIGI.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 3882584ccc3195b46835a63ac44ce805 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/DS-DIGIB.TTF b/Assets/Fonts/DS-DIGIB.TTF new file mode 100644 index 0000000..064ad47 Binary files /dev/null and b/Assets/Fonts/DS-DIGIB.TTF differ diff --git a/Assets/Fonts/DS-DIGIB.TTF.meta b/Assets/Fonts/DS-DIGIB.TTF.meta new file mode 100644 index 0000000..5684001 --- /dev/null +++ b/Assets/Fonts/DS-DIGIB.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 4eae5b550d3fa6f4bad188f33cb268e5 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/DS-DIGII.TTF b/Assets/Fonts/DS-DIGII.TTF new file mode 100644 index 0000000..2aae3d8 Binary files /dev/null and b/Assets/Fonts/DS-DIGII.TTF differ diff --git a/Assets/Fonts/DS-DIGII.TTF.meta b/Assets/Fonts/DS-DIGII.TTF.meta new file mode 100644 index 0000000..df69dc3 --- /dev/null +++ b/Assets/Fonts/DS-DIGII.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 04c15acc6f2e4d8459a9dddb6078ee6d +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/DS-DIGIT.TTF b/Assets/Fonts/DS-DIGIT.TTF new file mode 100644 index 0000000..65642f9 Binary files /dev/null and b/Assets/Fonts/DS-DIGIT.TTF differ diff --git a/Assets/Fonts/DS-DIGIT.TTF.meta b/Assets/Fonts/DS-DIGIT.TTF.meta new file mode 100644 index 0000000..801bd67 --- /dev/null +++ b/Assets/Fonts/DS-DIGIT.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: f503d38b88d222f4b9ce65700c6ec893 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/SLNTHLC.TTF b/Assets/Fonts/SLNTHLC.TTF new file mode 100644 index 0000000..303b959 Binary files /dev/null and b/Assets/Fonts/SLNTHLC.TTF differ diff --git a/Assets/Fonts/SLNTHLC.TTF.meta b/Assets/Fonts/SLNTHLC.TTF.meta new file mode 100644 index 0000000..bb4e535 --- /dev/null +++ b/Assets/Fonts/SLNTHLC.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 204d1d5a6aabf42468d63d408fed438a +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/SLNTHLE.TTF b/Assets/Fonts/SLNTHLE.TTF new file mode 100644 index 0000000..b4fec0f Binary files /dev/null and b/Assets/Fonts/SLNTHLE.TTF differ diff --git a/Assets/Fonts/SLNTHLE.TTF.meta b/Assets/Fonts/SLNTHLE.TTF.meta new file mode 100644 index 0000000..46b7918 --- /dev/null +++ b/Assets/Fonts/SLNTHLE.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 0b7e1036c188e9f44939047f36c3c5c7 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Fonts/SLNTHLN.TTF b/Assets/Fonts/SLNTHLN.TTF new file mode 100644 index 0000000..88a9f83 Binary files /dev/null and b/Assets/Fonts/SLNTHLN.TTF differ diff --git a/Assets/Fonts/SLNTHLN.TTF.meta b/Assets/Fonts/SLNTHLN.TTF.meta new file mode 100644 index 0000000..85c721e --- /dev/null +++ b/Assets/Fonts/SLNTHLN.TTF.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: ab770c92ff41f3d4db57aa0bb5b5a173 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: diff --git a/Assets/Gizmos.meta b/Assets/Gizmos.meta new file mode 100644 index 0000000..6d96e9c --- /dev/null +++ b/Assets/Gizmos.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 4948f0f4f0ddec942804cff4f9983f31 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Gizmos/ActionController Icon.png b/Assets/Gizmos/ActionController Icon.png new file mode 100644 index 0000000..634e3b3 Binary files /dev/null and b/Assets/Gizmos/ActionController Icon.png differ diff --git a/Assets/Gizmos/ActionController Icon.png.meta b/Assets/Gizmos/ActionController Icon.png.meta new file mode 100644 index 0000000..865563b --- /dev/null +++ b/Assets/Gizmos/ActionController Icon.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 09ff7e2c25ffd6c4b943f2a794d2195b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Gizmos/Behavior Designer Hier Icon.png b/Assets/Gizmos/Behavior Designer Hier Icon.png new file mode 100644 index 0000000..1b4f933 Binary files /dev/null and b/Assets/Gizmos/Behavior Designer Hier Icon.png differ diff --git a/Assets/Gizmos/Behavior Designer Hier Icon.png.meta b/Assets/Gizmos/Behavior Designer Hier Icon.png.meta new file mode 100644 index 0000000..f17e986 --- /dev/null +++ b/Assets/Gizmos/Behavior Designer Hier Icon.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 00fc39fa481dfff4eb4e7272a099d88d +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Gizmos/Behavior Designer Scene Icon.png b/Assets/Gizmos/Behavior Designer Scene Icon.png new file mode 100644 index 0000000..5e67cae Binary files /dev/null and b/Assets/Gizmos/Behavior Designer Scene Icon.png differ diff --git a/Assets/Gizmos/Behavior Designer Scene Icon.png.meta b/Assets/Gizmos/Behavior Designer Scene Icon.png.meta new file mode 100644 index 0000000..3e9bce8 --- /dev/null +++ b/Assets/Gizmos/Behavior Designer Scene Icon.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: ec60799ece7b47343a3b6c439ec63c1c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Gizmos/Health Icon.png b/Assets/Gizmos/Health Icon.png new file mode 100644 index 0000000..634e3b3 Binary files /dev/null and b/Assets/Gizmos/Health Icon.png differ diff --git a/Assets/Gizmos/Health Icon.png.meta b/Assets/Gizmos/Health Icon.png.meta new file mode 100644 index 0000000..c75821a --- /dev/null +++ b/Assets/Gizmos/Health Icon.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 11db39be690353640b81b2d342ffeb4f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials.meta b/Assets/Materials.meta new file mode 100644 index 0000000..63ca3f0 --- /dev/null +++ b/Assets/Materials.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 256a61eb8385f1f46b8419f646b14096 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/BlackSprite.mat b/Assets/Materials/BlackSprite.mat new file mode 100644 index 0000000..28b7bce Binary files /dev/null and b/Assets/Materials/BlackSprite.mat differ diff --git a/Assets/Materials/BlackSprite.mat.meta b/Assets/Materials/BlackSprite.mat.meta new file mode 100644 index 0000000..db6e0e9 --- /dev/null +++ b/Assets/Materials/BlackSprite.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1008a0df24ef4ce478220abaa9ff5515 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/BodyMaterial.physicsMaterial2D b/Assets/Materials/BodyMaterial.physicsMaterial2D new file mode 100644 index 0000000..b419e4e Binary files /dev/null and b/Assets/Materials/BodyMaterial.physicsMaterial2D differ diff --git a/Assets/Materials/BodyMaterial.physicsMaterial2D.meta b/Assets/Materials/BodyMaterial.physicsMaterial2D.meta new file mode 100644 index 0000000..8de1e74 --- /dev/null +++ b/Assets/Materials/BodyMaterial.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 247a053c22235ca4baf81d4473c8ee2e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/CameraMotionController.cs b/Assets/Materials/CameraMotionController.cs new file mode 100644 index 0000000..fd1b845 --- /dev/null +++ b/Assets/Materials/CameraMotionController.cs @@ -0,0 +1,105 @@ +using UnityEngine; +using System.Collections; + +public class CameraMotionController : MonoBehaviour { + public GameObject player; + public float staticRectangleWidth = 200; + public float staticRectangleHeight = 200; + public bool drawDebug = true; + private Camera camera; + private Rect staticRect; + public bool SpritePixels = true; + public PixelPerfectCamera pixelController; + + + // Use this for initialization + void Start () { + camera = gameObject.GetComponent(); + staticRect = new Rect(); + } + + // Update is called once per frame + void LateUpdate () { + UpdateRectangle(); + MoveCameraToPlayer(); + } + + void OnLevelWasLoaded(int level) { + Debug.LogWarning("Loaded level: " + level); + } + + void MoveCameraToPlayer(){ + var pb = player.GetComponent().bounds; + var playerRect = Tools.BoundsToRect(pb); + + Vector3 offset = Vector3.zero; + + var rightOffset = staticRect.xMax - playerRect.xMax; + var leftOffset = staticRect.xMin - playerRect.xMin; + + var topOffset = staticRect.yMax - playerRect.yMax; + var bottomOffset = staticRect.yMin - playerRect.yMin; + + if(rightOffset < 0){ + offset -= Vector3.right * rightOffset; + } + + if(leftOffset > 0){ + offset -= Vector3.right * leftOffset; + } + + if(bottomOffset > 0){ + offset -= Vector3.up * bottomOffset; + } + + if(topOffset < 0){ + offset -= Vector3.up * topOffset; + } + + transform.position += offset * Time.deltaTime * 5; + + } + + void UpdateRectangle(){ + float camUnitHeight = camera.orthographicSize * 2; + float camPixelsToUnits = camUnitHeight / camera.pixelHeight; + + + + float unitHW = staticRectangleWidth * 0.5f * camPixelsToUnits; + float unitHH = staticRectangleHeight * 0.5f * camPixelsToUnits; + + if(SpritePixels && pixelController != null){ + unitHW *= pixelController.zoom; + unitHH *= pixelController.zoom; + } + + Vector2 center = transform.position; + + staticRect.x = center.x - unitHW; + staticRect.y = center.y - unitHH; + staticRect.width = unitHW * 2; + staticRect.height = unitHH * 2; + + + } + + void OnDrawGizmosSelected(){ + if(staticRect == null){ + staticRect = new Rect(); + } + if(camera == null){ + camera = gameObject.GetComponent(); + } + UpdateRectangle(); + if(drawDebug){ + + var pb = player.GetComponent().bounds; + var rect = new Rect(pb.min.x, pb.min.y, pb.max.x - pb.min.x, pb.max.y - pb.min.y); + //Tools.BeginGui(false); + bool i = staticRect.Overlaps(rect); + Tools.DrawRectangle(staticRect, i ? new Color(0,1,0,0.3f) : new Color(1,0,0,0.3f)); + //Tools.EndGui(); + } + } +} diff --git a/Assets/Materials/CameraMotionController.cs.meta b/Assets/Materials/CameraMotionController.cs.meta new file mode 100644 index 0000000..057de0d --- /dev/null +++ b/Assets/Materials/CameraMotionController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e91c551e7ff829349ad26a5c9f92b6ea +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Materials/CardRed.mat b/Assets/Materials/CardRed.mat new file mode 100644 index 0000000..6e438c5 Binary files /dev/null and b/Assets/Materials/CardRed.mat differ diff --git a/Assets/Materials/CardRed.mat.meta b/Assets/Materials/CardRed.mat.meta new file mode 100644 index 0000000..7a64c5b --- /dev/null +++ b/Assets/Materials/CardRed.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 7c0f2f7b15fcedf4db1396948cd8a5b8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/CityBackground.mat b/Assets/Materials/CityBackground.mat new file mode 100644 index 0000000..2f2db39 Binary files /dev/null and b/Assets/Materials/CityBackground.mat differ diff --git a/Assets/Materials/CityBackground.mat.meta b/Assets/Materials/CityBackground.mat.meta new file mode 100644 index 0000000..013c7eb --- /dev/null +++ b/Assets/Materials/CityBackground.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 749950ad239c3654e8f5fbf653ddf7c4 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/DeadBodyMaterial.physicsMaterial2D b/Assets/Materials/DeadBodyMaterial.physicsMaterial2D new file mode 100644 index 0000000..b419e4e Binary files /dev/null and b/Assets/Materials/DeadBodyMaterial.physicsMaterial2D differ diff --git a/Assets/Materials/DeadBodyMaterial.physicsMaterial2D.meta b/Assets/Materials/DeadBodyMaterial.physicsMaterial2D.meta new file mode 100644 index 0000000..4b83c70 --- /dev/null +++ b/Assets/Materials/DeadBodyMaterial.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2110c428dd13ee94e820635147e1374e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/DoorWayBG.mat b/Assets/Materials/DoorWayBG.mat new file mode 100644 index 0000000..b234b4d Binary files /dev/null and b/Assets/Materials/DoorWayBG.mat differ diff --git a/Assets/Materials/DoorWayBG.mat.meta b/Assets/Materials/DoorWayBG.mat.meta new file mode 100644 index 0000000..66cb487 --- /dev/null +++ b/Assets/Materials/DoorWayBG.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3ba507ba2918f674f92c64d1e0d00f6a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/DoorWayFrame.mat b/Assets/Materials/DoorWayFrame.mat new file mode 100644 index 0000000..4f02e72 Binary files /dev/null and b/Assets/Materials/DoorWayFrame.mat differ diff --git a/Assets/Materials/DoorWayFrame.mat.meta b/Assets/Materials/DoorWayFrame.mat.meta new file mode 100644 index 0000000..fe20315 --- /dev/null +++ b/Assets/Materials/DoorWayFrame.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: dee209359da750a41aad099ad9761004 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/ElevatorController.mat b/Assets/Materials/ElevatorController.mat new file mode 100644 index 0000000..6f9950e Binary files /dev/null and b/Assets/Materials/ElevatorController.mat differ diff --git a/Assets/Materials/ElevatorController.mat.meta b/Assets/Materials/ElevatorController.mat.meta new file mode 100644 index 0000000..539b1c5 --- /dev/null +++ b/Assets/Materials/ElevatorController.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 26be46f10ce60f543bd72a2b1470c62c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/ElevatorGround.mat b/Assets/Materials/ElevatorGround.mat new file mode 100644 index 0000000..cc4c622 Binary files /dev/null and b/Assets/Materials/ElevatorGround.mat differ diff --git a/Assets/Materials/ElevatorGround.mat.meta b/Assets/Materials/ElevatorGround.mat.meta new file mode 100644 index 0000000..6420c84 --- /dev/null +++ b/Assets/Materials/ElevatorGround.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 89175d26136b1744089d9c08f67413bb +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Enemy.mat b/Assets/Materials/Enemy.mat new file mode 100644 index 0000000..0007841 Binary files /dev/null and b/Assets/Materials/Enemy.mat differ diff --git a/Assets/Materials/Enemy.mat.meta b/Assets/Materials/Enemy.mat.meta new file mode 100644 index 0000000..c151ae1 --- /dev/null +++ b/Assets/Materials/Enemy.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 517b9e85b303d7a428dbf0167ca602fa +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Fan.mat b/Assets/Materials/Fan.mat new file mode 100644 index 0000000..2b44853 Binary files /dev/null and b/Assets/Materials/Fan.mat differ diff --git a/Assets/Materials/Fan.mat.meta b/Assets/Materials/Fan.mat.meta new file mode 100644 index 0000000..d6c5d5b --- /dev/null +++ b/Assets/Materials/Fan.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b70bbe54052fd7b4da7f018b375d67fa +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/FloorSlab.mat b/Assets/Materials/FloorSlab.mat new file mode 100644 index 0000000..6936b0b Binary files /dev/null and b/Assets/Materials/FloorSlab.mat differ diff --git a/Assets/Materials/FloorSlab.mat.meta b/Assets/Materials/FloorSlab.mat.meta new file mode 100644 index 0000000..37f9527 --- /dev/null +++ b/Assets/Materials/FloorSlab.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ceb20877cb4ddef4dbef1c9101cffd8c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/GreenCard.mat b/Assets/Materials/GreenCard.mat new file mode 100644 index 0000000..54ec4e8 Binary files /dev/null and b/Assets/Materials/GreenCard.mat differ diff --git a/Assets/Materials/GreenCard.mat.meta b/Assets/Materials/GreenCard.mat.meta new file mode 100644 index 0000000..9cca21d --- /dev/null +++ b/Assets/Materials/GreenCard.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 21882795a3c135942afbb7501f51fc76 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/LaserDevice.mat b/Assets/Materials/LaserDevice.mat new file mode 100644 index 0000000..2fbf431 Binary files /dev/null and b/Assets/Materials/LaserDevice.mat differ diff --git a/Assets/Materials/LaserDevice.mat.meta b/Assets/Materials/LaserDevice.mat.meta new file mode 100644 index 0000000..2f44269 --- /dev/null +++ b/Assets/Materials/LaserDevice.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a3f527c1131cdd54c8a7bdfb409ee251 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/LaserRay.mat b/Assets/Materials/LaserRay.mat new file mode 100644 index 0000000..cf2182c Binary files /dev/null and b/Assets/Materials/LaserRay.mat differ diff --git a/Assets/Materials/LaserRay.mat.meta b/Assets/Materials/LaserRay.mat.meta new file mode 100644 index 0000000..8843026 --- /dev/null +++ b/Assets/Materials/LaserRay.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4dcd18ae8fcf87441b7dc388c7811482 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Mine.mat b/Assets/Materials/Mine.mat new file mode 100644 index 0000000..202198b Binary files /dev/null and b/Assets/Materials/Mine.mat differ diff --git a/Assets/Materials/Mine.mat.meta b/Assets/Materials/Mine.mat.meta new file mode 100644 index 0000000..289622d --- /dev/null +++ b/Assets/Materials/Mine.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0eee01ddf557fcb4f86bf56029ab8221 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/New Material 1.mat b/Assets/Materials/New Material 1.mat new file mode 100644 index 0000000..1ad6e93 Binary files /dev/null and b/Assets/Materials/New Material 1.mat differ diff --git a/Assets/Materials/New Material 1.mat.meta b/Assets/Materials/New Material 1.mat.meta new file mode 100644 index 0000000..ffe872b --- /dev/null +++ b/Assets/Materials/New Material 1.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2a456b02b0b5434408ee8091551406c3 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/New Material.mat b/Assets/Materials/New Material.mat new file mode 100644 index 0000000..1b543a1 Binary files /dev/null and b/Assets/Materials/New Material.mat differ diff --git a/Assets/Materials/New Material.mat.meta b/Assets/Materials/New Material.mat.meta new file mode 100644 index 0000000..d4749a3 --- /dev/null +++ b/Assets/Materials/New Material.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 26e06356950130c4c9da00b713ec6690 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/OusideWall.mat b/Assets/Materials/OusideWall.mat new file mode 100644 index 0000000..1d9a26d Binary files /dev/null and b/Assets/Materials/OusideWall.mat differ diff --git a/Assets/Materials/OusideWall.mat.meta b/Assets/Materials/OusideWall.mat.meta new file mode 100644 index 0000000..844e672 --- /dev/null +++ b/Assets/Materials/OusideWall.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2e5f2d2c98db83d438726ebfca915f44 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Player.mat b/Assets/Materials/Player.mat new file mode 100644 index 0000000..4ec3ba1 Binary files /dev/null and b/Assets/Materials/Player.mat differ diff --git a/Assets/Materials/Player.mat.meta b/Assets/Materials/Player.mat.meta new file mode 100644 index 0000000..2577a0f --- /dev/null +++ b/Assets/Materials/Player.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 35fd8be7b6bd48e49b34116345e86fd0 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/SaveMat.mat b/Assets/Materials/SaveMat.mat new file mode 100644 index 0000000..2fc816a Binary files /dev/null and b/Assets/Materials/SaveMat.mat differ diff --git a/Assets/Materials/SaveMat.mat.meta b/Assets/Materials/SaveMat.mat.meta new file mode 100644 index 0000000..855caf8 --- /dev/null +++ b/Assets/Materials/SaveMat.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3d10bc9dd9b478c4d8b9162226bcc29a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Stair.physicsMaterial2D b/Assets/Materials/Stair.physicsMaterial2D new file mode 100644 index 0000000..c857a26 Binary files /dev/null and b/Assets/Materials/Stair.physicsMaterial2D differ diff --git a/Assets/Materials/Stair.physicsMaterial2D.meta b/Assets/Materials/Stair.physicsMaterial2D.meta new file mode 100644 index 0000000..f826f7a --- /dev/null +++ b/Assets/Materials/Stair.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e018d17c39605cb45acc772d218003e8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/StairMaterial.physicsMaterial2D b/Assets/Materials/StairMaterial.physicsMaterial2D new file mode 100644 index 0000000..07a65b6 Binary files /dev/null and b/Assets/Materials/StairMaterial.physicsMaterial2D differ diff --git a/Assets/Materials/StairMaterial.physicsMaterial2D.meta b/Assets/Materials/StairMaterial.physicsMaterial2D.meta new file mode 100644 index 0000000..618d5a0 --- /dev/null +++ b/Assets/Materials/StairMaterial.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 23489dec0f476714fb4b4432d87899f7 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Tube.mat b/Assets/Materials/Tube.mat new file mode 100644 index 0000000..371fcaa Binary files /dev/null and b/Assets/Materials/Tube.mat differ diff --git a/Assets/Materials/Tube.mat.meta b/Assets/Materials/Tube.mat.meta new file mode 100644 index 0000000..3b139b4 --- /dev/null +++ b/Assets/Materials/Tube.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: aac71e63902ae6943b1bb3da3c192371 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/WallDefault.mat b/Assets/Materials/WallDefault.mat new file mode 100644 index 0000000..657093c Binary files /dev/null and b/Assets/Materials/WallDefault.mat differ diff --git a/Assets/Materials/WallDefault.mat.meta b/Assets/Materials/WallDefault.mat.meta new file mode 100644 index 0000000..c904e53 --- /dev/null +++ b/Assets/Materials/WallDefault.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e0470a0c73181614791597b5b1ed7a89 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/WallDefault2.mat b/Assets/Materials/WallDefault2.mat new file mode 100644 index 0000000..8a92eec Binary files /dev/null and b/Assets/Materials/WallDefault2.mat differ diff --git a/Assets/Materials/WallDefault2.mat.meta b/Assets/Materials/WallDefault2.mat.meta new file mode 100644 index 0000000..0df91d9 --- /dev/null +++ b/Assets/Materials/WallDefault2.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 33ba3c98cc3980a488e40dc6d2d29ac1 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Wires.mat b/Assets/Materials/Wires.mat new file mode 100644 index 0000000..8d09340 Binary files /dev/null and b/Assets/Materials/Wires.mat differ diff --git a/Assets/Materials/Wires.mat.meta b/Assets/Materials/Wires.mat.meta new file mode 100644 index 0000000..24f2492 --- /dev/null +++ b/Assets/Materials/Wires.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 315112fd2d420f4438daab5929e241be +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Wires_bg.mat b/Assets/Materials/Wires_bg.mat new file mode 100644 index 0000000..68e886e Binary files /dev/null and b/Assets/Materials/Wires_bg.mat differ diff --git a/Assets/Materials/Wires_bg.mat.meta b/Assets/Materials/Wires_bg.mat.meta new file mode 100644 index 0000000..99df012 --- /dev/null +++ b/Assets/Materials/Wires_bg.mat.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ae7408343e07eef49931a51d8749c02d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/Wood.physicsMaterial2D b/Assets/Materials/Wood.physicsMaterial2D new file mode 100644 index 0000000..cd4d456 Binary files /dev/null and b/Assets/Materials/Wood.physicsMaterial2D differ diff --git a/Assets/Materials/Wood.physicsMaterial2D.meta b/Assets/Materials/Wood.physicsMaterial2D.meta new file mode 100644 index 0000000..e0a0393 --- /dev/null +++ b/Assets/Materials/Wood.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8c3734cc2dfe45a40a4733443304155c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Materials/ZeroFriction.physicsMaterial2D b/Assets/Materials/ZeroFriction.physicsMaterial2D new file mode 100644 index 0000000..b5fae40 Binary files /dev/null and b/Assets/Materials/ZeroFriction.physicsMaterial2D differ diff --git a/Assets/Materials/ZeroFriction.physicsMaterial2D.meta b/Assets/Materials/ZeroFriction.physicsMaterial2D.meta new file mode 100644 index 0000000..fe2edcf --- /dev/null +++ b/Assets/Materials/ZeroFriction.physicsMaterial2D.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 21786137419eebd48b0ec9af80e6d3ce +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Menu.meta b/Assets/Menu.meta new file mode 100644 index 0000000..95e6e46 --- /dev/null +++ b/Assets/Menu.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 0779b4eee3c91d04db279a12e7b1c3dc +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Menu/FadeIn.anim b/Assets/Menu/FadeIn.anim new file mode 100644 index 0000000..a266b00 Binary files /dev/null and b/Assets/Menu/FadeIn.anim differ diff --git a/Assets/Menu/FadeIn.anim.meta b/Assets/Menu/FadeIn.anim.meta new file mode 100644 index 0000000..ff6466a --- /dev/null +++ b/Assets/Menu/FadeIn.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 992ab10b4e175ac4a9d328655394b3d6 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Menu/Image.controller b/Assets/Menu/Image.controller new file mode 100644 index 0000000..89e4761 Binary files /dev/null and b/Assets/Menu/Image.controller differ diff --git a/Assets/Menu/Image.controller.meta b/Assets/Menu/Image.controller.meta new file mode 100644 index 0000000..d16f4bf --- /dev/null +++ b/Assets/Menu/Image.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9436d5161cd8f7b47bdf249c4277a71f +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg b/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg new file mode 100644 index 0000000..f718f20 Binary files /dev/null and b/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg differ diff --git a/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg.meta b/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg.meta new file mode 100644 index 0000000..cf882f8 --- /dev/null +++ b/Assets/Menu/smoke_texture5_by_ashensorrow-d3g74bf.jpg.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: baf9ec4776e93fe4da6d71dc8679da34 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: smoke_texture5_by_ashensorrow-d3g74bf + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..bd4584d --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 6365f57d58e9a7247929b60d47799d19 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Plugins/UnityEngine.UI.dll b/Assets/Plugins/UnityEngine.UI.dll new file mode 100644 index 0000000..b2b67b1 Binary files /dev/null and b/Assets/Plugins/UnityEngine.UI.dll differ diff --git a/Assets/Plugins/UnityEngine.UI.dll.meta b/Assets/Plugins/UnityEngine.UI.dll.meta new file mode 100644 index 0000000..d500d6a --- /dev/null +++ b/Assets/Plugins/UnityEngine.UI.dll.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ad1782ce401172e43be9817202cc2fb3 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + userData: + assetBundleName: diff --git a/Assets/Prefabs.meta b/Assets/Prefabs.meta new file mode 100644 index 0000000..be6fdc7 --- /dev/null +++ b/Assets/Prefabs.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: bb8ff04c52b22b54e9bb90a9c7a51148 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/AmbientSwitch.prefab b/Assets/Prefabs/AmbientSwitch.prefab new file mode 100644 index 0000000..2242895 Binary files /dev/null and b/Assets/Prefabs/AmbientSwitch.prefab differ diff --git a/Assets/Prefabs/AmbientSwitch.prefab.meta b/Assets/Prefabs/AmbientSwitch.prefab.meta new file mode 100644 index 0000000..5df6559 --- /dev/null +++ b/Assets/Prefabs/AmbientSwitch.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e20f556fe88a9ec4f8f2bdaa79cd2ea3 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Big_wall.prefab b/Assets/Prefabs/Big_wall.prefab new file mode 100644 index 0000000..49813d2 Binary files /dev/null and b/Assets/Prefabs/Big_wall.prefab differ diff --git a/Assets/Prefabs/Big_wall.prefab.meta b/Assets/Prefabs/Big_wall.prefab.meta new file mode 100644 index 0000000..73d2248 --- /dev/null +++ b/Assets/Prefabs/Big_wall.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e09d42e2b4b7c334b830d5c5b349c148 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Big_wall_doorway.prefab b/Assets/Prefabs/Big_wall_doorway.prefab new file mode 100644 index 0000000..1b57ca0 Binary files /dev/null and b/Assets/Prefabs/Big_wall_doorway.prefab differ diff --git a/Assets/Prefabs/Big_wall_doorway.prefab.meta b/Assets/Prefabs/Big_wall_doorway.prefab.meta new file mode 100644 index 0000000..757956a --- /dev/null +++ b/Assets/Prefabs/Big_wall_doorway.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9e9afb3e1d80d6a4699a2c80232a738d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/BreakableCrate.prefab b/Assets/Prefabs/BreakableCrate.prefab new file mode 100644 index 0000000..152140a Binary files /dev/null and b/Assets/Prefabs/BreakableCrate.prefab differ diff --git a/Assets/Prefabs/BreakableCrate.prefab.meta b/Assets/Prefabs/BreakableCrate.prefab.meta new file mode 100644 index 0000000..793af0c --- /dev/null +++ b/Assets/Prefabs/BreakableCrate.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e09317843035d7249b81b14f89c284e8 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/CargoLift.prefab b/Assets/Prefabs/CargoLift.prefab new file mode 100644 index 0000000..1f30f07 Binary files /dev/null and b/Assets/Prefabs/CargoLift.prefab differ diff --git a/Assets/Prefabs/CargoLift.prefab.meta b/Assets/Prefabs/CargoLift.prefab.meta new file mode 100644 index 0000000..8299168 --- /dev/null +++ b/Assets/Prefabs/CargoLift.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9ca3b99ff03ba6a428c74e41a6d6198b +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/DigitalPadGUI.prefab b/Assets/Prefabs/DigitalPadGUI.prefab new file mode 100644 index 0000000..2e535f3 Binary files /dev/null and b/Assets/Prefabs/DigitalPadGUI.prefab differ diff --git a/Assets/Prefabs/DigitalPadGUI.prefab.meta b/Assets/Prefabs/DigitalPadGUI.prefab.meta new file mode 100644 index 0000000..42b5022 --- /dev/null +++ b/Assets/Prefabs/DigitalPadGUI.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1a2e783cd4e027240b8b57e742e14ad7 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Enemy.prefab b/Assets/Prefabs/Enemy.prefab new file mode 100644 index 0000000..0944f56 Binary files /dev/null and b/Assets/Prefabs/Enemy.prefab differ diff --git a/Assets/Prefabs/Enemy.prefab.meta b/Assets/Prefabs/Enemy.prefab.meta new file mode 100644 index 0000000..aebca2b --- /dev/null +++ b/Assets/Prefabs/Enemy.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bfd76832092fb7e458134dc27d7bc5cb +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/ExplosionEffect.prefab b/Assets/Prefabs/ExplosionEffect.prefab new file mode 100644 index 0000000..8479d08 Binary files /dev/null and b/Assets/Prefabs/ExplosionEffect.prefab differ diff --git a/Assets/Prefabs/ExplosionEffect.prefab.meta b/Assets/Prefabs/ExplosionEffect.prefab.meta new file mode 100644 index 0000000..f1d19de --- /dev/null +++ b/Assets/Prefabs/ExplosionEffect.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 57dd68f1d30c86d4590f1aa6125611bb +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/ExplosionSound.prefab b/Assets/Prefabs/ExplosionSound.prefab new file mode 100644 index 0000000..a1c497f Binary files /dev/null and b/Assets/Prefabs/ExplosionSound.prefab differ diff --git a/Assets/Prefabs/ExplosionSound.prefab.meta b/Assets/Prefabs/ExplosionSound.prefab.meta new file mode 100644 index 0000000..1cf1b15 --- /dev/null +++ b/Assets/Prefabs/ExplosionSound.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0d57d9cfdd51d7b45bfc4036afb1f09b +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Fan_p1.prefab b/Assets/Prefabs/Fan_p1.prefab new file mode 100644 index 0000000..5075266 Binary files /dev/null and b/Assets/Prefabs/Fan_p1.prefab differ diff --git a/Assets/Prefabs/Fan_p1.prefab.meta b/Assets/Prefabs/Fan_p1.prefab.meta new file mode 100644 index 0000000..3982ba9 --- /dev/null +++ b/Assets/Prefabs/Fan_p1.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f1fddfffcc324464faeb6c65a8afc347 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/FloorSlab.prefab b/Assets/Prefabs/FloorSlab.prefab new file mode 100644 index 0000000..7585def Binary files /dev/null and b/Assets/Prefabs/FloorSlab.prefab differ diff --git a/Assets/Prefabs/FloorSlab.prefab.meta b/Assets/Prefabs/FloorSlab.prefab.meta new file mode 100644 index 0000000..96c9928 --- /dev/null +++ b/Assets/Prefabs/FloorSlab.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2adac9437cb7a064c8be3729e827b424 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/FloorWall.prefab b/Assets/Prefabs/FloorWall.prefab new file mode 100644 index 0000000..9ba0383 Binary files /dev/null and b/Assets/Prefabs/FloorWall.prefab differ diff --git a/Assets/Prefabs/FloorWall.prefab.meta b/Assets/Prefabs/FloorWall.prefab.meta new file mode 100644 index 0000000..e8a0775 --- /dev/null +++ b/Assets/Prefabs/FloorWall.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ac8fd9a6b2378dc46983f047ea464992 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/ItemView.prefab b/Assets/Prefabs/ItemView.prefab new file mode 100644 index 0000000..2374476 Binary files /dev/null and b/Assets/Prefabs/ItemView.prefab differ diff --git a/Assets/Prefabs/ItemView.prefab.meta b/Assets/Prefabs/ItemView.prefab.meta new file mode 100644 index 0000000..ecfa2d6 --- /dev/null +++ b/Assets/Prefabs/ItemView.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 40a119e2334ca964983f01926a6a01a5 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Items.meta b/Assets/Prefabs/Items.meta new file mode 100644 index 0000000..e124b91 --- /dev/null +++ b/Assets/Prefabs/Items.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 2a889585143a6f94a918ddd011b3d267 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Items/Pistol.prefab b/Assets/Prefabs/Items/Pistol.prefab new file mode 100644 index 0000000..66ecc8f Binary files /dev/null and b/Assets/Prefabs/Items/Pistol.prefab differ diff --git a/Assets/Prefabs/Items/Pistol.prefab.meta b/Assets/Prefabs/Items/Pistol.prefab.meta new file mode 100644 index 0000000..5f10ee8 --- /dev/null +++ b/Assets/Prefabs/Items/Pistol.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c136177f8b7e54e44adcea75c6f7bb64 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Items/RedCard.prefab b/Assets/Prefabs/Items/RedCard.prefab new file mode 100644 index 0000000..e59c5c9 Binary files /dev/null and b/Assets/Prefabs/Items/RedCard.prefab differ diff --git a/Assets/Prefabs/Items/RedCard.prefab.meta b/Assets/Prefabs/Items/RedCard.prefab.meta new file mode 100644 index 0000000..f6e469b --- /dev/null +++ b/Assets/Prefabs/Items/RedCard.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b3c7f0651855547428a995b53a0f4b0e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Lamp_ceiling.prefab b/Assets/Prefabs/Lamp_ceiling.prefab new file mode 100644 index 0000000..19b00da Binary files /dev/null and b/Assets/Prefabs/Lamp_ceiling.prefab differ diff --git a/Assets/Prefabs/Lamp_ceiling.prefab.meta b/Assets/Prefabs/Lamp_ceiling.prefab.meta new file mode 100644 index 0000000..19e2164 --- /dev/null +++ b/Assets/Prefabs/Lamp_ceiling.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0a5a62deecc4bce4887248b0fc26dc81 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/LaserWall.prefab b/Assets/Prefabs/LaserWall.prefab new file mode 100644 index 0000000..e53c746 Binary files /dev/null and b/Assets/Prefabs/LaserWall.prefab differ diff --git a/Assets/Prefabs/LaserWall.prefab.meta b/Assets/Prefabs/LaserWall.prefab.meta new file mode 100644 index 0000000..95a07a6 --- /dev/null +++ b/Assets/Prefabs/LaserWall.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 514561ffb5703254cadab3608ca6b371 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Led1x1.prefab b/Assets/Prefabs/Led1x1.prefab new file mode 100644 index 0000000..c51afe5 Binary files /dev/null and b/Assets/Prefabs/Led1x1.prefab differ diff --git a/Assets/Prefabs/Led1x1.prefab.meta b/Assets/Prefabs/Led1x1.prefab.meta new file mode 100644 index 0000000..74a3421 --- /dev/null +++ b/Assets/Prefabs/Led1x1.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 216bb9d09bec54c41af6eb665c16b901 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/MainMenu.prefab b/Assets/Prefabs/MainMenu.prefab new file mode 100644 index 0000000..956a71b Binary files /dev/null and b/Assets/Prefabs/MainMenu.prefab differ diff --git a/Assets/Prefabs/MainMenu.prefab.meta b/Assets/Prefabs/MainMenu.prefab.meta new file mode 100644 index 0000000..d03e9a0 --- /dev/null +++ b/Assets/Prefabs/MainMenu.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0c387bd7befad7d49a4f13273fc2e715 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/Mine.prefab b/Assets/Prefabs/Mine.prefab new file mode 100644 index 0000000..a2142be Binary files /dev/null and b/Assets/Prefabs/Mine.prefab differ diff --git a/Assets/Prefabs/Mine.prefab.meta b/Assets/Prefabs/Mine.prefab.meta new file mode 100644 index 0000000..fceb4d2 --- /dev/null +++ b/Assets/Prefabs/Mine.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4da85513f3485534aa9ca9a08854ed15 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/PlayerSensor.prefab b/Assets/Prefabs/PlayerSensor.prefab new file mode 100644 index 0000000..0ae36bd Binary files /dev/null and b/Assets/Prefabs/PlayerSensor.prefab differ diff --git a/Assets/Prefabs/PlayerSensor.prefab.meta b/Assets/Prefabs/PlayerSensor.prefab.meta new file mode 100644 index 0000000..1e6c0f2 --- /dev/null +++ b/Assets/Prefabs/PlayerSensor.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e0b82ce2a39c7c8488f662640018f980 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/SimpleDelayDetonator.prefab b/Assets/Prefabs/SimpleDelayDetonator.prefab new file mode 100644 index 0000000..ce09c65 Binary files /dev/null and b/Assets/Prefabs/SimpleDelayDetonator.prefab differ diff --git a/Assets/Prefabs/SimpleDelayDetonator.prefab.meta b/Assets/Prefabs/SimpleDelayDetonator.prefab.meta new file mode 100644 index 0000000..fc8b64c --- /dev/null +++ b/Assets/Prefabs/SimpleDelayDetonator.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 49ed1dcd8e792ba448a68c7470b832e5 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/WallDoorRight.prefab b/Assets/Prefabs/WallDoorRight.prefab new file mode 100644 index 0000000..7fbc54c Binary files /dev/null and b/Assets/Prefabs/WallDoorRight.prefab differ diff --git a/Assets/Prefabs/WallDoorRight.prefab.meta b/Assets/Prefabs/WallDoorRight.prefab.meta new file mode 100644 index 0000000..e218079 --- /dev/null +++ b/Assets/Prefabs/WallDoorRight.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c52cda44fe6b0574eb184e4043a70d3d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/WallThinDoorway.prefab b/Assets/Prefabs/WallThinDoorway.prefab new file mode 100644 index 0000000..28f796d Binary files /dev/null and b/Assets/Prefabs/WallThinDoorway.prefab differ diff --git a/Assets/Prefabs/WallThinDoorway.prefab.meta b/Assets/Prefabs/WallThinDoorway.prefab.meta new file mode 100644 index 0000000..f031b37 --- /dev/null +++ b/Assets/Prefabs/WallThinDoorway.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: aae0b98fd88a34741b919f39c98062c0 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/WireDLP.prefab b/Assets/Prefabs/WireDLP.prefab new file mode 100644 index 0000000..6d5a10d Binary files /dev/null and b/Assets/Prefabs/WireDLP.prefab differ diff --git a/Assets/Prefabs/WireDLP.prefab.meta b/Assets/Prefabs/WireDLP.prefab.meta new file mode 100644 index 0000000..cd8dd49 --- /dev/null +++ b/Assets/Prefabs/WireDLP.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 94868e9c2f4b03949b886708d22b287d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Prefabs/WireHub221.prefab b/Assets/Prefabs/WireHub221.prefab new file mode 100644 index 0000000..1204556 Binary files /dev/null and b/Assets/Prefabs/WireHub221.prefab differ diff --git a/Assets/Prefabs/WireHub221.prefab.meta b/Assets/Prefabs/WireHub221.prefab.meta new file mode 100644 index 0000000..19e7d52 --- /dev/null +++ b/Assets/Prefabs/WireHub221.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6ef0f18c3a1711e46b9092526a77b668 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta new file mode 100644 index 0000000..1dd321b --- /dev/null +++ b/Assets/Scenes.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 3797cc4b0c2293f44be095b625eee729 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes/GameEnd.unity b/Assets/Scenes/GameEnd.unity new file mode 100644 index 0000000..8144b6d Binary files /dev/null and b/Assets/Scenes/GameEnd.unity differ diff --git a/Assets/Scenes/GameEnd.unity.meta b/Assets/Scenes/GameEnd.unity.meta new file mode 100644 index 0000000..86d3b5f --- /dev/null +++ b/Assets/Scenes/GameEnd.unity.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1cafe5f681dcd0544979d2af62ce43d1 +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes/Level0.unity b/Assets/Scenes/Level0.unity new file mode 100644 index 0000000..c4438ad Binary files /dev/null and b/Assets/Scenes/Level0.unity differ diff --git a/Assets/Scenes/Level0.unity.meta b/Assets/Scenes/Level0.unity.meta new file mode 100644 index 0000000..0b8d8a0 --- /dev/null +++ b/Assets/Scenes/Level0.unity.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: eaf515b012cdd7e43bc36c7cc4d82a61 +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes/MainMenu.meta b/Assets/Scenes/MainMenu.meta new file mode 100644 index 0000000..b2cf557 --- /dev/null +++ b/Assets/Scenes/MainMenu.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e1d380cce5f8e2f4c84affa86b8e9e9c +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity new file mode 100644 index 0000000..b5d855d Binary files /dev/null and b/Assets/Scenes/MainMenu.unity differ diff --git a/Assets/Scenes/MainMenu.unity.meta b/Assets/Scenes/MainMenu.unity.meta new file mode 100644 index 0000000..7781428 --- /dev/null +++ b/Assets/Scenes/MainMenu.unity.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ae650f9c8cdfc7149b611a5438124bff +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scenes/MainMenu/DefaultReflection.asset b/Assets/Scenes/MainMenu/DefaultReflection.asset new file mode 100644 index 0000000..d32a03b Binary files /dev/null and b/Assets/Scenes/MainMenu/DefaultReflection.asset differ diff --git a/Assets/Scenes/MainMenu/DefaultReflection.asset.meta b/Assets/Scenes/MainMenu/DefaultReflection.asset.meta new file mode 100644 index 0000000..4ed2531 --- /dev/null +++ b/Assets/Scenes/MainMenu/DefaultReflection.asset.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: de8e30af91b9fc949aa986afb7ce640c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..b3bef3d --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 061fe2584851ba4449ec90eb84ce428b +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/AI.meta b/Assets/Scripts/AI.meta new file mode 100644 index 0000000..6fa10e3 --- /dev/null +++ b/Assets/Scripts/AI.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 2830449a1f4f7e54184f0ba1e4b62181 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/AiWaypoint.cs b/Assets/Scripts/AI/AiWaypoint.cs new file mode 100644 index 0000000..ad18645 --- /dev/null +++ b/Assets/Scripts/AI/AiWaypoint.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using System.Collections; + +public class AiWaypoint : MonoBehaviour { + public float radius = 0.4f; + public Color color = new Color(0.2f, 0.2f, 1, 0.6f); + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnDrawGizmos() { + AdvancedGizmo.DrawCircle(transform.position, Vector3.forward, radius, color); + } +} diff --git a/Assets/Scripts/AI/AiWaypoint.cs.meta b/Assets/Scripts/AI/AiWaypoint.cs.meta new file mode 100644 index 0000000..5756a18 --- /dev/null +++ b/Assets/Scripts/AI/AiWaypoint.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 11879864f36973b4b9097cbfd448b2db +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: fc00ec05a89da4ff695a4273715cd5ce, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree.meta b/Assets/Scripts/AI/BehaviorTree.meta new file mode 100644 index 0000000..a4f2b1d --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d18f032676b70b845b5d1f39535e9f6b +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs b/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs new file mode 100644 index 0000000..8964cde --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; + +public enum BehaviorStatus { + Invalid, + Success, + Fail, + Running +}; + +public abstract class AiBehavior : MonoBehaviour { + public string behaviorName; + + protected virtual void OnBegin(AiBlackboard blackboard) { } + protected virtual void OnEnd(AiBlackboard blackboard) { } + protected abstract BehaviorStatus OnExecute(AiBlackboard blackboard); + private BehaviorStatus _state = BehaviorStatus.Invalid; + public BehaviorStatus State { + get { return _state; } + } + + public bool Running { + get { return _state == BehaviorStatus.Running; } + } + + public BehaviorStatus Tick(AiBlackboard blackboard) { + if (_state != BehaviorStatus.Running) { + OnBegin(blackboard); + } + + _state = OnExecute(blackboard); + if (_state == BehaviorStatus.Running) { + _state = BehaviorStatus.Success; + } + + if (_state != BehaviorStatus.Running) { + OnEnd(blackboard); + } + + return _state; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs.meta new file mode 100644 index 0000000..86d7c64 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBehavior.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac3489aca4eaca1438c296121ea6606f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs b/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs new file mode 100644 index 0000000..b5ac8c0 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public static class BlackboardVariables { + public static string LastEnemyPosition = "lastEnemyPosition"; + public static string LastSound = "lastSound"; + public static string LastSuspiciousTime = "lastSuspTime"; + public static string Enemy = "enemy"; +} + + +public class AiBlackboard : MonoBehaviour { + private Dictionary _values = new Dictionary(); + + public GameObject Obj { + get { + return (GameObject)_values["gameobject"]; + } + } + + public void SetValue(string key, object val) { + _values[key] = val; + } + + /*public bool GetValue(string key, out object val) { + if (_values.ContainsKey(key)) { + val = _values[key]; + return true; + } + val = null; + return false; + }*/ + + public bool GetValue(string key, out T obj) { + if (_values.ContainsKey(key)) { + obj = (T)_values[key]; + return true; + } + obj = default(T); + return false; + } + + public bool RemoveValue(string key) { + return _values.Remove(key); + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs.meta new file mode 100644 index 0000000..4c1951c --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBlackboard.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b64878cdefd0e5b409d5bb0cbd88f2b0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs b/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs new file mode 100644 index 0000000..09badf6 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class AiBlackboardDecorator : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs.meta new file mode 100644 index 0000000..585ba4b --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiBlackboardDecorator.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8fda99ed7265d9447a016da7ea552c0a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiComposite.cs b/Assets/Scripts/AI/BehaviorTree/AiComposite.cs new file mode 100644 index 0000000..4e64f16 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiComposite.cs @@ -0,0 +1,18 @@ +using System; +using UnityEngine; +using System.Collections; + +public abstract class AiComposite : AiBehavior { + public AiBehavior[] children; + + public void Add(AiBehavior behavior) { + if (children == null || children.Length == 0) { + children = new AiBehavior[1]; + children[0] = behavior; + } + else { + Array.Resize(ref children, children.Length + 1); + children[children.Length - 1] = behavior; + } + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiComposite.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiComposite.cs.meta new file mode 100644 index 0000000..43fa7b8 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiComposite.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ff17649812f35546970a12bf331b117 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs b/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs new file mode 100644 index 0000000..5b34e33 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs @@ -0,0 +1,6 @@ +using UnityEngine; +using System.Collections; + +public abstract class AiDecorator : AiBehavior { + public AiBehavior child; +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs.meta new file mode 100644 index 0000000..5559df7 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiDecorator.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d5bf7cefe7649b64aa3bfba8a2240871 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiInverter.cs b/Assets/Scripts/AI/BehaviorTree/AiInverter.cs new file mode 100644 index 0000000..e1b6093 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiInverter.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class AiInverter : AiDecorator { + + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var result = child.Tick(blackboard); + if (result == BehaviorStatus.Success) { + return BehaviorStatus.Fail; + } else if (result == BehaviorStatus.Fail) { + return BehaviorStatus.Success; + } else { + return result; + } + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiInverter.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiInverter.cs.meta new file mode 100644 index 0000000..3ebcaa3 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiInverter.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 393988bfa4e415c498546e68a6e1ff46 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 50453c57d72f4764f91cac3e9da6775d, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiParallel.cs b/Assets/Scripts/AI/BehaviorTree/AiParallel.cs new file mode 100644 index 0000000..18f5f1e --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiParallel.cs @@ -0,0 +1,45 @@ +using UnityEngine; +using System.Collections; + +public enum AiParallelPolicy { + Any, + All +} + +public class AiParallel : AiComposite { + public AiParallelPolicy successPolicy = AiParallelPolicy.Any; + public AiParallelPolicy failurePolicy = AiParallelPolicy.All; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + int failCount = 0; + int successCount = 0; + foreach (var behavior in children) { + //if (behavior.Running) { + behavior.Tick(blackboard); + //} + + if (behavior.State == BehaviorStatus.Success) { + ++successCount; + if (successPolicy == AiParallelPolicy.Any) { + return BehaviorStatus.Success; + } + } + else if (behavior.State == BehaviorStatus.Fail) { + ++failCount; + if (failurePolicy == AiParallelPolicy.Any) { + return BehaviorStatus.Fail; + } + } + } + + if (failurePolicy == AiParallelPolicy.All && failCount == children.Length) { + return BehaviorStatus.Fail; + } + + if (successPolicy == AiParallelPolicy.All && successCount == children.Length) { + return BehaviorStatus.Fail; + } + + return BehaviorStatus.Running; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiParallel.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiParallel.cs.meta new file mode 100644 index 0000000..251d7bc --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiParallel.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e69523706cb2fa24d94ca0a2ba3cfc83 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: c9ec39ec3da62a64d941014c71e7f028, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs b/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs new file mode 100644 index 0000000..db379e4 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using System.Collections; + +public class AiRepeatDecorator : AiDecorator { + public int count = 1; + private int _counter; + public bool repeatForever; + + protected override void OnBegin(AiBlackboard blackboard) { + base.OnBegin(blackboard); + _counter = 0; + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var state = child.Tick(blackboard); + if (state == BehaviorStatus.Success) { + if (repeatForever) { + return BehaviorStatus.Running; + } + else { + _counter++; + if (_counter == count) { + return BehaviorStatus.Success; + } else { + return BehaviorStatus.Running; + } + } + + } + return state; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs.meta new file mode 100644 index 0000000..1b8e6fc --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiRepeatDecorator.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a02e2a8ad2091bd48b7acd45fff4b3c6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d5935485dc5991449b53931f8c2e312, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs b/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs new file mode 100644 index 0000000..7a6a98d --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs @@ -0,0 +1,11 @@ +using UnityEngine; +using System.Collections; + +public class AiReturnFailure : AiDecorator { + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var childStatus = child.Tick(blackboard); + return (childStatus == BehaviorStatus.Fail || childStatus == BehaviorStatus.Success) + ? BehaviorStatus.Fail + : childStatus; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs.meta new file mode 100644 index 0000000..effc42b --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiReturnFailure.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d998bba05cd11ab4087e0ddf80721c8a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: b3ecdd4f2d60e5149ba02592143f517b, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs b/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs new file mode 100644 index 0000000..f99e984 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs @@ -0,0 +1,12 @@ +using UnityEngine; +using System.Collections; + +public class AiReturnSuccess : AiDecorator { + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var childStatus = child.Tick(blackboard); + return (childStatus == BehaviorStatus.Fail || childStatus == BehaviorStatus.Success) + ? BehaviorStatus.Success + : childStatus; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs.meta new file mode 100644 index 0000000..33b7fa2 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiReturnSuccess.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94bfc6ef33c4fa74dbad429a88d561d9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 72f177c027d95ac438d85c3a968f00e3, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiRoot.cs b/Assets/Scripts/AI/BehaviorTree/AiRoot.cs new file mode 100644 index 0000000..c3ff2ce --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiRoot.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using System.Collections; + +public class AiRoot : AiBehavior { + public AiBehavior child; + public AiBlackboard blackboard; + private Health _health; + + void Start() { + blackboard.SetValue("gameobject", gameObject); + _health = GetComponent(); + } + + void FixedUpdate() { + OnExecute(blackboard); + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (enabled && (_health == null || !_health.Dead)) { + if (child == null) { + Debug.LogWarning("AiRoot: child is null"); + return BehaviorStatus.Invalid; + } + return child.Tick(blackboard); + } + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiRoot.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiRoot.cs.meta new file mode 100644 index 0000000..ced3c4b --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiRoot.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8e18ffee70d70d64a8dd9750b2751d89 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: ded096a5301fa644e8891d1f6101b751, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiSelector.cs b/Assets/Scripts/AI/BehaviorTree/AiSelector.cs new file mode 100644 index 0000000..f264998 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiSelector.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using System.Collections; + +public class AiSelector : AiComposite { + + private int _currentId = 0; + + protected override void OnBegin(AiBlackboard blackboard) { + _currentId = 0; + } + + protected override void OnEnd(AiBlackboard blackboard) { + + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (children == null || children.Length == 0) { + Debug.LogError("Broken behavior! No children!"); + return BehaviorStatus.Invalid; + } + + while(_currentId < children.Length) { + var current = children[_currentId]; + var result = current.Tick(blackboard); + if (result != BehaviorStatus.Fail) { + return result; + } + _currentId++; + } + return BehaviorStatus.Fail; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiSelector.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiSelector.cs.meta new file mode 100644 index 0000000..044ca1a --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiSelector.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e5804a06425c3ad4a8d15d809813993a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: bcabd2f1888c8f14ca23cb37f12fefb2, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiSequence.cs b/Assets/Scripts/AI/BehaviorTree/AiSequence.cs new file mode 100644 index 0000000..c2bd223 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiSequence.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using System.Collections; + +public class AiSequence : AiComposite { + + private int _currentId = 0; + + protected override void OnBegin(AiBlackboard blackboard) { + _currentId = 0; + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (children == null || children.Length == 0) { + Debug.LogError("Broken behavior! No children!"); + return BehaviorStatus.Invalid; + } + + //Debug.Log("Sequence: " + behaviorName); + + while(_currentId < children.Length) { + var current = children[_currentId]; + var result = current.Tick(blackboard); + if (result != BehaviorStatus.Success) { + return result; + } + _currentId++; + } + + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiSequence.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiSequence.cs.meta new file mode 100644 index 0000000..bf103d5 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiSequence.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cbc50ac62b293274197389809d6f729c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8acfd1a7d74af514c9cfa3c24b4744a8, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs b/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs new file mode 100644 index 0000000..6c7fad9 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs @@ -0,0 +1,9 @@ +using UnityEngine; +using System.Collections; + +public class AiUntilFailure : AiDecorator { + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var childStatus = child.Tick(blackboard); + return childStatus == BehaviorStatus.Fail ? BehaviorStatus.Success : BehaviorStatus.Running; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs.meta new file mode 100644 index 0000000..67ecfca --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiUntilFailure.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d664e3d1f23ea647bbf57eb52207ad1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6f3711f476005504c9f518040eab635a, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs b/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs new file mode 100644 index 0000000..1590ce2 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs @@ -0,0 +1,10 @@ +using UnityEngine; +using System.Collections; + +public class AiUntilSuccess : AiDecorator { + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var childStatus = child.Tick(blackboard); + return childStatus == BehaviorStatus.Success ? BehaviorStatus.Success : BehaviorStatus.Running; + } +} diff --git a/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs.meta b/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs.meta new file mode 100644 index 0000000..30ec250 --- /dev/null +++ b/Assets/Scripts/AI/BehaviorTree/AiUntilSuccess.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7156873ba7e0ded4282c752529bc401b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: bbde1a7d7d1792a46937e629e84df4e0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs.meta b/Assets/Scripts/AI/Jobs.meta new file mode 100644 index 0000000..37f77ee --- /dev/null +++ b/Assets/Scripts/AI/Jobs.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 091298dbbffdc354dacc39cb6f2fc17f +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiAim.cs b/Assets/Scripts/AI/Jobs/AiAim.cs new file mode 100644 index 0000000..554ac5e --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiAim.cs @@ -0,0 +1,19 @@ +using UnityEngine; +using System.Collections; + +public class AiAim : AiBehavior { + + private GameObject obj; + private HumanController selfController; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (obj == null) { + obj = blackboard.Obj; + selfController = obj.GetComponent(); + } + + + + return selfController.PrepareItem() ? BehaviorStatus.Success : BehaviorStatus.Fail; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiAim.cs.meta b/Assets/Scripts/AI/Jobs/AiAim.cs.meta new file mode 100644 index 0000000..6f5c226 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiAim.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 703aed8d891f45d4a891c457267df9cb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs b/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs new file mode 100644 index 0000000..7eb74e0 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs @@ -0,0 +1,72 @@ +using System.Linq; +using UnityEngine; +using System.Collections; + +public class AiCanHitEnemy : AiBehavior { + + private GameObject obj; + private Inventory inventory; + private HumanController selfController; + public LayerMask skipRaycast; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (obj == null) { + blackboard.GetValue("gameobject", out obj); + inventory = obj.GetComponent(); + selfController = obj.GetComponent(); + } + + PlayerController enemy; + blackboard.GetValue("enemy", out enemy); + if (enemy == null) { + + return BehaviorStatus.Fail; + } + + Vector3 right = obj.transform.localToWorldMatrix.MultiplyVector(Vector3.right).normalized; + var raycastDir = Mathf.Abs(enemy.transform.position.x - obj.transform.position.x) * right; + + var p0 = obj.transform.position + Vector3.up * selfController.ArmsStandOffset; + var p1 = obj.transform.position + Vector3.up * selfController.ArmsCrouchOffset; + + string crouchingName = "crouchToShoot"; + if ( RaycastEnemy(p0, raycastDir, enemy)) { + blackboard.SetValue(crouchingName, false); + Debug.Log("WTF1"); + return BehaviorStatus.Success; + } else if (RaycastEnemy(p1, raycastDir, enemy)) { + Debug.Log("WTF2"); + blackboard.SetValue(crouchingName, true); + return BehaviorStatus.Success; + } + + + return BehaviorStatus.Fail; + + + } + + private bool RaycastEnemy(Vector3 from, Vector3 d, PlayerController enemy) { + var hits = Physics2D.RaycastAll(from, d, 100, Physics2D.DefaultRaycastLayers & ~skipRaycast.value); + + Debug.Log("Hits: " + hits.Length); + //find first collision which is not inside player head + int firstOutsideId = -1; + for (int i = 0; i < hits.Length; ++i) { + if (hits[i].fraction > 0.0f) { + firstOutsideId = i; + break; + } + } + + Debug.Log("Hits name: " + hits[firstOutsideId].transform.name); + if (firstOutsideId >= 0) { + var hit = hits[firstOutsideId]; + var g = hit.collider.GetComponent(); + if (g != null && g == enemy) { + return true; + } + } + return false; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs.meta b/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs.meta new file mode 100644 index 0000000..84fe79e --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiCanHitEnemy.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e63b0fdce85d3e24dafa3251136a3f0c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiCancelAim.cs b/Assets/Scripts/AI/Jobs/AiCancelAim.cs new file mode 100644 index 0000000..9cec919 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiCancelAim.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class AiCancelAim : AiBehavior { + + private GameObject obj; + private HumanController selfController; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (obj == null) { + obj = blackboard.Obj; + selfController = obj.GetComponent(); + } + + if (!selfController.GunArmed) { + return BehaviorStatus.Fail; + } + + selfController.UnprepareItem(); + selfController.Crouch = false; + + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiCancelAim.cs.meta b/Assets/Scripts/AI/Jobs/AiCancelAim.cs.meta new file mode 100644 index 0000000..32d1e51 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiCancelAim.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b9f8f06b1ce7868419b3244bd9bd7b07 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiChase.cs b/Assets/Scripts/AI/Jobs/AiChase.cs new file mode 100644 index 0000000..d35a354 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiChase.cs @@ -0,0 +1,67 @@ +using UnityEngine; +using System.Collections; + +public class AiChase : AiBehavior { + public float chaseTimeout = 5; + private GameObject _obj; + private HumanController _selfController; + private bool _chasing; + public RandomSoundPlayer endChasingSound; + + protected override void OnBegin(AiBlackboard blackboard) { + base.OnBegin(blackboard); + if (_obj == null) { + _obj = blackboard.Obj; + _selfController = _obj.GetComponent(); + } + } + + private void OnEndChasing() { + Debug.Log("Begin chasing"); + if (endChasingSound != null) { + endChasingSound.Play(); + } + } + + private void OnBeginChasing() { + Debug.Log("End chasing"); + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + float time; + if (!blackboard.GetValue(BlackboardVariables.LastSuspiciousTime, out time)) { + return BehaviorStatus.Fail; + } + + //check if chasing too long + if (Time.time - time >= chaseTimeout) { + if (_chasing) { + _chasing = false; + OnEndChasing(); + } + return BehaviorStatus.Fail; + } + + + + //do chase! + if (!_chasing) { + _chasing = true; + OnBeginChasing(); + } + + + Vector3 chaseTarget; + if (blackboard.GetValue(BlackboardVariables.LastEnemyPosition, out chaseTarget)) { + if (_selfController != null) { + float dir = Mathf.Sign(chaseTarget.x - _obj.transform.position.x); + + if (Mathf.Abs(chaseTarget.x - _obj.transform.position.x) > 0.3f) { + _selfController.UpdateMovement(dir * _selfController.maxWalkSpeed); + } + + } + } + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiChase.cs.meta b/Assets/Scripts/AI/Jobs/AiChase.cs.meta new file mode 100644 index 0000000..3d712e7 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiChase.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f00beff876f03384e8d2938e1e37b74f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiDelay.cs b/Assets/Scripts/AI/Jobs/AiDelay.cs new file mode 100644 index 0000000..9e2123e --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiDelay.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using System.Collections; + +public class AiDelay : AiBehavior { + + public float delay = 1; + private float _startTime; + + protected override void OnBegin(AiBlackboard blackboard) { + _startTime = Time.time; + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + return (_startTime + delay) > Time.time ? BehaviorStatus.Running : BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiDelay.cs.meta b/Assets/Scripts/AI/Jobs/AiDelay.cs.meta new file mode 100644 index 0000000..797fb64 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiDelay.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f55a86bc81f2e5447b675e80b521b328 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 75cff1be3576d61429363834ca95e010, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiEquipGun.cs b/Assets/Scripts/AI/Jobs/AiEquipGun.cs new file mode 100644 index 0000000..1f50343 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiEquipGun.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using System.Collections; + +public class AiEquipGun : AiBehavior { + + private GameObject obj; + private Inventory inventory; + private HumanController selfController; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (obj == null) { + blackboard.GetValue("gameobject", out obj); + inventory = obj.GetComponent(); + selfController = obj.GetComponent(); + } + + if (selfController.GetSocket(ItemSocketType.Hands).AttachedItem == null) { + + var weapon = inventory.QueryItem(null, "Gun", null); + if (weapon != null) { + //Debug.LogFormat("Character {0} equipped weapon {1}", obj.name, weapon.description.Name); + inventory.EquipItem(weapon); + } + else { + return BehaviorStatus.Fail; + } + } + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiEquipGun.cs.meta b/Assets/Scripts/AI/Jobs/AiEquipGun.cs.meta new file mode 100644 index 0000000..dacc9d0 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiEquipGun.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6ad8bdf70f1755c44b33fb4286544f22 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiFindEnemy.cs b/Assets/Scripts/AI/Jobs/AiFindEnemy.cs new file mode 100644 index 0000000..495d229 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiFindEnemy.cs @@ -0,0 +1,75 @@ +using System.Linq; +using UnityEngine; +using System.Collections; + + + +public class AiFindEnemy : AiBehavior { + + private GameObject obj; + private PlayerSensor sensor; + private HumanController selfController; + public LayerMask skipMask; + + protected override void OnBegin(AiBlackboard blackboard) { + base.OnBegin(blackboard); + if (obj == null) { + obj = blackboard.Obj; + sensor = obj.GetComponent().viewSensor; + selfController = obj.GetComponent(); + } + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + + bool playerInCone = sensor.Player != null; + if (playerInCone) { + var enemyEyes = sensor.Player.eyes.transform.position; + var selfEyes = selfController.eyes.transform.position; + + var from = new Vector3[] { selfEyes, selfEyes }; + var to = new Vector3[] { enemyEyes, sensor.Player.transform.position }; + + for (int i = 0; i < 2; ++i) { + Debug.DrawLine(from[i], to[i], Color.gray); + } + + for (int i = 0; i < 2; ++i) { + if (RaycastEnemy(from[i], to[i])) { + blackboard.SetValue(BlackboardVariables.Enemy, sensor.Player); + blackboard.SetValue(BlackboardVariables.LastEnemyPosition, sensor.Player.transform.position); + + //Debug.Log("Raycast OK"); + return BehaviorStatus.Success; + } + } + // Debug.Log("Raycast FAIL"); + } + + blackboard.SetValue(BlackboardVariables.Enemy, null); + + return BehaviorStatus.Fail; + } + + private bool RaycastEnemy(Vector3 from, Vector3 to) { + var hits = Physics2D.RaycastAll(from, (to - from).normalized, 100, (Physics2D.DefaultRaycastLayers & (~skipMask.value))); + + //find first collision which is not inside player head + int firstOutsideId = -1; + for (int i = 0; i < hits.Length; ++i) { + if (hits[i].fraction > 0.0f) { + firstOutsideId = i; + break; + } + } + + if (firstOutsideId >= 0) { + var hit = hits[firstOutsideId]; + var g = hit.collider.GetComponent(); + if (g != null) { + return true; + } + } + return false; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiFindEnemy.cs.meta b/Assets/Scripts/AI/Jobs/AiFindEnemy.cs.meta new file mode 100644 index 0000000..23789be --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiFindEnemy.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a8a0b982bd08a5488a7c4999040b3e2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiHitDetector.cs b/Assets/Scripts/AI/Jobs/AiHitDetector.cs new file mode 100644 index 0000000..0bf4e14 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiHitDetector.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class AiHitDetector : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/AI/Jobs/AiHitDetector.cs.meta b/Assets/Scripts/AI/Jobs/AiHitDetector.cs.meta new file mode 100644 index 0000000..c031507 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiHitDetector.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4ff1b2e8d41c5ab46bfc53c0c3cb1252 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiListenSounds.cs b/Assets/Scripts/AI/Jobs/AiListenSounds.cs new file mode 100644 index 0000000..c1b1f12 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiListenSounds.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using System.Collections; + +public class AiListenSounds : AiBehavior { + private AiSoundListener _listener; + private GameObject _obj; + + protected override void OnBegin(AiBlackboard blackboard) { + base.OnBegin(blackboard); + + if (_obj == null) { + _obj = blackboard.Obj; + _listener = _obj.GetComponent(); + } + + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var sound = _listener.LatestSound; + blackboard.SetValue(BlackboardVariables.LastSound, sound); + if (sound != null) { + blackboard.SetValue(BlackboardVariables.LastEnemyPosition, sound.transform.position); + blackboard.SetValue(BlackboardVariables.LastSuspiciousTime, Time.time); + + } + + return sound == null ? BehaviorStatus.Fail : BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiListenSounds.cs.meta b/Assets/Scripts/AI/Jobs/AiListenSounds.cs.meta new file mode 100644 index 0000000..c10e4b3 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiListenSounds.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e1f1556b659a8f458973a7c12bdc793 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiPatrol.cs b/Assets/Scripts/AI/Jobs/AiPatrol.cs new file mode 100644 index 0000000..e1b9e9c --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiPatrol.cs @@ -0,0 +1,37 @@ +using UnityEngine; +using System.Collections; + +public class AiPatrol : AiBehavior { + + public AiWaypoint[] patrolPoints; + private int _targetPoint; + private GameObject targetObject; + private HumanController controller; + + protected override void OnBegin(AiBlackboard blackboard) { + base.OnBegin(blackboard); + //_targetPoint = 0; + blackboard.GetValue("gameobject", out targetObject); + controller = targetObject.GetComponent(); + } + + private void NextPoint() { + _targetPoint = (_targetPoint + 1)%patrolPoints.Length; + } + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + var point = patrolPoints[_targetPoint]; + var dir = (Vector2) point.transform.position - (Vector2) controller.transform.position; + + if (controller.GetComponent().Dead) { + return BehaviorStatus.Success; + } + + if (Mathf.Abs(dir.x) < 0.1f) { + NextPoint(); + } else { + controller.UpdateMovement(Mathf.Sign(dir.x) * controller.maxWalkSpeed); + } + return BehaviorStatus.Running; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiPatrol.cs.meta b/Assets/Scripts/AI/Jobs/AiPatrol.cs.meta new file mode 100644 index 0000000..e41fd48 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiPatrol.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0689ea7abd9f480449a528cc05fb0c0c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs b/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs new file mode 100644 index 0000000..19e72ca --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class AiSaySomethingOnSound : AiBehavior { + public RandomSoundPlayer player; + private AiSound _lastSound; + private float _lastSloundTime; + public float minDelay = 3; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + AiSound sound; + blackboard.GetValue(BlackboardVariables.LastSound, out sound); + if (sound == null) { + return BehaviorStatus.Fail; + } + + if (Time.time - _lastSloundTime >= minDelay) { + player.Play(); + _lastSloundTime = Time.time; + Debug.Log("Saying!"); + } + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs.meta b/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs.meta new file mode 100644 index 0000000..7d589e0 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiSaySomethingOnSound.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05fb3d4c5b2994e48a8d5836b3d82b3f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AI/Jobs/AiUseItem.cs b/Assets/Scripts/AI/Jobs/AiUseItem.cs new file mode 100644 index 0000000..59c6057 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiUseItem.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using System.Collections; + +public class AiUseItem : AiBehavior { + private GameObject obj; + private HumanController selfController; + + protected override BehaviorStatus OnExecute(AiBlackboard blackboard) { + if (obj == null) { + obj = blackboard.Obj; + selfController = obj.GetComponent(); + } + + var item = selfController.GetSocket(ItemSocketType.Hands).AttachedItem; + if (item == null) { + return BehaviorStatus.Fail; + } + + bool shouldCrouch = false; + blackboard.GetValue("crouchToShoot", out shouldCrouch); + + selfController.Crouch = shouldCrouch; + + + item.OnBeginUse(); + item.OnEndUse(); + return BehaviorStatus.Success; + } +} diff --git a/Assets/Scripts/AI/Jobs/AiUseItem.cs.meta b/Assets/Scripts/AI/Jobs/AiUseItem.cs.meta new file mode 100644 index 0000000..13cc385 --- /dev/null +++ b/Assets/Scripts/AI/Jobs/AiUseItem.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e969b77faa0f304abbd0a3faa55a3f2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 6d08017e60048a74ca44adc931b5cea0, type: 3} + userData: + assetBundleName: diff --git a/Assets/Scripts/ActionController.cs b/Assets/Scripts/ActionController.cs new file mode 100644 index 0000000..7819529 --- /dev/null +++ b/Assets/Scripts/ActionController.cs @@ -0,0 +1,69 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class GameAction{ + public GameAction(){ + + } + public GameAction(GameObject obj, string description){ + target = obj; + text = description; + } + public GameObject target; + public string text; + public void Execute(GameObject caller){ + Debug.Log("Action on target: " + target.name); + target.SendMessage("OnAction", new ActionArgs(this, caller), SendMessageOptions.DontRequireReceiver); + } +} + +public class ActionArgs{ + public GameAction Action; + public GameObject Caller; + + public ActionArgs(GameAction action, GameObject caller){ + Action = action; + Caller = caller; + } +} + +public class ActionController : MonoBehaviour { + + public KeyCode actionKey = KeyCode.F; + private static List actions = new List(); + public HudController hud; + public GameObject player; + public static AudioSource audio; + + public static void AddAction(GameAction act){ + actions.Add(act); + } + + public static void RemoveAction(GameAction act){ + actions.Remove(act); + } + + void Start () { + audio = GetComponent(); + } + + void OnGUI(){ + + } + + + // Update is called once per frame + void Update () { + + if(actions != null && actions.Count > 0){ + hud.SetAction(string.Format("Press {0} to {1}", actionKey.ToString(), actions[0].text)); + if(Input.GetKeyDown(actionKey)){ + + actions[0].Execute(player); + } + }else{ + hud.SetAction(""); + } + } +} diff --git a/Assets/Scripts/ActionController.cs.meta b/Assets/Scripts/ActionController.cs.meta new file mode 100644 index 0000000..1f8556f --- /dev/null +++ b/Assets/Scripts/ActionController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 78f1e34cb17588640bbe6012299c7e37 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ActivateGameObject.cs b/Assets/Scripts/ActivateGameObject.cs new file mode 100644 index 0000000..621d2ce --- /dev/null +++ b/Assets/Scripts/ActivateGameObject.cs @@ -0,0 +1,23 @@ +using System.ComponentModel.Design; +using UnityEngine; +using System.Collections; + +public class ActivateGameObject : MonoBehaviour { + public Predicate activatePredicate; + private bool _active = false; + public GameObject target; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + if (!_active && activatePredicate.Check()) { + _active = true; + if (target != null) { + target.SetActive(true); + } + } + } +} diff --git a/Assets/Scripts/ActivateGameObject.cs.meta b/Assets/Scripts/ActivateGameObject.cs.meta new file mode 100644 index 0000000..448bb95 --- /dev/null +++ b/Assets/Scripts/ActivateGameObject.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2161a48311a90e44ab40c2267eb901a9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AddForce.cs b/Assets/Scripts/AddForce.cs new file mode 100644 index 0000000..78b0ad8 --- /dev/null +++ b/Assets/Scripts/AddForce.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using System.Collections; + +public class AddForce : MonoBehaviour { + public GameObject[] targets; + public float force = 10; + public float minTorque; + public float maxTorque; + + void Start () { + foreach (var target in targets) { + var rb = target.GetComponent(); + rb.AddTorque(Random.Range(minTorque, maxTorque)); + } + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/AddForce.cs.meta b/Assets/Scripts/AddForce.cs.meta new file mode 100644 index 0000000..826119c --- /dev/null +++ b/Assets/Scripts/AddForce.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1b63864005c3da842a7c4066ad278466 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AdvancedGizmo.cs b/Assets/Scripts/AdvancedGizmo.cs new file mode 100644 index 0000000..cfc0611 --- /dev/null +++ b/Assets/Scripts/AdvancedGizmo.cs @@ -0,0 +1,140 @@ + + +using UnityEngine; +using System.Collections; +#if UNITY_EDITOR +using UnityEditor.VersionControl; +using UnityEditorInternal; +using UnityEditor; +#endif + + +public class AdvancedGizmo { + public static void DrawCircle(Vector3 center, Vector3 normal, float radius, Color color, int tesselation = 12, bool drawNormal = false, int diagonalCount = 0){ + if (tesselation < 3) { + Debug.LogError("Invalid tesselation value! Should be >= 3"); + } + Vector3 right = Vector3.right; + if (Mathf.Abs (Vector3.Dot (right, normal)) > 0.999f) { + right = Vector3.up; + } + + + + + + Vector3 front = Vector3.Cross (right, normal).normalized; + + Gizmos.color = color; + + for(int i = 0; i < tesselation; ++i){ + //Gizmos.DrawLine( + Gizmos.DrawLine( + center + Quaternion.AngleAxis((360.0f / (float)tesselation) * (float)(i + 0), normal) * front * radius, + center + Quaternion.AngleAxis((360.0f / (float)tesselation) * (float)(i + 1), normal) * front * radius + ); + } + + for (int i = 0; i < diagonalCount; ++i) { + float a1 = (180.0f / (float)diagonalCount) * (float)(i); + float a2 = a1 + 180.0f; + + Gizmos.DrawLine( + center + Quaternion.AngleAxis(a1, normal) * front * radius, + center + Quaternion.AngleAxis(a2, normal) * front * radius + ); + } + } + + public static void DrawGrid(Vector3 center, float width, float height, int wSections = 1, int hSections = 1){ + Vector3 topLeft = new Vector3 (-width * 0.5f, 0, height * 0.5f); + Vector3 wStep = new Vector3 (width / (float)wSections, 0, 0); + Vector3 hStep = new Vector3 (0, 0, -height / (float)hSections); + + + //draw horizontal lines + for (int i = 0; i <= hSections; ++i) { + Vector3 p1 = topLeft + hStep * (float)i + center; + Debug.DrawLine(p1, p1 + new Vector3(width, 0, 0)); + } + + //draw vertical lines + for (int i = 0; i <= hSections; ++i) { + Vector3 p1 = topLeft + wStep * (float)i + center; + Debug.DrawLine(p1, p1 + new Vector3(0, 0, -height)); + } + } + + public delegate float fx(float x); + public static void Plot2D(fx func, Matrix4x4 tranfsorm, Vector3 center, Vector3 xAxis, Vector3 yAxis, float xLen, float xScale, float yScale, int sampleCount, Color color){ + float xStep = xLen / (float)(sampleCount - 1); + Vector3[] points = new Vector3[sampleCount]; + + for (int i = 0; i < sampleCount; ++i) { + float x1 = (float)i * xStep; + float arg1 = (x1 / xLen) * xScale; + float y1 = func(arg1) * yScale; + + points[i] = center + xAxis * x1 + yAxis * y1; + } + + #if UNITY_EDITOR + Color backup = Handles.color; + Handles.matrix = tranfsorm; + Handles.color = color; + Handles.DrawPolyLine(points); + Handles.color = backup; + Handles.matrix = Matrix4x4.identity; + #endif + } + + public static void DrawMesh(Vector3[] vertices, int[] indices, bool drawNormals){ + for(int i = 0; i < indices.Length; i+=3){ + Vector3 v0 = vertices[indices[i + 0]]; + Vector3 v1 = vertices[indices[i + 1]]; + Vector3 v2 = vertices[indices[i + 2]]; + Debug.DrawLine(v0, v1); + Debug.DrawLine(v1, v2); + Debug.DrawLine(v2, v0); + + if(drawNormals){ + Vector3 center = (v0 + v1 + v2) / 3.0f; + Vector3 normal = Vector3.Cross((v1 - v0), (v2 - v0)); + Debug.DrawRay(center, normal); + } + } + } + + + + public static void DrawMesh(Vector3[] vertices, bool drawNormals){ + for(int i = 0; i < vertices.Length; i+=3){ + Vector3 v0 = vertices[i + 0]; + Vector3 v1 = vertices[i + 1]; + Vector3 v2 = vertices[i + 2]; + Debug.DrawLine(v0, v1); + Debug.DrawLine(v1, v2); + Debug.DrawLine(v2, v0); + + if(drawNormals){ + Vector3 center = (v0 + v1 + v2) / 3.0f; + Vector3 normal = Vector3.Cross((v1 - v0), (v2 - v0)); + Debug.DrawRay(center, normal); + } + } + } + + public static void DrawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, bool drawNormal){ + Debug.DrawLine(v0, v1); + Debug.DrawLine(v1, v2); + Debug.DrawLine(v2, v0); + + if(drawNormal){ + Vector3 center = (v0 + v1 + v2) / 3.0f; + Vector3 normal = Vector3.Cross((v1 - v0), (v2 - v0)); + Debug.DrawRay(center, normal); + } + } + + +} diff --git a/Assets/Scripts/AdvancedGizmo.cs.meta b/Assets/Scripts/AdvancedGizmo.cs.meta new file mode 100644 index 0000000..74541b2 --- /dev/null +++ b/Assets/Scripts/AdvancedGizmo.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2e70bdd7e4a581d4cb371f1fa7b5b831 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AdvancedMath.cs b/Assets/Scripts/AdvancedMath.cs new file mode 100644 index 0000000..26d373f --- /dev/null +++ b/Assets/Scripts/AdvancedMath.cs @@ -0,0 +1,149 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public static class AdvancedMath { + + public static float TriangleSquare(Vector3 va, Vector3 vb, Vector3 vc){ + float a = Vector3.Distance (va, vb); + float b = Vector3.Distance (vb, vc); + float c = Vector3.Distance (vc, va); + float p = (a + b + c) * 0.5f; + return Mathf.Sqrt (p * (p - a) * (p - b) * (p - c)); + } + + + public static float CircleSegmentChordLength(float r, float angle) { + return 2.0f*r*Mathf.Sin(angle*0.5f); + } + + public static float CircleSegmentHeight(float r, float angle) { + return r * (1.0f - Mathf.Cos(angle * 0.5f)); + } + + public static Vector3 PrismCenterOfMass(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 normal, float h0, float h1, float h2){ + + + Vector3 a = v0 + normal * (h0 * 0.5f); + Vector3 c = v1 + normal * (h1 * 0.5f); + Vector3 b = v2 + normal * (h2 * 0.5f); + + Vector3 f = (a + b + c) / 3.0f; + + return (h0 * ((3.0f * f + a) / 4.0f) + h1 * ((3.0f * f + c) / 4.0f) + h2 * ((3.0f * f + b) / 4.0f)) / (h0 + h1 + h2); + } + + public static float CylinderVolume(float r, float h){ + return Mathf.PI * (r * r) * h; + } + + public static Vector3 TriangleNormal(Vector3 va, Vector3 vb, Vector3 vc){ + Vector3 ba = vb - va; + Vector3 ca = vc - va; + return Vector3.Cross(ba, ca).normalized; + } + + public static Vector3 LineNearestPoint(Vector3 a, Vector3 b, Vector3 p){ + Vector3 n = (b - a).normalized; + Vector3 pa = p - a; + float d = Vector3.Dot (n, pa); + return a + n * d; + } + + public static Vector2 LineNearestPoint(Vector2 a, Vector2 b, Vector2 p) { + Vector2 n = (b - a).normalized; + Vector2 pa = p - a; + float d = Vector2.Dot(n, pa); + return a + n * d; + } + + public static Vector2 SegmentNearestPoint(Vector2 a, Vector2 b, Vector2 p) { + Vector2 n = (b - a); + float dist = n.magnitude; + n.Normalize(); + Vector2 pa = p - a; + float d = Vector2.Dot(n, pa); + d = Mathf.Clamp(d, 0, dist); + return a + n * d; + } + + public static float LineDistance(Vector3 a, Vector3 b, Vector3 p){ + Vector3 lp = LineNearestPoint(a, b, p); + return Vector3.Distance (lp, p); + } + + public static float Drag(float envDensity, float objVelocity, float dragCoeff, float referenceaArea){ + return (envDensity * (objVelocity * objVelocity) * dragCoeff * referenceaArea) * 0.5f; + } + + public static float SphereDrag(float envDensity, float objVelocity, float radius){ + return Drag (envDensity, objVelocity, 0.47f, Mathf.PI * (radius * radius)); + } + + public static float BuoyantForce(float objectV, float objectDensity, float envDensity, float g){ + return objectV * envDensity * g * ((3.0f * objectDensity) / (envDensity + 2.0f * objectDensity)); + } + public static float SphereSegmentVolume(float r, float h){ + return (Mathf.PI * (h * h) * (3.0f * r - h)) / 3.0f; + } + public static float SphereVolume(float r){ + return (4.0f * Mathf.PI * (r * r * r)) / 3.0f; + } + public static float SphereSurfaceArea(float r){ + return 4.0f * Mathf.PI * (r * r); + } + public static float PrismVolume(float baseArea, float h){ + return baseArea * h; + } + public static float ConeVolume(float r, float h){ + return (Mathf.PI * (r * r) * h) / 3.0f; + } + public static float PyramidVolume(float baseArea, float h){ + return (baseArea * h) / 3.0f; + } + public static float RightTriangleArea(float a, float b){ + return a * b * 0.5f; + } + public static float MeshVolume(Vector3[] srcVertices, int[] srcIndices, Matrix4x4 tf){ + Vector3[] vertices = new Vector3[srcVertices.Length]; + vertices[0] = tf.MultiplyPoint3x4(srcVertices[0]); + Vector3 vMin = vertices [0]; + Vector3 vMax = vertices [0]; + for (int i = 1; i < vertices.Length; ++i) { + vertices[i] = tf.MultiplyPoint3x4(srcVertices[i]); + vMin = Vector3.Min(vMin, vertices[i]); + vMax = Vector3.Max(vMax, vertices[i]); + } + + Plane p = new Plane (Vector3.up, vMax + Vector3.up); + + //split mesh by plane + List cuttedTriangles = AdvancedUtils.CutMesh (vertices, srcIndices, p); + + float totalVolume = 0.0f; + + for (int i = 0; i < cuttedTriangles.Count; i+=3) { + Vector3 v0 = cuttedTriangles[i + 0]; + Vector3 v1 = cuttedTriangles[i + 1]; + Vector3 v2 = cuttedTriangles[i + 2]; + Vector3 normal = AdvancedMath.TriangleNormal(v0, v1, v2); + + float sign = Mathf.Sign(Vector3.Dot (normal, p.normal)); + + float h0 = p.GetDistanceToPoint(v0); + float h1 = p.GetDistanceToPoint(v1); + float h2 = p.GetDistanceToPoint(v2); + float avgH = (h0 + h1 + h2) / 3.0f; + + Vector3 vp0 = v0 - p.normal * h0; + Vector3 vp1 = v1 - p.normal * h1; + Vector3 vp2 = v2 - p.normal * h2; + + float triangleSquare = AdvancedMath.TriangleSquare(vp0, vp1, vp2); + float prismVolume = AdvancedMath.PrismVolume(triangleSquare, avgH) * sign; + totalVolume += prismVolume; + } + + return totalVolume; + } +} diff --git a/Assets/Scripts/AdvancedMath.cs.meta b/Assets/Scripts/AdvancedMath.cs.meta new file mode 100644 index 0000000..755d51f --- /dev/null +++ b/Assets/Scripts/AdvancedMath.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 97f37310fbd73a04b95a7f1896dbc8ae +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AdvancedUtils.cs b/Assets/Scripts/AdvancedUtils.cs new file mode 100644 index 0000000..7f01b19 --- /dev/null +++ b/Assets/Scripts/AdvancedUtils.cs @@ -0,0 +1,224 @@ +using System.Linq; +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +public static class AdvancedUtils { + + public static GameObject CreateMeshObject(string name){ + GameObject result = new GameObject(name); + MeshFilter meshFilter = (MeshFilter)result.AddComponent(typeof(MeshFilter)); + result.AddComponent(typeof(MeshRenderer)); + + Mesh m = new Mesh(); + m.name = result.name; + meshFilter.sharedMesh = m; + return result; + } + + public static GameObject CreateMeshObject(){ + return CreateMeshObject ("Unnamed object"); + } + + public static List GetChildren(this GameObject obj) { + var tf = obj.GetComponent(); + + var children = new List(tf.childCount); + for (int i = 0; i < tf.childCount; ++i) { + children.Add(tf.GetChild(i).gameObject); + } + return children; + } + + + + public static void GenerateCylinder(float radius, float length, int sides, int heightSegments,float uTile, float vTile, out Vector3[] vertices, out int[] indices, out Vector2[] uvs, out Vector3[] normals){ + float yBottom = 0.0f; + Vector3 up = Vector3.up; + int ringVertexCount = (sides + 1); + int ringCount = heightSegments + 1; + int vertexCount = ringCount * ringVertexCount; + vertices = new Vector3[vertexCount]; + uvs = new Vector2[vertices.Length]; + normals = new Vector3[vertices.Length]; + + //generate vertices + for (int i = 0; i < ringVertexCount; ++i) { + float angle = ((Mathf.PI * 2.0f) / (float)sides) * (float)(i); + normals[i] = new Vector3(Mathf.Cos(angle), 0.0f, Mathf.Sin(angle)); + vertices[i] = new Vector3(normals[i].x * radius, yBottom, normals[i].z * radius); + uvs[i] = new Vector2(((1.0f / (float)sides) * (float)i) * uTile, vTile); + } + + for (int i = 1; i < ringCount; ++i) { + float ringY = (length / (float)heightSegments) * (float)i; + int ringVertexOffset = ringVertexCount * i; + for (int j = 0; j < ringVertexCount; ++j) { + vertices[ringVertexOffset + j] = vertices[j]; + vertices[ringVertexOffset + j].y = ringY; + uvs[ringVertexOffset + j] = new Vector2(uvs[j].x, (1.0f - ((1.0f / (float)heightSegments) * (float)i)) * vTile); + normals[ringVertexOffset + j] = normals[j]; + } + } + + //generate indices + int triangleCount = (2 * sides) * heightSegments; + indices = new int[triangleCount * 3]; + int idOffset = 0; + for (int i = 0; i < heightSegments; ++i) { + int segmentVertexOffset = i * ringVertexCount; + int nextSegmentVertexOffset = (i + 1) * ringVertexCount; + + for (int j = 0; j < sides; ++j) { + int sideOffset = segmentVertexOffset + j; + + indices[idOffset + 0] = segmentVertexOffset + j; + indices[idOffset + 2] = nextSegmentVertexOffset + j + 1; + indices[idOffset + 1] = nextSegmentVertexOffset + j; + + indices[idOffset + 3] = segmentVertexOffset + j; + indices[idOffset + 5] = segmentVertexOffset + j + 1; + indices[idOffset + 4] = nextSegmentVertexOffset + j + 1; + + idOffset+=6; + } + } + } + + public static int[] cubeIndices = new int[]{ + 3,2,7, + 7,2,6, + 1,0,5, + 0,4,5, + 0,1,2, + 0,2,3, + 4,6,5, + 4,7,6, + 0,3,4, + 3,7,4, + 2,1,6, + 1,5,6 + }; + + public static Vector3[] cubeVertices = new[]{ + new Vector3(-0.5f, 0.5f, -0.5f), + new Vector3(-0.5f, 0.5f, 0.5f), + new Vector3(0.5f, 0.5f, 0.5f), + new Vector3(0.5f, 0.5f, -0.5f), + new Vector3(-0.5f, -0.5f, -0.5f), + new Vector3(-0.5f, -0.5f, 0.5f), + new Vector3(0.5f, -0.5f, 0.5f), + new Vector3(0.5f, -0.5f, -0.5f), + }; + + public static void CreateMeshCube(Matrix4x4 matrix, out Vector3[] vertices, out int[] indices){ + indices = new int[cubeIndices.Length]; + Array.Copy (cubeIndices, indices, cubeIndices.Length); + + int vertexCount = cubeVertices.Length; + vertices = new Vector3[vertexCount]; + for (int i = 0; i < vertexCount; ++i) { + vertices[i] = matrix.MultiplyPoint3x4(cubeVertices[i]); + } + } + + + public static GameObject FindChild(GameObject parent, string childName){ + if (parent == null) { + return null; + } + var tf = parent.transform.Find (childName); + return tf == null ? null : tf.gameObject; + } + + public static List CutMesh(Vector3[] vertices, int[] indices, Plane p){ + List cuttedTriangles = new List (); + + int cut = 0; + int notCut = 0; + + bool[] sideFlags = new bool[3]; + + for (int i = 0; i < indices.Length; i+=3) { + int outside = 0; + int lastOutsideId = 0; + int lastInsideId = 0; + for(int j = 0; j < 3; ++j){ + sideFlags[j] = p.GetSide(vertices[indices[i + j]]); + if(sideFlags[j]){ + outside++; + lastOutsideId = j; + }else{ + lastInsideId = j; + } + } + + if( outside ==3){ + notCut++; + }else{ + cut++; + } + + switch(outside) + { + case 0: + for(int j = 0; j < 3; ++j){ + cuttedTriangles.Add(vertices[indices[i + j]]); + } + break; + case 1: + { + Vector3 v0 = vertices[indices[i + lastOutsideId]]; + Vector3 v1 = vertices[indices[i + (lastOutsideId + 1) % 3]]; + Vector3 v2 = vertices[indices[i + (lastOutsideId + 2) % 3]]; + + float d0 = p.GetDistanceToPoint(v0); + float d1 = p.GetDistanceToPoint(v1); + float d2 = p.GetDistanceToPoint(v2); + + float a = d0 / (d0 - d1); + float b = d0 / (d0 - d2); + + Vector3 v3 = v0 + (v1 - v0) * a; + Vector3 v4 = v0 + (v2 - v0) * b; + + + cuttedTriangles.Add(v2); + cuttedTriangles.Add(v4); + cuttedTriangles.Add(v3); + + cuttedTriangles.Add(v2); + cuttedTriangles.Add(v3); + cuttedTriangles.Add(v1); + } + break; + case 2: + { + Vector3 v0 = vertices[indices[i + lastInsideId]]; + Vector3 v1 = vertices[indices[i + (lastInsideId + 1) % 3]]; + Vector3 v2 = vertices[indices[i + (lastInsideId + 2) % 3]]; + + float d0 = p.GetDistanceToPoint(v0); + float d1 = p.GetDistanceToPoint(v1); + float d2 = p.GetDistanceToPoint(v2); + + float a = d0 / (d0 - d1); + float b = d0 / (d0 - d2); + + Vector3 v3 = v0 + (v1 - v0) * a; + Vector3 v4 = v0 + (v2 - v0) * b; + + cuttedTriangles.Add(v0); + cuttedTriangles.Add(v3); + cuttedTriangles.Add(v4); + + } + break; + } + } + return cuttedTriangles; + } + + /**/ +} diff --git a/Assets/Scripts/AdvancedUtils.cs.meta b/Assets/Scripts/AdvancedUtils.cs.meta new file mode 100644 index 0000000..ab27681 --- /dev/null +++ b/Assets/Scripts/AdvancedUtils.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8cd8ee276a70096438bdfb17a8f9a607 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Animation.meta b/Assets/Scripts/Animation.meta new file mode 100644 index 0000000..66c0bc8 --- /dev/null +++ b/Assets/Scripts/Animation.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f3fed1c662ae64c488842230c3376319 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Animation/HumanoidAI.cs b/Assets/Scripts/Animation/HumanoidAI.cs new file mode 100644 index 0000000..b978ad5 --- /dev/null +++ b/Assets/Scripts/Animation/HumanoidAI.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using System.Collections; + + +public class AIJob { + public Action OnEnter; + public Action OnExit; + public Action OnUpdate; + public Action OnFixedUpdate; + public bool done; +} + +public class HumanoidAI : MonoBehaviour { + public HumanController human; + public float viewFov = 60; + public float viewDistance = 2; + public PlayerSensor viewSensor; + + private Queue _actionQueue = new Queue(); + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnValidate() { + var pc = human.eyes.GetComponent(); + if (pc == null) { + pc = human.eyes.AddComponent(); + + } + + pc.isTrigger = true; + int circleSegments = 5; + + + var points = new Vector2[1 + (circleSegments + 1)]; + points[0] = new Vector2(0, 0); + + for (int i = 0; i <= circleSegments; ++i) { + float angle = viewFov/circleSegments*i; + points[i + 1] = Quaternion.AngleAxis(-0.5f * viewFov + angle, Vector3.forward) * new Vector3(1, 0, 0) * viewDistance; + } + pc.points = points; + } + + void OnDrawGizmos() { + var pos = human.eyes.transform.position; + var eyesTf = human.eyes.transform.localToWorldMatrix; + var right = eyesTf.MultiplyVector(Vector3.right).normalized; + + var d0 = Quaternion.AngleAxis(viewFov * 0.5f, Vector3.forward) * right; + var d1 = Quaternion.AngleAxis(viewFov * -0.5f, Vector3.forward) * right; + Gizmos.color = Color.blue; + Gizmos.DrawLine(pos, pos + d0 * viewDistance); + Gizmos.DrawLine(pos, pos + d1 * viewDistance); + + int sections = 15; + int innerSections = 5; + for (int i = 0; i < sections; ++i) { + + float angle0 = (viewFov / (float)sections * i) - (viewFov / 2); + float angle1 = (viewFov / (float)sections * (i + 1)) - (viewFov / 2); + + var p0 = Quaternion.AngleAxis(angle0, Vector3.forward) * right; + var p1 = Quaternion.AngleAxis(angle1, Vector3.forward) * right; + + + Gizmos.DrawLine(pos + p0 * viewDistance, pos + p1 * viewDistance); + } + + Gizmos.color = new Color(0,0,1,0.4f); + for (int i = 0; i < sections; ++i) { + + for (int j = 0; j < innerSections; ++j) { + float dist = (viewDistance / (innerSections + 1)) * (j + 1); + + float angle0 = (viewFov / (float)sections * i) - (viewFov / 2); + float angle1 = (viewFov / (float)sections * (i + 1)) - (viewFov / 2); + + var p0 = Quaternion.AngleAxis(angle0, Vector3.forward) * right; + var p1 = Quaternion.AngleAxis(angle1, Vector3.forward) * right; + + + Gizmos.DrawLine(pos + p0 * dist, pos + p1 * dist); + } + + + } + + + + } + + +} diff --git a/Assets/Scripts/Animation/HumanoidAI.cs.meta b/Assets/Scripts/Animation/HumanoidAI.cs.meta new file mode 100644 index 0000000..b7da4c5 --- /dev/null +++ b/Assets/Scripts/Animation/HumanoidAI.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c78e7a6bf9dc52c429ebecae89101590 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Animation/RotationAnimator.cs b/Assets/Scripts/Animation/RotationAnimator.cs new file mode 100644 index 0000000..bf13233 --- /dev/null +++ b/Assets/Scripts/Animation/RotationAnimator.cs @@ -0,0 +1,18 @@ +using UnityEngine; +using System.Collections; + +public class RotationAnimator : MonoBehaviour { + public Vector3 Rotation; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + var rotation = transform.localRotation; + rotation.eulerAngles += Rotation * Time.deltaTime; + transform.localRotation = rotation; + } +} diff --git a/Assets/Scripts/Animation/RotationAnimator.cs.meta b/Assets/Scripts/Animation/RotationAnimator.cs.meta new file mode 100644 index 0000000..1d3cccf --- /dev/null +++ b/Assets/Scripts/Animation/RotationAnimator.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2f6f17afb4739354fbe7dd27dd61b387 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AudioManager.cs b/Assets/Scripts/AudioManager.cs new file mode 100644 index 0000000..1573ed8 --- /dev/null +++ b/Assets/Scripts/AudioManager.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class AudioManager : MonoBehaviour { + + public AudioSource inventorySource; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/AudioManager.cs.meta b/Assets/Scripts/AudioManager.cs.meta new file mode 100644 index 0000000..0b41410 --- /dev/null +++ b/Assets/Scripts/AudioManager.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 938d56570e6193c4f95f39d6d8bef605 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/AudioMixerController.cs b/Assets/Scripts/AudioMixerController.cs new file mode 100644 index 0000000..ae7445d --- /dev/null +++ b/Assets/Scripts/AudioMixerController.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.Audio; + + +public class AudioMixerController : MonoBehaviour { + public AudioMixer ambientMixer; + public string snapshotName = "Master"; + public float transitionTime = 1.0f; + private PlayerSensor _sensor; + + // Use this for initialization + void Start () { + _sensor = GetComponentInChildren(); + _sensor.PlayerEnter += HandlePlayerEnter; + } + + void HandlePlayerEnter (PlayerSensor sensor, GameObject player) + { + var snap = ambientMixer.FindSnapshot(snapshotName); + snap.TransitionTo(transitionTime); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/AudioMixerController.cs.meta b/Assets/Scripts/AudioMixerController.cs.meta new file mode 100644 index 0000000..e4e150d --- /dev/null +++ b/Assets/Scripts/AudioMixerController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4b84623cdd36cf8448949e8dfa4f9071 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/BreakableObject.cs b/Assets/Scripts/BreakableObject.cs new file mode 100644 index 0000000..5951257 --- /dev/null +++ b/Assets/Scripts/BreakableObject.cs @@ -0,0 +1,50 @@ +using System.Linq; +using UnityEngine; +using System.Collections; + +[SelectionBase] +public class BreakableObject : MonoBehaviour { + public Health health; + public RandomSoundPlayer player; + public GameObject[] instantinateOnDestroy; + + // Use this for initialization + void Start () { + if (health != null) { + health.Destroyed += health_Destroyed; + } + } + + void health_Destroyed() { + Break(); + } + + public void Break() { + var thisRb = GetComponent(); + var children = gameObject.GetComponentsInChildren(); + foreach (var child in children) { + var rb = child.gameObject.AddComponent(); + rb.mass = thisRb.mass/children.Count(); + child.transform.parent = null; + } + if (player != null) { + player.Play(true); + + } + + if (instantinateOnDestroy != null && instantinateOnDestroy.Length > 0) { + foreach (var o in instantinateOnDestroy) { + var item = Instantiate(o); + item.SetActive(true); + item.transform.parent = null; + } + } + + Destroy(gameObject); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/BreakableObject.cs.meta b/Assets/Scripts/BreakableObject.cs.meta new file mode 100644 index 0000000..e47bf65 --- /dev/null +++ b/Assets/Scripts/BreakableObject.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 512d83d6028109f48954f1ca49ede6df +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/BreakablePart.cs b/Assets/Scripts/BreakablePart.cs new file mode 100644 index 0000000..c94c31a --- /dev/null +++ b/Assets/Scripts/BreakablePart.cs @@ -0,0 +1,8 @@ +using UnityEngine; +using System.Collections; + +public class BreakablePart : MonoBehaviour { + + public float Mass = 1.0f; + +} diff --git a/Assets/Scripts/BreakablePart.cs.meta b/Assets/Scripts/BreakablePart.cs.meta new file mode 100644 index 0000000..91ef4b8 --- /dev/null +++ b/Assets/Scripts/BreakablePart.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 18841e63cecfe3c42a027f01f92d4f21 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Button.cs b/Assets/Scripts/Button.cs new file mode 100644 index 0000000..427f05a --- /dev/null +++ b/Assets/Scripts/Button.cs @@ -0,0 +1,100 @@ +using UnityEngine; +using System.Collections; + +public enum ButtonState{ + Error, + Locked, + Ready +} + + +public delegate void ButtonEventHandler(); + +public class Button : Trigger { + public ButtonState state; + public PlayerSensor sensor; + private GameAction _pressAction; + public bool interactive = true; + public Predicate interactivePredicate; + public event ButtonEventHandler Pressed; + public bool locked = false; + public Predicate lockedPredicate; + public Predicate errorPredicate; + public bool error; + public string pressActionText = "Press the button"; + + protected virtual void OnPressed () + { + var handler = Pressed; + if (handler != null) + handler (); + } + + void Start () { + if(sensor != null){ + sensor.PlayerEnter += HandlePlayerEnter; + sensor.PlayerExit += HandlePlayerExit; + }else{ + Debug.LogWarningFormat("Button {0} sensor is null", name ); + } + + _pressAction = new GameAction(gameObject, pressActionText); + } + + void HandlePlayerEnter (PlayerSensor sensor, GameObject player) + { + if(interactive){ + ActionController.AddAction(_pressAction); + } + } + void HandlePlayerExit (PlayerSensor sensor, GameObject player) + { + ActionController.RemoveAction(_pressAction); + } + + void SetInteractive(bool val){ + if(interactive == val){ + return; + } + + if(val){ + if(sensor != null && sensor.Check()){ + ActionController.AddAction(_pressAction); + } + }else{ + ActionController.RemoveAction(_pressAction); + } + + interactive = val; + } + + + + void OnAction(ActionArgs a){ + if(interactive){ + if(state == ButtonState.Ready){ + OnPressed(); + OnTrig(); + } + } + } + + void Update () { + + if(interactivePredicate != null){ + SetInteractive(interactivePredicate.Check()); + } + + if(errorPredicate.Check()){ + state = ButtonState.Error; + }else if(lockedPredicate.Check()){ + state = ButtonState.Locked; + }else{ + state = ButtonState.Ready; + } + + + + + } +} diff --git a/Assets/Scripts/Button.cs.meta b/Assets/Scripts/Button.cs.meta new file mode 100644 index 0000000..57c5099 --- /dev/null +++ b/Assets/Scripts/Button.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1c11b97f658532d47a170c6bfb1038ac +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ButtonLedController.cs b/Assets/Scripts/ButtonLedController.cs new file mode 100644 index 0000000..6a392f8 --- /dev/null +++ b/Assets/Scripts/ButtonLedController.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using System.Collections; + +public class ButtonLedController : MonoBehaviour { + public Led led; + public Button button; + public Color readyColor = Color.green; + public Color lockedColor = Color.blue; + public Color errorColor = Color.red; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + if(button.state == ButtonState.Locked){ + led.color = lockedColor; + }else if(button.state == ButtonState.Ready){ + led.color = readyColor; + }else{ + led.color = errorColor; + } + } +} diff --git a/Assets/Scripts/ButtonLedController.cs.meta b/Assets/Scripts/ButtonLedController.cs.meta new file mode 100644 index 0000000..9a3e11f --- /dev/null +++ b/Assets/Scripts/ButtonLedController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f0d18d9e32ed85c4ebfba2ca0ca793b0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ClosestPointDebug.cs b/Assets/Scripts/ClosestPointDebug.cs new file mode 100644 index 0000000..743ab47 --- /dev/null +++ b/Assets/Scripts/ClosestPointDebug.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + +public class ClosestPointDebug : MonoBehaviour { + public Collider2D collider; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnDrawGizmos() { + if (enabled) { + Vector2 pos = collider.offset + (Vector2)collider.transform.position; + Vector3 p = new Vector3(pos.x, pos.y, 0); + Gizmos.DrawLine(p, transform.position); + + var closestPoint = collider.ClosestPointOnBounds(transform.position); + AdvancedGizmo.DrawCircle(new Vector3(closestPoint.x, closestPoint.y, 0), Vector3.forward, 0.1f, Color.red, 48); + + + + } + + } +} diff --git a/Assets/Scripts/ClosestPointDebug.cs.meta b/Assets/Scripts/ClosestPointDebug.cs.meta new file mode 100644 index 0000000..7929c82 --- /dev/null +++ b/Assets/Scripts/ClosestPointDebug.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4535727b44d958d49858fb24d825b79b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Collider2DExtension.cs b/Assets/Scripts/Collider2DExtension.cs new file mode 100644 index 0000000..ca0bbe0 --- /dev/null +++ b/Assets/Scripts/Collider2DExtension.cs @@ -0,0 +1,59 @@ +using System.Linq; +using UnityEngine; +using System.Collections; + + +public static class Matrix4x4Extension { + public static Vector3 Scale(this Matrix4x4 m) { + return new Vector3(((Vector3)m.GetColumn(0)).magnitude, ((Vector3)m.GetColumn(1)).magnitude, ((Vector3)m.GetColumn(2)).magnitude); + } +} + + +public static class Collider2DExtension { + + public static Vector2 ClosestPointOnBounds(this Collider2D collider, Vector2 point) { + if (collider is CircleCollider2D) { + var circle = collider as CircleCollider2D; + var mat = circle.gameObject.transform.localToWorldMatrix; + var scale = mat.Scale(); + var radiusScale = Mathf.Max(scale.x, scale.y); + var radius = circle.radius*radiusScale; + + var circlePos = (Vector2)circle.gameObject.transform.position + circle.offset; + + return (point - circlePos).normalized * radius + (Vector2)collider.transform.position; + + }else if (collider is BoxCollider2D) { + var box = collider as BoxCollider2D; + float hw = box.size.x * 0.5f; + float hh = box.size.y * 0.5f; + + Vector3[] corners = new Vector3[4] { + new Vector3(-hw, hh, 0), + new Vector3(hw, hh, 0), + new Vector3(hw, -hh, 0), + new Vector3(-hw, -hh, 0) + }; + + Color[] c = new Color[4]{Color.red, Color.green, Color.blue, Color.white}; + + for (int i = 0; i < 4; ++i) { + corners[i] = collider.transform.TransformPoint(corners[i]) + new Vector3(box.offset.x, box.offset.y, 0); + corners[i].z = 0; + } + + Vector2[] points = new Vector2[4]; + + for (int i = 0; i < 4; ++i) { + var p0 = corners[i]; + var p1 = corners[(i + 1) % 4]; + var pt = AdvancedMath.SegmentNearestPoint(p0, p1, (Vector3)point); + points[i] = pt; + } + + return points.OrderBy(v => (point - v).magnitude).First(); + } + return Vector3.zero; + } +} diff --git a/Assets/Scripts/Collider2DExtension.cs.meta b/Assets/Scripts/Collider2DExtension.cs.meta new file mode 100644 index 0000000..1b00040 --- /dev/null +++ b/Assets/Scripts/Collider2DExtension.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 47ed87a0595b5064a971c8c266a6acf4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ComponentEnabler.cs b/Assets/Scripts/ComponentEnabler.cs new file mode 100644 index 0000000..f49dba1 --- /dev/null +++ b/Assets/Scripts/ComponentEnabler.cs @@ -0,0 +1,25 @@ +using UnityEngine; +using System.Collections; + +public class ComponentEnabler : MonoBehaviour { + public Behaviour target; + public Predicate enabledPredicate; + public bool allowReenable = false; + private bool _enabled = true; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + if (!_enabled && !allowReenable) { + return; + } + _enabled = enabledPredicate == null || enabledPredicate.Check(); + if (target != null) { + target.enabled = _enabled; + } + } +} diff --git a/Assets/Scripts/ComponentEnabler.cs.meta b/Assets/Scripts/ComponentEnabler.cs.meta new file mode 100644 index 0000000..2202404 --- /dev/null +++ b/Assets/Scripts/ComponentEnabler.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c19fef4ffdf4dc044884190b63ef93bd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ContactDamage.cs b/Assets/Scripts/ContactDamage.cs new file mode 100644 index 0000000..c0d766f --- /dev/null +++ b/Assets/Scripts/ContactDamage.cs @@ -0,0 +1,82 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +[RequireComponent(typeof(Rigidbody2D))] +public class ContactDamage : MonoBehaviour { + + public float minImpulse = 100.0f; + public float maxImpulse = 300.0f; + + public float maxDamage = 100.0f; + private List _ignore = new List(); + + public void AddIgnoreObject(ContactDamage other) { + _ignore.Add(other); + } + + void FixedUpdate() { + _ignore.Clear(); + } + + void OnImpulse(float impulse, Vector2 point, GameObject impulseSource) { + if (impulse >= minImpulse) { + float k = 1.0f - (impulse - maxImpulse) / (minImpulse - maxImpulse); + float damage = k * maxDamage; + + var health = GetComponent(); + if (health != null) { + health.ApplyDamage(damage, impulseSource, point); + } + } + } + + void OnCollisionEnter2D(Collision2D col) { + var otherHuman = col.transform.GetComponent(); + var thisHuman = GetComponent(); + if (otherHuman != null && thisHuman != null) { + return; + } + + var otherDamageController = col.transform.GetComponent(); + if (otherDamageController != null){ + if (_ignore.Contains(otherDamageController)) { + Debug.Log("Skip damage on " + name); + return; + } + else { + otherDamageController.AddIgnoreObject(this); + } + } + + + float impulse; + var rb = GetComponent(); + var v1 = rb.GetWorldPointVelocityEx(col.contacts[0].point); + Vector2 v2 = Vector2.zero; + float m2; + Vector2 relativeVelocity; + + if (col.rigidbody != null && !col.rigidbody.isKinematic) { + v2 = col.rigidbody.GetWorldPointVelocityEx(col.contacts[0].point); + m2 = col.rigidbody.mass; + } + else { + v2 = Vector2.zero; + m2 = 0; + } + + relativeVelocity = v2 - v1; + impulse = (rb.mass*v1 + m2*v2).magnitude; + + + + Debug.LogFormat("Collision! Impulse = {0} on object {1} ({4}), relative velocity = {2}, self velocity = {3}", impulse, name, relativeVelocity.magnitude, v1.magnitude, col.transform.name); + OnImpulse(impulse, col.contacts[0].point, col.gameObject); + if (otherDamageController != null) { + otherDamageController.OnImpulse(impulse, col.contacts[0].point, gameObject); + } + + } + +} diff --git a/Assets/Scripts/ContactDamage.cs.meta b/Assets/Scripts/ContactDamage.cs.meta new file mode 100644 index 0000000..30ec10b --- /dev/null +++ b/Assets/Scripts/ContactDamage.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ad9db2b8c80a00a4688dcde780f548c9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Debug.meta b/Assets/Scripts/Debug.meta new file mode 100644 index 0000000..7382b85 --- /dev/null +++ b/Assets/Scripts/Debug.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e07b0af2dd81d604a9572cd7f48a50c4 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Debug/DebugPointVelocity.cs b/Assets/Scripts/Debug/DebugPointVelocity.cs new file mode 100644 index 0000000..9b314df --- /dev/null +++ b/Assets/Scripts/Debug/DebugPointVelocity.cs @@ -0,0 +1,38 @@ +using UnityEngine; +using System.Collections; + +public class DebugPointVelocity : MonoBehaviour { + private Physics2DEx _rb; + public Vector3 offset = Vector3.up; + // Use this for initialization + void Start () { + _rb = GetComponent(); + } + + // Update is called once per frame + void Update () { + + } + + void OnDrawGizmos() { + if (_rb == null) { + _rb = GetComponent(); + } + + if (_rb != null) { + var worldPoint = transform.localToWorldMatrix.MultiplyPoint(offset); + var velocity = _rb.GetWorldPointVelocity(worldPoint); + Gizmos.DrawLine(worldPoint, (Vector3)velocity + worldPoint); + AdvancedGizmo.DrawCircle(worldPoint, Vector3.forward, 0.1f, Color.red); + + var r = GetComponent(); + var v = r.GetPointVelocity(worldPoint); + + Gizmos.color = Color.blue; + Gizmos.DrawLine(worldPoint, (Vector3) v + worldPoint); + + //Debug.LogFormat("Unity: {0}, Custom: {1}, Angular velocity: {2}", v.magnitude, velocity.magnitude, _rb.AngularVelocity); + } + + } +} diff --git a/Assets/Scripts/Debug/DebugPointVelocity.cs.meta b/Assets/Scripts/Debug/DebugPointVelocity.cs.meta new file mode 100644 index 0000000..0271947 --- /dev/null +++ b/Assets/Scripts/Debug/DebugPointVelocity.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 329ecaf192a2b654cab02fa37d8dd5f8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DelayDetonator.cs b/Assets/Scripts/DelayDetonator.cs new file mode 100644 index 0000000..06cbe09 --- /dev/null +++ b/Assets/Scripts/DelayDetonator.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using System.Collections; + +public enum DetonatorState{ + Idle, + Wait, + Exploded +} + +public class DelayDetonator : MonoBehaviour { + + public Explosive target; + private AudioSource _source; + public Predicate trigger; + private DetonatorState _state; + public float delay = 3.0f; + private float timeElapsed = 0; + + void Start () { + if(target == null){ + target = GetComponentInChildren(); + } + _source = GetComponent(); + } + + void Update () { + if(_state == DetonatorState.Idle && trigger != null && trigger.Check()){ + _state = DetonatorState.Wait; + if(_source != null){ + _source.Play(); + } + } + if(_state == DetonatorState.Wait){ + timeElapsed += Time.deltaTime; + if(timeElapsed >= delay){ + _state = DetonatorState.Exploded; + if(_source != null){ + _source.Stop(); + } + if(target != null){ + target.Explode(); + } + + } + } + } +} diff --git a/Assets/Scripts/DelayDetonator.cs.meta b/Assets/Scripts/DelayDetonator.cs.meta new file mode 100644 index 0000000..89ef771 --- /dev/null +++ b/Assets/Scripts/DelayDetonator.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 66f5a9fadc4228443a92ae8e762e292f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DestroySelf.cs b/Assets/Scripts/DestroySelf.cs new file mode 100644 index 0000000..1d1ecc3 --- /dev/null +++ b/Assets/Scripts/DestroySelf.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using System.Collections; + +public class DestroySelf : MonoBehaviour { + + public float timeout = 1.0f; + private float time = 0; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + time += Time.deltaTime; + if(time >= timeout){ + Destroy(gameObject); + } + } +} diff --git a/Assets/Scripts/DestroySelf.cs.meta b/Assets/Scripts/DestroySelf.cs.meta new file mode 100644 index 0000000..89faeac --- /dev/null +++ b/Assets/Scripts/DestroySelf.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a6da50ff8e45cbd44ad3937c13c3c07e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DigitalPanelController.cs b/Assets/Scripts/DigitalPanelController.cs new file mode 100644 index 0000000..bd7840c --- /dev/null +++ b/Assets/Scripts/DigitalPanelController.cs @@ -0,0 +1,92 @@ +using UnityEngine; +using System.Collections; + +public class DigitalPanelController : Predicate { + + private string _currentDigits = ""; + public GameObject guiPrototype; + private Canvas _guiInstance; + public bool locked = true; + public string password = "4815"; + public PlayerSensor sensor; + private GameAction _showPadAction; + + public string CurrentDigits { + get { return _currentDigits; } + set { + _currentDigits = value; + OnPasswordUpdated(); + } + } + + private void OnPasswordUpdated() { + if (_currentDigits == password) { + HideGui(); + locked = false; + } + } + + public void ShowGui() { + if (_guiInstance == null) { + _guiInstance = ((GameObject)Instantiate(guiPrototype)).GetComponent(); + _guiInstance.GetComponent().Panel = this; + + var c = FindObjectOfType(); + c.ShowUI(_guiInstance.GetComponent()); + + Time.timeScale = 0; + } + } + + public void HideGui() { + if (_guiInstance != null) { + var c = FindObjectOfType(); + c.ShowPreviousUi(true); + Destroy(_guiInstance.gameObject); + } + Time.timeScale = 1; + } + + // Use this for initialization + void Start () { + if (sensor != null) { + sensor.PlayerEnter += sensor_PlayerEnter; + sensor.PlayerExit += sensor_PlayerExit; + } + + _showPadAction = new GameAction(gameObject, "use pad"); + } + + bool GuiVisible() { + return _guiInstance != null; + } + + void OnAction(ActionArgs a) { + if (!GuiVisible()) { + ShowGui(); + } + } + + void sensor_PlayerExit(PlayerSensor senso, GameObject player) { + ActionController.RemoveAction(_showPadAction); + } + + void sensor_PlayerEnter(PlayerSensor senso, GameObject player) { + if (locked) { + ActionController.AddAction(_showPadAction); + } + } + + // Update is called once per frame + void Update () { + + } + + protected override bool CheckInternal() { + return locked; + } + + protected override bool CheckInternal(object param) { + return CheckInternal(); + } +} diff --git a/Assets/Scripts/DigitalPanelController.cs.meta b/Assets/Scripts/DigitalPanelController.cs.meta new file mode 100644 index 0000000..cd0aca5 --- /dev/null +++ b/Assets/Scripts/DigitalPanelController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4976622a24160644483fc1bd0cb3d124 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DigitalPanelGuiController.cs b/Assets/Scripts/DigitalPanelGuiController.cs new file mode 100644 index 0000000..6f5a64f --- /dev/null +++ b/Assets/Scripts/DigitalPanelGuiController.cs @@ -0,0 +1,48 @@ +using UnityEngine; +using System.Collections; + +public class DigitalPanelGuiController : UiController { + private DigitalPanelController _panel; + public DigitalPanelController Panel { + get { return _panel; } + set { + _panel = value; + UpdateText(); + } + } + public UnityEngine.UI.Text digits; + + public void OnDigitDown(int digit) { + if (_panel.CurrentDigits.Length < 4) { + _panel.CurrentDigits += digit.ToString(); + } + UpdateText(); + } + + + + void Start() { + + } + + public void OnCancelDown() { + if (_panel != null) { + _panel.HideGui(); + } + } + + void UpdateText() { + if (_panel != null) { + digits.text = _panel.CurrentDigits; + } + } + + public void OnDeleteDown() { + if (_panel.CurrentDigits.Length > 0) { + _panel.CurrentDigits = _panel.CurrentDigits.Substring(0, _panel.CurrentDigits.Length - 1); + } + UpdateText(); + } + + +} diff --git a/Assets/Scripts/DigitalPanelGuiController.cs.meta b/Assets/Scripts/DigitalPanelGuiController.cs.meta new file mode 100644 index 0000000..438c381 --- /dev/null +++ b/Assets/Scripts/DigitalPanelGuiController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2a1e1afef9146e945935880f12b2372c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Door.cs b/Assets/Scripts/Door.cs new file mode 100644 index 0000000..2431cf5 --- /dev/null +++ b/Assets/Scripts/Door.cs @@ -0,0 +1,87 @@ +using UnityEngine; +using System.Collections; + +public enum DoorState{ + Closed, + Closing, + Opened, + Opening +} + +public delegate void DoorStateDelegate(Door sender, DoorState from, DoorState to); + +public class Door : MonoBehaviour { + + private Animator anim; + private float state; + public float speed = 1.0f; + public float direction; + private DoorState doorState; + private SpriteRenderer _renderer; + + public event DoorStateDelegate StateChanged; + + protected virtual void OnStateChanged (DoorState from, DoorState to) + { + var handler = StateChanged; + if (handler != null) + handler (this, from, to); + } + + public DoorState State{ + get{return doorState;} + } + + // Use this for initialization + void Start () { + anim = gameObject.GetComponent(); + _renderer = gameObject.GetComponent(); + _renderer.enabled = false; + state = 0; + } + + public void Open(){ + if((doorState == DoorState.Opened) || (doorState == DoorState.Opening)){ + return; + } + OnStateChanged(doorState, DoorState.Opening); + direction = 1.0f; + doorState = DoorState.Opening; + } + + public void Close(){ + if((doorState == DoorState.Closed) || (doorState == DoorState.Closing)){ + return; + } + OnStateChanged(doorState, DoorState.Closing); + doorState = DoorState.Closing; + direction = -1.0f; + + } + + // Update is called once per frame + void Update () { + if(direction == 0.0f){ + return; + } + + + state = Mathf.Clamp01(state + direction * speed * Time.deltaTime); + + _renderer.enabled = state != 0.0f; + + if(direction < 0.0f && state == 0.0f){ + direction = 0.0f; + + OnStateChanged(doorState, DoorState.Closed); + doorState = DoorState.Closed; + } + if(direction > 0.0f && state == 1.0f){ + direction = 0.0f; + OnStateChanged(doorState, DoorState.Opened); + doorState = DoorState.Opened; + } + + anim.SetFloat("DoorState", state); + } +} diff --git a/Assets/Scripts/Door.cs.meta b/Assets/Scripts/Door.cs.meta new file mode 100644 index 0000000..f06b0c0 --- /dev/null +++ b/Assets/Scripts/Door.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8714784ea59c63b4fbd271eedf002e6c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DoorAudioController.cs b/Assets/Scripts/DoorAudioController.cs new file mode 100644 index 0000000..5aba357 --- /dev/null +++ b/Assets/Scripts/DoorAudioController.cs @@ -0,0 +1,33 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.Audio; + +public class DoorAudioController : MonoBehaviour { + private Door _door; + private AudioSource _audio; + public AudioClip openSound; + public AudioClip closeSound; + + // Use this for initialization + void Start () { + _door = transform.parent.GetComponentInChildren(); + _door.StateChanged += HandleStateChanged; + + _audio = GetComponent(); + + } + + void HandleStateChanged (Door sender, DoorState from, DoorState to) + { + if(from == DoorState.Closed){ + _audio.PlayOneShot(openSound); + }else if(to == DoorState.Closed){ + _audio.PlayOneShot(closeSound); + } + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/DoorAudioController.cs.meta b/Assets/Scripts/DoorAudioController.cs.meta new file mode 100644 index 0000000..a5c234b --- /dev/null +++ b/Assets/Scripts/DoorAudioController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05207f3a50461e74a99f442fd7136308 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DoorController.cs b/Assets/Scripts/DoorController.cs new file mode 100644 index 0000000..e7bba66 --- /dev/null +++ b/Assets/Scripts/DoorController.cs @@ -0,0 +1,62 @@ +using UnityEngine; +using System.Collections; + +public class DoorController: MonoBehaviour { + private bool isPlayerInside; + private GameAction doorAction = new GameAction(); + public Door door; + public GameObject obstacle; + public PlayerSensor sensor; + private Notification _notify; + public bool locked; + + // Use this for initialization + void Start () { + doorAction.target = gameObject; + _notify = new Notification(); + _notify.source = gameObject; + _notify.text = "Door locked"; + + if(sensor != null){ + sensor.PlayerEnter += HandlePlayerEnter; + sensor.PlayerExit += HandlePlayerExit; + } + } + + void HandlePlayerEnter (PlayerSensor sensor, GameObject player) + { + if (locked) { + NotificationsController.AddNotification(_notify); + } + else { + ActionController.AddAction(doorAction); + } + + } + + void HandlePlayerExit (PlayerSensor sensor, GameObject player) + { + NotificationsController.RemoveNotification(_notify); + ActionController.RemoveAction(doorAction); + } + + // Update is called once per frame + void Update () { + obstacle.SetActive(door.State != DoorState.Opened); + if(door.State == DoorState.Closed || door.State == DoorState.Closing){ + doorAction.text = "Open the door"; + }else{ + doorAction.text = "Close the door"; + } + + } + + void OnAction(ActionArgs param) { + if(door.State == DoorState.Closed || door.State == DoorState.Closing){ + door.Open(); + }else{ + door.Close(); + } + //ActionController.RemoveAction(param); + } +} diff --git a/Assets/Scripts/DoorController.cs.meta b/Assets/Scripts/DoorController.cs.meta new file mode 100644 index 0000000..9b91da7 --- /dev/null +++ b/Assets/Scripts/DoorController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95e7b3e920eb43048bb39a7d97b19672 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DoorOpenedPredicate.cs b/Assets/Scripts/DoorOpenedPredicate.cs new file mode 100644 index 0000000..581406e --- /dev/null +++ b/Assets/Scripts/DoorOpenedPredicate.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class DoorOpenedPredicate : Predicate { + public Door door; + protected override bool CheckInternal () + { + return door.State != DoorState.Closed; + } + protected override bool CheckInternal (object param) + { + return Check (); + } + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/DoorOpenedPredicate.cs.meta b/Assets/Scripts/DoorOpenedPredicate.cs.meta new file mode 100644 index 0000000..124e96d --- /dev/null +++ b/Assets/Scripts/DoorOpenedPredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8b4aad792a21eca4c909d4e6bec475ef +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/DoorPredicate.cs b/Assets/Scripts/DoorPredicate.cs new file mode 100644 index 0000000..f679c83 --- /dev/null +++ b/Assets/Scripts/DoorPredicate.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using System.Collections; + +public class DoorPredicate : Predicate { + + protected override bool CheckInternal (object param) + { + return Check (); + } + + + private Door _door; + + void Start(){ + _door = gameObject.GetComponentInChildren(); + } + + protected override bool CheckInternal () + { + if(_door == null){ + Debug.Log("WTF"); + return false; + } + + return _door.State != DoorState.Closed; + } +} diff --git a/Assets/Scripts/DoorPredicate.cs.meta b/Assets/Scripts/DoorPredicate.cs.meta new file mode 100644 index 0000000..e009b02 --- /dev/null +++ b/Assets/Scripts/DoorPredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e0647b14841dc64bb062faa9f985a72 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ElevatorController.cs b/Assets/Scripts/ElevatorController.cs new file mode 100644 index 0000000..c6ab933 --- /dev/null +++ b/Assets/Scripts/ElevatorController.cs @@ -0,0 +1,93 @@ +using UnityEngine; +using System.Collections; + +public enum ElevatorState{ + Idle, + Moving +} + +public class ElevatorController : MonoBehaviour { + public Trigger startTrigger; + public ElevatorState state; + public GameObject target; + public float moveState; + private float moveDirection = 1.0f; + private Vector3 startupPosition; + private Vector3 targetPosition; + public float speed = 2.0f; + public AudioSource startStopSource; + public AudioSource moveSource; + public AudioClip startSound; + public AudioClip stopSound; + public AudioClip moveSound; + + + void Start () { + startupPosition = transform.localPosition; + targetPosition = startupPosition + transform.InverseTransformPoint(target.transform.position); + targetPosition.z = startupPosition.z; + + if(startTrigger != null){ + startTrigger.Trig += HandleTrig; + } + } + + void HandleTrig () + { + Debug.Log("Trig"); + if(state == ElevatorState.Idle){ + StartMovement(); + } + } + + void StartMovement(){ + SetState(ElevatorState.Moving); + } + + void SetState(ElevatorState s){ + if(state == s){ + return; + } + if(s == ElevatorState.Moving){ + startStopSource.PlayOneShot(startSound); + moveSource.clip = moveSound; + moveSource.loop = true; + moveSource.PlayDelayed(0.5f); + }else{ + moveSource.Stop(); + startStopSource.PlayOneShot(stopSound); + moveDirection = -moveDirection; + } + state = s; + Debug.Log("Set state: " + state); + } + + void FixedUpdate(){ + + } + + void Update () { + if(state == ElevatorState.Moving){ + Vector3 t = moveDirection > 0 ? targetPosition : startupPosition; + Vector3 dir = t - transform.localPosition; + float dist = dir.magnitude; + + if(dist <= 0.001f){ + transform.localPosition = t; + SetState(ElevatorState.Idle); + + }else{ + float moveLen = speed * Time.deltaTime; + if(moveLen > dist){ + moveLen = dist; + } + + transform.localPosition += dir.normalized * moveLen; + } + + + + } + + } +} diff --git a/Assets/Scripts/ElevatorController.cs.meta b/Assets/Scripts/ElevatorController.cs.meta new file mode 100644 index 0000000..0eac315 --- /dev/null +++ b/Assets/Scripts/ElevatorController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f0cda7a0c8fac2d459eb4f79f2b2de57 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ElevatorLockedPredicate.cs b/Assets/Scripts/ElevatorLockedPredicate.cs new file mode 100644 index 0000000..e1fb2a6 --- /dev/null +++ b/Assets/Scripts/ElevatorLockedPredicate.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using System.Collections; + +public class ElevatorLockedPredicate : Predicate { + public ElevatorController elevator; + public bool locked; + protected override bool CheckInternal () + { + locked = elevator.state == ElevatorState.Moving; + return locked; + } + protected override bool CheckInternal (object param) + { + return CheckInternal(); + } + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/ElevatorLockedPredicate.cs.meta b/Assets/Scripts/ElevatorLockedPredicate.cs.meta new file mode 100644 index 0000000..8c99bc5 --- /dev/null +++ b/Assets/Scripts/ElevatorLockedPredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a079e45c032af084ab1b2eabc16143b3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Escape.cs b/Assets/Scripts/Escape.cs new file mode 100644 index 0000000..166264d --- /dev/null +++ b/Assets/Scripts/Escape.cs @@ -0,0 +1,28 @@ +using UnityEngine; + +#if UNITY_EDITOR +using UnityEditor; +#endif +using System.Collections; + +public class Escape : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + public static void Quit(){ + #if UNITY_EDITOR + EditorApplication.isPlaying = false; + #else + Application.Quit(); + #endif + } + + // Update is called once per frame + void Update () { + if(Input.GetKeyDown(KeyCode.Escape)){ + Quit(); + } + } +} diff --git a/Assets/Scripts/Escape.cs.meta b/Assets/Scripts/Escape.cs.meta new file mode 100644 index 0000000..2069f63 --- /dev/null +++ b/Assets/Scripts/Escape.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 70a4178f7220c5842af58be3041dc3fd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Explosive.cs b/Assets/Scripts/Explosive.cs new file mode 100644 index 0000000..11420d0 --- /dev/null +++ b/Assets/Scripts/Explosive.cs @@ -0,0 +1,83 @@ +using UnityEngine; +using System.Collections; +using System.Linq; + +public enum ExplosiveState{ + Idle, + Countdown, + Explode, + Exploded +} + +public class Explosive : MonoBehaviour { + + public float explosionRadius = 1.0f; + public float explosionForce = 100; + private PlayerSensor _sensor; + public float detonateDistance = 1.0f; + private AudioSource _audio; + public GameObject[] createOnExplosion; + public bool destroySelf = true; + public float hitPoints = 100; + + + public void Explode(){ + + var targets = Physics2D.OverlapCircleAll(transform.position, explosionRadius); + targets = targets.Where(v => v.attachedRigidbody != null).ToArray(); + + var rb = targets.Select(v => v.attachedRigidbody).Distinct(); + + foreach(var t in rb){ + var v = (Vector2)(t.transform.position - transform.position); + var forceVector = v.normalized; + float k = 1.0f - Mathf.Clamp01(v.magnitude / explosionRadius); + float forceMagnitude = k * explosionForce; + t.AddForce(forceVector * forceMagnitude); + + float resultP = k * hitPoints; + var health= t.gameObject.GetComponent(); + if(health != null){ + Debug.Log("Apply damage: " + resultP); + health.ApplyDamage(resultP); + } + + } + + foreach(var g in createOnExplosion){ + if(g != null){ + var instance = Instantiate(g); + instance.transform.position = transform.position; + } + } + + + + if(destroySelf){ + Destroy(gameObject); + } + } + + void Start () { + _sensor = GetComponentInChildren(); + _sensor.PlayerEnter += HandlePlayerEnter; + _audio = GetComponent(); + } + + void HandlePlayerEnter (PlayerSensor sensor, GameObject player) + { + + //Explode(); + } + + void Update () { + if(Input.GetKeyDown(KeyCode.R)){ + Explode(); + } + } + + void OnDrawGizmosSelected(){ + AdvancedGizmo.DrawCircle(transform.position, Vector3.forward, explosionRadius, Color.red, 36); + AdvancedGizmo.DrawCircle(transform.position, Vector3.forward, detonateDistance, Color.blue, 36); + } +} diff --git a/Assets/Scripts/Explosive.cs.meta b/Assets/Scripts/Explosive.cs.meta new file mode 100644 index 0000000..f166b54 --- /dev/null +++ b/Assets/Scripts/Explosive.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4801a357aea85a0489139216f8d2132f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/FalsePredicate.cs b/Assets/Scripts/FalsePredicate.cs new file mode 100644 index 0000000..c9e51e0 --- /dev/null +++ b/Assets/Scripts/FalsePredicate.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class FalsePredicate : Predicate { + + + + protected override bool CheckInternal() { + return false; + } + + protected override bool CheckInternal(object param) { + return false; + } +} diff --git a/Assets/Scripts/FalsePredicate.cs.meta b/Assets/Scripts/FalsePredicate.cs.meta new file mode 100644 index 0000000..535d859 --- /dev/null +++ b/Assets/Scripts/FalsePredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7eeec86b5622e7547a4bec63ab99cb9c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/GameController.cs b/Assets/Scripts/GameController.cs new file mode 100644 index 0000000..2700441 --- /dev/null +++ b/Assets/Scripts/GameController.cs @@ -0,0 +1,134 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.EventSystems; + + +public enum GameState { + Gameplay, + InventoryUI, + GameOverUI, + PauseUI +} + +public class GameController : MonoBehaviour { + public HudController hud; + public GameOverUIController gameOverScreen; + public InventoryUIController inventoryController; + public PauseUiController pauseUi; + private GameState _state; + private float _tenseState = 100; + public float _tenseReleaseSpeed = 5; + private HorizontalProgressBar _tenseBar; + private UiController _currentUi; + private UiController _previousUi; + public AudioClip gameOverClip; + + public GameState State { + get { return _state; } + } + + public void OnSuspiciousSound(HumanController source) { + + } + + public void OnCanSeePlayer(HumanController source) { + + } + + public void ShowUI(UiController ui) { + if (_currentUi == ui) { + return; + } + + _previousUi = _currentUi; + + if (_previousUi != null) { + _previousUi.gameObject.SetActive(false); + } + + + + _currentUi = ui; + if (_currentUi != null) { + _currentUi.gameObject.SetActive(true); + } + + if (_currentUi == null || _currentUi == hud || _currentUi == gameOverScreen) { + Time.timeScale = 1; + } + else { + Time.timeScale = 0; + } + + if (_currentUi == hud) { + _state = GameState.Gameplay; + } + } + + public void ShowPreviousUi(bool removeCurrentFromHistory = false) { + ShowUI(_previousUi); + if (removeCurrentFromHistory) { + _previousUi = null; + } + } + + void Start () { + _tenseBar = new HorizontalProgressBar(); + ShowUI(hud); + } + + public void GameOver(){ + _state = GameState.GameOverUI; + ShowUI(gameOverScreen); + + if (gameOverClip != null) { + AudioSource.PlayClipAtPoint(gameOverClip, Vector3.zero); + } + //hud.gameObject.SetActive(false); + //gameOverScreen.gameObject.SetActive(true); + } + + public void PauseGame(bool pause) { + Time.timeScale = pause ? 0 : 1; + } + + void Update () { + if (_state == GameState.GameOverUI) { + return; + } + if (Input.GetKeyDown(KeyCode.I)) { + var playerController = FindObjectOfType(); + + // bool menuVisible = inventoryController.gameObject.activeInHierarchy; + + if (_state == GameState.InventoryUI) { + // inventoryController.gameObject.SetActive(false); + _state = GameState.Gameplay; + // hud.gameObject.SetActive(true); + ShowUI(hud); + // PauseGame(false); + } + else if (_state == GameState.Gameplay) { + // PauseGame(true); + inventoryController.inventory = playerController.GetComponent(); + //inventoryController.gameObject.SetActive(true); + ShowUI(inventoryController); + + inventoryController.Rebuild(); + + + _state = GameState.InventoryUI; + //hud.gameObject.SetActive(false); + } + } + + if (Input.GetKeyDown(KeyCode.Escape)) { + if (_state != GameState.PauseUI) { + ShowUI(pauseUi); + } + else { + ShowPreviousUi(); + } + } + } +} diff --git a/Assets/Scripts/GameController.cs.meta b/Assets/Scripts/GameController.cs.meta new file mode 100644 index 0000000..dc3cd5f --- /dev/null +++ b/Assets/Scripts/GameController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0470df12d66f0c24c8c40e33fb048c6e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/GameEnd.cs b/Assets/Scripts/GameEnd.cs new file mode 100644 index 0000000..0a888df --- /dev/null +++ b/Assets/Scripts/GameEnd.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using System.Collections; + +public class GameEnd : MonoBehaviour { + public PlayerSensor sensor; + + // Use this for initialization + void Start () { + sensor.PlayerEnter += sensor_PlayerEnter; + } + + void sensor_PlayerEnter(PlayerSensor senso, GameObject player) { + Application.LoadLevel(2); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/GameEnd.cs.meta b/Assets/Scripts/GameEnd.cs.meta new file mode 100644 index 0000000..70437dc --- /dev/null +++ b/Assets/Scripts/GameEnd.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b934082a1e0bd304eb028bbac46d613e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/GameoverOnDeath.cs b/Assets/Scripts/GameoverOnDeath.cs new file mode 100644 index 0000000..907b5c9 --- /dev/null +++ b/Assets/Scripts/GameoverOnDeath.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using System.Collections; + +[RequireComponent(typeof(Health))] +public class GameoverOnDeath : MonoBehaviour { + public GameController gameController; + + void Start () { + GetComponent().Destroyed += OnDeath; + } + + void OnDeath(){ + gameController.GameOver(); + } + +} diff --git a/Assets/Scripts/GameoverOnDeath.cs.meta b/Assets/Scripts/GameoverOnDeath.cs.meta new file mode 100644 index 0000000..82fb144 --- /dev/null +++ b/Assets/Scripts/GameoverOnDeath.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 099cadfa5772ec644b7a32d8c6bb3ea5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/GunStateSensor.cs b/Assets/Scripts/GunStateSensor.cs new file mode 100644 index 0000000..5ff1841 --- /dev/null +++ b/Assets/Scripts/GunStateSensor.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using System.Collections; + +public class GunStateSensor : StateMachineBehaviour { + + public override void OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + var controller = animator.GetComponent(); + if(controller != null){ + controller.OnAnimationGunArmed(true); + } + } + + public override void OnStateExit (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + var controller = animator.GetComponent(); + if(controller != null){ + controller.OnAnimationGunArmed(false); + } + } +} diff --git a/Assets/Scripts/GunStateSensor.cs.meta b/Assets/Scripts/GunStateSensor.cs.meta new file mode 100644 index 0000000..48beb04 --- /dev/null +++ b/Assets/Scripts/GunStateSensor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7923ea12b5258e444876c08f172bf88e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Health.cs b/Assets/Scripts/Health.cs new file mode 100644 index 0000000..cc928a9 --- /dev/null +++ b/Assets/Scripts/Health.cs @@ -0,0 +1,65 @@ +using UnityEngine; +using System.Collections; + + +public delegate void HealthDelegate(); +public delegate void HealthDamageDelegate(float damage, Object source, Vector3? worldPoint); + +public class Health : MonoBehaviour { + public float value = 100; + public bool destroyed = false; + public event HealthDelegate Destroyed; + public event HealthDamageDelegate DamageApplied; + public RandomSoundPlayer deathPlayer; + + protected virtual void OnDamageApplied(float damage, Object source, Vector3? worldpoint) { + HealthDamageDelegate handler = DamageApplied; + if (handler != null) { + handler(damage, source, worldpoint); + } + + } + + public bool Dead{ + get{return value <= 0.0f;} + } + + protected virtual void OnDestroyed () + { + if (deathPlayer != null) { + deathPlayer.Play(); + } + var handler = Destroyed; + if (handler != null) + handler (); + } + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnGUI(){ + var pt = Camera.main.WorldToScreenPoint(transform.position); + pt.y = Camera.main.pixelHeight - pt.y; + //GUI.Label(new Rect(pt.x,pt.y, 100,30), "Health: " + health); + } + + public void ApplyDamage(float damage, Object source = null, Vector3? worldPoint = null){ + if(!destroyed) { + Debug.LogFormat("Apply damage {0} to object {1}", damage, name); + OnDamageApplied(damage, source, worldPoint); + value -= Mathf.Clamp(Mathf.Abs(damage), 0, value); + + if(value <= 0.0f){ + destroyed = true; + OnDestroyed(); + } + } + } +} diff --git a/Assets/Scripts/Health.cs.meta b/Assets/Scripts/Health.cs.meta new file mode 100644 index 0000000..a6db410 --- /dev/null +++ b/Assets/Scripts/Health.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d2c1638d0076ca43ac240667d2aa782 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/HudController.cs b/Assets/Scripts/HudController.cs new file mode 100644 index 0000000..f57ed62 --- /dev/null +++ b/Assets/Scripts/HudController.cs @@ -0,0 +1,68 @@ +using UnityEngine; +using System.Collections; +using System.Reflection; + +public class UIText { + private MonoBehaviour _source; + private PropertyInfo textProp; + + public UIText(MonoBehaviour src) { + _source = src; + textProp = src.GetType().GetProperty("text"); + } + + public string text { + get { return (string)textProp.GetValue(_source, null); } + set { textProp.SetValue(_source, value, null); } + } + +} + +public class HudController : UiController { + + public MonoBehaviour notifyText; + public MonoBehaviour actionText; + + private UIText _notifyText; + + public UIText NotifyText { + get { + if (_notifyText == null) { + _notifyText = new UIText(notifyText); + } + return _notifyText; + } + } + + private UIText _actionText; + + public UIText ActionText { + get { + if (_actionText == null) { + _actionText = new UIText(actionText); + } + return _actionText; + } + } + + + public void SetNotify(string notify) { + NotifyText.text = notify; + } + public void SetAction(string action) { + ActionText.text = action; + } + + // Use this for initialization + void Start() { + var txt = transform.GetChild(0); + var c = txt.GetComponents(); + Debug.Log("Components count: " + c.Length); + Debug.Log("Component type: " + c[0].GetType().Name); + } + + // Update is called once per frame + void Update() { + + } +} diff --git a/Assets/Scripts/HudController.cs.meta b/Assets/Scripts/HudController.cs.meta new file mode 100644 index 0000000..99ef524 --- /dev/null +++ b/Assets/Scripts/HudController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 22a879d0d7cdc0f47b303a2d1e30bb31 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/HumanController.cs b/Assets/Scripts/HumanController.cs new file mode 100644 index 0000000..ec3bfc1 --- /dev/null +++ b/Assets/Scripts/HumanController.cs @@ -0,0 +1,185 @@ +using System.Linq; +using UnityEngine; +using System.Collections; + + +public class HumanController : MonoBehaviour { + protected Rigidbody2D _rb; + protected Animator anim; + public float maxWalkSpeed = 3.0f; + public float maxRunSpeed = 6.0f; + public float jumpAcceleration = 10; + public LayerMask groundMask; + public float groundCastRadius = 0.1f; + public bool grounded; + protected bool facingLeft; + protected bool crouch; + public bool Crouch { + get { return crouch; } + set { crouch = value; } + } + protected bool freeFall; + protected Health health; + public RandomSoundPlayer player; + protected bool deadStateEnter; + protected Inventory inventory; + public ItemSocket[] sockets; + protected bool gunArmed; + + private float armsStandOffset; + public float ArmsStandOffset { + get { return armsStandOffset; } + } + private float armsCrouchOffset; + public float ArmsCrouchOffset { + get { return armsCrouchOffset; } + } + public bool GunArmed { + get { return gunArmed; } + } + public GameObject eyes; + + protected virtual void Start() { + _rb = gameObject.GetComponent(); + anim = gameObject.GetComponent(); + health = GetComponent(); + inventory = GetComponent(); + + + + + armsStandOffset = 2.7641f; + armsCrouchOffset = 1.6311f; + + + + + } + + public void Awake() { + /* var arms = GetSocket(ItemSocketType.Hands).place; + var animator = GetComponent(); + var clips = animator.runtimeAnimatorController.animationClips; + + var crouchGun = clips.First(v => v.name == "PlayerCrouchGunIdle"); + var standGun = clips.First(v => v.name == "PlayerStandWeaponIdle"); + + standGun.SampleAnimation(gameObject, 0); + armsStandOffset = arms.transform.position.y - transform.position.y; + Debug.Log("armsStandOffset = " + armsStandOffset); + + crouchGun.SampleAnimation(gameObject, 0); + armsCrouchOffset = arms.transform.position.y - transform.position.y; + Debug.Log("armsCrouchOffset = " + armsCrouchOffset);*/ + + + } + + public void OnAnimationGunArmed(bool armed) { + + } + + public void OnDeadStateEnter() { + deadStateEnter = true; + + inventory.DeleteAllItems(); + } + + + public bool PrepareItem() { + var socket = GetSocket(ItemSocketType.Hands); + if (socket != null) { + var item = socket.AttachedItem; + if (item != null) { + item.gameObject.SetActive(true); + item.OnPrepareUse(); + gunArmed = true; + return true; + } + } + return false; + } + + public void UnprepareItem() { + var socket = GetSocket(ItemSocketType.Hands); + if (socket != null) { + var item = socket.AttachedItem; + if (item != null) { + item.gameObject.SetActive(false); + item.OnEndUse(); + gunArmed = false; + } + } + } + + void Flip() { + facingLeft = !facingLeft; + var s = transform.localScale; + s.x *= -1; + transform.localScale = s; + } + + public void UpdateMovement(float targetSpeed) { + float hspeed = _rb.velocity.x; + + float dV = targetSpeed - _rb.velocity.x; + float A = dV / Time.fixedDeltaTime;//Mathf.Clamp(dV / Time.fixedDeltaTime, 0, 50); + A = Mathf.Clamp(Mathf.Abs(A), 0, 50) * Mathf.Sign(A); + + float F = _rb.mass * A; + + float maxForce = 4500; + F = Mathf.Clamp(F, -maxForce, maxForce); + _rb.AddForce(Vector2.right * F); + } + + void OnFootstep() { + if (player != null) { + player.Play(); + } + } + + protected virtual void Update() { + if (_rb.velocity.x > 0.02f && facingLeft) { + Flip(); + } + if (_rb.velocity.x < -0.02f && !facingLeft) { + Flip(); + } + + + anim.SetBool("lockAnyState", deadStateEnter); + anim.SetBool("dead", health.Dead); + anim.SetBool("gunArmed", gunArmed); + anim.SetBool("FreeFall", freeFall); + anim.SetBool("Grounded", grounded); + anim.SetBool("Crouch", crouch); + anim.SetFloat("hSpeed", _rb.velocity.x); + anim.SetFloat("vSpeed", _rb.velocity.y); + anim.SetFloat("hSpeedAbs", Mathf.Abs(_rb.velocity.x)); + } + + public ItemSocket GetSocket(ItemSocketType t) { + return sockets.First(v => v.socketType == t); + } + + protected virtual void FixedUpdate() { + grounded = Physics2D.OverlapCircle(transform.position, groundCastRadius, groundMask) != null; + float freeFallDistance = 1.0f; + + if (grounded) { + freeFall = false; + } else { + if (!freeFall) { + var c = Physics2D.CircleCast(transform.position, groundCastRadius, -Vector2.up, freeFallDistance, groundMask); + + bool p = (((c.point - (Vector2)transform.position).magnitude - groundCastRadius) > freeFallDistance); + if (c.collider == null || p) { + if (Mathf.Abs(_rb.velocity.y) > 0.001f) { + freeFall = true; + } + } + } + } + } +} diff --git a/Assets/Scripts/HumanController.cs.meta b/Assets/Scripts/HumanController.cs.meta new file mode 100644 index 0000000..f83a3f8 --- /dev/null +++ b/Assets/Scripts/HumanController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cf636731d7e758340a6facbcd657960c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/InputDebug.cs b/Assets/Scripts/InputDebug.cs new file mode 100644 index 0000000..ebe390e --- /dev/null +++ b/Assets/Scripts/InputDebug.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +public class InputDebug : MonoBehaviour { + private List pressedKeys = new List(); + + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnGUI(){ + var values = Enum.GetValues(typeof(KeyCode)); + float h = 20; + int rowid = 0; + int columnId = 0; + float columnWidth = 120; + + int yOffset = 60; + int maxRowCount = (Camera.main.pixelHeight - yOffset) / (int)h; + + pressedKeys.Clear(); + + foreach(KeyCode key in values){ + if(Input.GetKey(key)){ + pressedKeys.Add(key); + } + + /*GUI.Label(new Rect( columnWidth * columnId ,yOffset + rowid * h, columnWidth, h),key.ToString()); + rowid++; + if(rowid == maxRowCount){ + rowid = 0; + columnId++; + }*/ + } + + string pressedString = ""; + foreach(var k in pressedKeys){ + pressedString += k.ToString() + " "; + } + + GUI.Label(new Rect( 10,10,400,30), string.Format("Keys pressed [{0}]: {1}", pressedKeys.Count, pressedString)); + + //Input.GetKey(KeyCode + } +} diff --git a/Assets/Scripts/InputDebug.cs.meta b/Assets/Scripts/InputDebug.cs.meta new file mode 100644 index 0000000..cbf2e92 --- /dev/null +++ b/Assets/Scripts/InputDebug.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 12964967882932844938719bb3d353b9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Inventory.cs b/Assets/Scripts/Inventory.cs new file mode 100644 index 0000000..de9ba4a --- /dev/null +++ b/Assets/Scripts/Inventory.cs @@ -0,0 +1,134 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +public class Inventory : MonoBehaviour { + + private List _items = new List(); + + public List Items { + get { + return _items; + } + } + + public PickableItem QueryItem(string itemName, string className, ItemSocketType? socket) { + var id = QueryItemIndex(itemName, className, socket); + if (id < 0) { + return null; + } + return _items[id]; + } + + public int QueryItemIndex(string itemName, string className, ItemSocketType? socket) { + if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(className) && !socket.HasValue) { + return -1; + } + + for(int i = 0; i < _items.Count; ++i) { + var item = _items[i]; + bool found = true; + + if (!string.IsNullOrEmpty(itemName) && item.description.Name != itemName) { + found = false; + } + + if (found && !string.IsNullOrEmpty(className) && item.description.TypeName != className) { + found = false; + } + + if (found && socket.HasValue && item.description.TargetSocket != socket.Value) { + found = false; + } + + if (found) { + return i; + } + } + return -1; + } + + public void AddItem(PickableItem item){ + if (item == null || _items.Contains(item)) { + return; + } + _items.Add(item); + item.transform.parent = transform; + item.gameObject.SetActive(false); + } + + public PickableItem QueryItem(int id) { + if (id < 0 || id >= _items.Count) { + return null; + } + return _items[id]; + } + + public bool UnequipItem(PickableItem item) { + if (item != null && item.equipped && _items.Contains(item)) { + var player = GetComponent(); + var socket = player.GetSocket(item.description.TargetSocket); + if (socket != null) { + socket.DetachItem(transform); + return true; + } + } + return false; + } + + public bool EquipItem(PickableItem item) { + if (item == null || !_items.Contains(item)) { + return false; + } + return EquipItemInternal(item); + } + + public bool EquipItem(int id) { + var item = QueryItem(id); + return EquipItemInternal(item); + } + + private bool EquipItemInternal(PickableItem item) { + if (item == null || !item.description.IsEquippable || item.equipped) { + return false; + } + + var player = GetComponent(); + var socket = player.GetSocket(item.description.TargetSocket); + if (socket != null) { + socket.DetachItem(transform); + socket.AttachItem(item); + return true; + } + return false; + } + + + public void DeleteAllItems() { + var deleteQueue = _items.ToArray(); + foreach (var pickableItem in deleteQueue) { + UnequipItem(pickableItem); + Destroy(pickableItem.gameObject); + } + } + + private AudioSource _audio; + + public AudioSource Audio{ + get{return _audio;} + } + // Use this for initialization + void Start () { + _audio = GetComponent(); + } + + // Update is called once per frame + void Update () { + + } + + void OnGUI(){ + + } +} diff --git a/Assets/Scripts/Inventory.cs.meta b/Assets/Scripts/Inventory.cs.meta new file mode 100644 index 0000000..c80400f --- /dev/null +++ b/Assets/Scripts/Inventory.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1ee88df49957d6c449b8caa0d179513d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/InventoryPack.cs b/Assets/Scripts/InventoryPack.cs new file mode 100644 index 0000000..1002b4e --- /dev/null +++ b/Assets/Scripts/InventoryPack.cs @@ -0,0 +1,34 @@ +using UnityEngine; +using System.Collections; + +[RequireComponent(typeof(Inventory))] +public class InventoryPack : MonoBehaviour { + + public GameObject[] items; + + // Use this for initialization + void Start () { + var inventory = GetComponent(); + + if (items != null && items.Length > 0) { + foreach (var item in items) { + var pickable = item.GetComponent(); + if (pickable != null) { + var clone = Instantiate(item); + var pi = clone.GetComponent(); + if (pi.sensor != null) { + pi.sensor.enabled = false; + pi.sensor.sensorEnabled = false; + } + inventory.AddItem(pi); + Debug.Log("InventoryPack add item: " + clone.name); + } + } + } + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/InventoryPack.cs.meta b/Assets/Scripts/InventoryPack.cs.meta new file mode 100644 index 0000000..ef7e0d6 --- /dev/null +++ b/Assets/Scripts/InventoryPack.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d3562f9320760bd44b7156f7434ca361 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Items.meta b/Assets/Scripts/Items.meta new file mode 100644 index 0000000..ad64c78 --- /dev/null +++ b/Assets/Scripts/Items.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 67267daa7f5b48f4c8db3dc982c48f4e +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Items/Pistol.cs b/Assets/Scripts/Items/Pistol.cs new file mode 100644 index 0000000..0506d5d --- /dev/null +++ b/Assets/Scripts/Items/Pistol.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using System.Collections; + +public class Pistol : PickableItem { + public AudioSource audioOutput; + public RandomSoundPlayer shootSound; + public AudioClip reloadSound; + public Transform shootTransform; + public Animator flash; + private bool flashVisible; + public float shotMaxDistance = 150; + public float singleShotPeriod = 0.5f; + private float _lastShotTime; + public LayerMask shootMask; + public float hitForce = 1000; + public float hitPoints = 15; + + public override void OnBeginUse() { + base.OnBeginUse(); + + if (Time.time - _lastShotTime >= singleShotPeriod) { + Shoot(); + _lastShotTime = Time.time; + } + + } + + // Use this for initialization + protected override void Start () { + base.Start(); + // flash.SetActive(false); + } + + // Update is called once per frame + void Update () { + + } + + public void Shoot() { + if (shootSound != null) { + shootSound.Play(true); + } + if (flash != null) { + flash.SetTrigger("Shot"); + } + Vector3 right = transform.localToWorldMatrix.MultiplyVector(Vector3.right).normalized; + + var hit = Physics2D.Raycast(shootTransform.position, right, shotMaxDistance, shootMask); + if (hit != null) { + //apply force + if (hit.rigidbody != null) { + Debug.Log("Add shoot force to object " + hit.transform.name); + hit.rigidbody.AddForceAtPosition(right * hitForce, hit.point); + } + + //apply hit points + if (hit.transform != null) { + var health = hit.transform.gameObject.GetComponent(); + if (health != null) { + health.ApplyDamage(hitPoints); + } + } + + } + flashVisible = true; + } + + + + void OnDrawGizmos() { + // if (equipped) { + if (shootTransform != null) { + Vector3 right = transform.localToWorldMatrix.MultiplyVector(Vector3.right).normalized; + Gizmos.DrawLine(shootTransform.position, shootTransform.position + right * shotMaxDistance); + } + + // } + } +} diff --git a/Assets/Scripts/Items/Pistol.cs.meta b/Assets/Scripts/Items/Pistol.cs.meta new file mode 100644 index 0000000..a94668c --- /dev/null +++ b/Assets/Scripts/Items/Pistol.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8315e5075683f248ab0290722f21f6c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/LampController.cs b/Assets/Scripts/LampController.cs new file mode 100644 index 0000000..0143ec3 --- /dev/null +++ b/Assets/Scripts/LampController.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; + +public class LampController : MonoBehaviour { + private Led _lamp; + public Predicate[] enablePredicates; + private bool _enabled; + + public bool Enabled { + get { + return _enabled; + } + set { + _enabled = value; + } + } + + + // Use this for initialization + void Start () { + _lamp = GetComponentInChildren(); + } + + // Update is called once per frame + void Update () { + _enabled = true; + foreach(var p in enablePredicates){ + if(p != null && !p.Check()){ + _enabled = false; + break; + } + } + _lamp.GetComponent().enabled = _enabled; + } +} diff --git a/Assets/Scripts/LampController.cs.meta b/Assets/Scripts/LampController.cs.meta new file mode 100644 index 0000000..812b39b --- /dev/null +++ b/Assets/Scripts/LampController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c3514b23898ab1549846028df013fae9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Laser.meta b/Assets/Scripts/Laser.meta new file mode 100644 index 0000000..faea6a3 --- /dev/null +++ b/Assets/Scripts/Laser.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: a83f756ab4c6cb243ac5eec51e55aac8 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Laser/LaserController.cs b/Assets/Scripts/Laser/LaserController.cs new file mode 100644 index 0000000..9c3e580 --- /dev/null +++ b/Assets/Scripts/Laser/LaserController.cs @@ -0,0 +1,38 @@ +using UnityEngine; +using System.Collections; + +public class LaserController : MonoBehaviour { + public Led laserBeam; + public Predicate[] enablePredicates; + public PlayerSensor sensor; + public RandomSoundPlayer hitPlayer; + private bool _enabled; + + // Use this for initialization + void Start () { + if (sensor != null) { + sensor.PlayerEnter += sensor_PlayerEnter; + } + } + + void sensor_PlayerEnter(PlayerSensor senso, GameObject player) { + senso.Player.GetComponent().velocity = Vector3.zero; + senso.Player.GetComponent().ApplyDamage(100, gameObject, transform.position); + if (hitPlayer != null) { + hitPlayer.Play(); + } + } + + // Update is called once per frame + void Update () { + _enabled = true; + foreach (var p in enablePredicates) { + if (p != null && !p.Check()) { + _enabled = false; + break; + } + } + + laserBeam.gameObject.SetActive(_enabled); + } +} diff --git a/Assets/Scripts/Laser/LaserController.cs.meta b/Assets/Scripts/Laser/LaserController.cs.meta new file mode 100644 index 0000000..a68e064 --- /dev/null +++ b/Assets/Scripts/Laser/LaserController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea5da88a0c54b8145a3c6504a0613822 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Led.cs b/Assets/Scripts/Led.cs new file mode 100644 index 0000000..58302ac --- /dev/null +++ b/Assets/Scripts/Led.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using System.Collections; + +public class Led : MonoBehaviour { + + public float intensity = 1.0f; + public Color offColor = new Color(0,0,0,0); + public Color color; + private SpriteRenderer _renderer; + + + + // Use this for initialization + void Start () { + _renderer = gameObject.GetComponent(); + } + + // Update is called once per frame + void Update () { + _renderer.material.color = Color.Lerp(offColor, color, intensity); + } +} diff --git a/Assets/Scripts/Led.cs.meta b/Assets/Scripts/Led.cs.meta new file mode 100644 index 0000000..581e7bf --- /dev/null +++ b/Assets/Scripts/Led.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a6d1be3d641043541b54d4766ff83fb6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/LedIntensityController.cs b/Assets/Scripts/LedIntensityController.cs new file mode 100644 index 0000000..7c4bd75 --- /dev/null +++ b/Assets/Scripts/LedIntensityController.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using System.Collections; + +public class LedIntensityController : MonoBehaviour { + public Led led; + public WaveController wave; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + if(wave != null){ + led.intensity = wave.Get(); + } + + } +} diff --git a/Assets/Scripts/LedIntensityController.cs.meta b/Assets/Scripts/LedIntensityController.cs.meta new file mode 100644 index 0000000..000b62b --- /dev/null +++ b/Assets/Scripts/LedIntensityController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 68d9a75d360ddd540b7fa98431ce5d83 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/LockPredicate.cs b/Assets/Scripts/LockPredicate.cs new file mode 100644 index 0000000..8784ca7 --- /dev/null +++ b/Assets/Scripts/LockPredicate.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using System.Collections; + +public class LockPredicate : Predicate { + #region implemented abstract members of Predicate + + protected override bool CheckInternal () + { + return keyLock == null ? false : keyLock.locked; + } + + protected override bool CheckInternal (object param) + { + return CheckInternal(); + } + + #endregion + + public LockSwitch keyLock; + + + void Start () { + + } + + + void Update () { + + } +} diff --git a/Assets/Scripts/LockPredicate.cs.meta b/Assets/Scripts/LockPredicate.cs.meta new file mode 100644 index 0000000..936d88e --- /dev/null +++ b/Assets/Scripts/LockPredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1a62253973c4ab24792935ae6c949f4b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/LockSwitch.cs b/Assets/Scripts/LockSwitch.cs new file mode 100644 index 0000000..783ad55 --- /dev/null +++ b/Assets/Scripts/LockSwitch.cs @@ -0,0 +1,66 @@ +using UnityEngine; +using System.Collections; + +public class LockSwitch : Predicate { + public string keyName = ""; + public string keyClass = "Key"; + public string unlockText = "unlock"; + public PlayerSensor sensor; + public bool locked = true; + private GameAction _action; + private Notification _notify; + + protected override bool CheckInternal () + { + return !locked; + } + protected override bool CheckInternal (object param) + { + return Check (); + } + + + // Use this for initialization + void Start () { + sensor.PlayerEnter += HandlePlayerEnter; + sensor.PlayerExit += HandlePlayerExit; + _action = new GameAction(gameObject, "use " + keyName); + _notify = new Notification(){source = gameObject}; + + _notify.text = NotificationsController.AppendString(_notify.text, "Use ", NotificationElement.Text); + _notify.text = NotificationsController.AppendString(_notify.text, keyName, NotificationElement.Item); + _notify.text = NotificationsController.AppendString(_notify.text, " to ", NotificationElement.Text); + _notify.text = NotificationsController.AppendString(_notify.text, unlockText, NotificationElement.ImportantText); + } + + void HandlePlayerEnter (PlayerSensor s, GameObject player) + { + if(locked){ + var inventory = player.GetComponent(); + if((inventory != null) && (inventory.QueryItem(keyName, keyClass, null) != null)){ + ActionController.AddAction(_action); + }else{ + NotificationsController.AddNotification(_notify); + } + } + } + + void OnAction(ActionArgs a){ + if(locked){ + locked = false; + ActionController.RemoveAction(_action); + NotificationsController.RemoveNotification(_notify); + } + } + + void HandlePlayerExit (PlayerSensor s, GameObject player) + { + ActionController.RemoveAction(_action); + NotificationsController.RemoveNotification(_notify); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/LockSwitch.cs.meta b/Assets/Scripts/LockSwitch.cs.meta new file mode 100644 index 0000000..28bd5cf --- /dev/null +++ b/Assets/Scripts/LockSwitch.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0673639965f805144a211cd12f37a43d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu.meta b/Assets/Scripts/Menu.meta new file mode 100644 index 0000000..da753a8 --- /dev/null +++ b/Assets/Scripts/Menu.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 774c9b1e0acac2d4394216d6008ffe3e +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/Background2.controller b/Assets/Scripts/Menu/Background2.controller new file mode 100644 index 0000000..6f9b72f Binary files /dev/null and b/Assets/Scripts/Menu/Background2.controller differ diff --git a/Assets/Scripts/Menu/Background2.controller.meta b/Assets/Scripts/Menu/Background2.controller.meta new file mode 100644 index 0000000..6bc783f --- /dev/null +++ b/Assets/Scripts/Menu/Background2.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2cd557e46f7c780438294cdbcf4f4df6 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/GameOverUIController.cs b/Assets/Scripts/Menu/GameOverUIController.cs new file mode 100644 index 0000000..b9bd49e --- /dev/null +++ b/Assets/Scripts/Menu/GameOverUIController.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class GameOverUIController : UiController { + + public void OnContinueClick(){ + + } + + public void OnMainMenuClick(){ + Application.LoadLevel(0); + } + + public void OnExitClick(){ + Escape.Quit(); + } +} diff --git a/Assets/Scripts/Menu/GameOverUIController.cs.meta b/Assets/Scripts/Menu/GameOverUIController.cs.meta new file mode 100644 index 0000000..ee19ad2 --- /dev/null +++ b/Assets/Scripts/Menu/GameOverUIController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3e59db71214b1aa429a0fba1f26234c9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/InventoryUIController.cs b/Assets/Scripts/Menu/InventoryUIController.cs new file mode 100644 index 0000000..14d2a2e --- /dev/null +++ b/Assets/Scripts/Menu/InventoryUIController.cs @@ -0,0 +1,115 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.EventSystems; +using UnityEngine.UI; + + + + +public class InventoryUIController : UiController { + + public Inventory inventory; + public ItemsView itemsView; + public UnityEngine.UI.Image selectionImage; + public UnityEngine.UI.Text selectionText; + public UnityEngine.UI.Button removeButton; + public UnityEngine.UI.Button equipButton; + private ItemViewController _selectedItem; + + public void Rebuild() { + itemsView.Items = inventory.Items; + ResetFocus(); + + } + + public void ResetFocus() { + var es = EventSystemManager.currentSystem; + if (itemsView.Views.Count > 0) { + es.SetSelectedGameObject(itemsView.Views[0].itemButton.gameObject, new BaseEventData(es)); + } + + } + + // Use this for initialization + void Start () { + if (itemsView == null) { + Debug.LogWarning("Items view not set up! Inventory UI would not function properly!"); + } + else { + itemsView.SelectionChanged += itemsView_SelectionChanged; + } + + if (equipButton != null) { + equipButton.onClick.AddListener(OnEquipClick); + } + else { + Debug.LogWarning("Equip button not assigned!"); + } + + + } + + void OnEquipClick(UnityEngine.UI.Button button) { + EquippedChange(); + } + + void EquippedChange() { + var item = itemsView.Selection.item; + if (item != null && item.description.IsEquippable) { + if (item.equipped) { + inventory.UnequipItem(item); + } else { + inventory.EquipItem(item); + } + } + } + + void itemsView_SelectionChanged(ItemsView container) { + if (_selectedItem == container.Selection) { + EquippedChange(); + } + else { + _selectedItem = container.Selection; + selectionImage.sprite = container.Selection.item.inventoryIcon; + selectionText.text = container.Selection.item.description.Description; + } + + + UpdateButtons(); + } + + private void UpdateButtons() { + if (itemsView == null || itemsView.Selection == null || itemsView.Selection.item == null) { + if (equipButton != null) { + equipButton.gameObject.SetActive(false); + } + if (removeButton != null) { + removeButton.gameObject.SetActive(false); + } + } + else { + var item = itemsView.Selection.item; + + //update equip button + if (!item.description.IsEquippable) { + equipButton.gameObject.SetActive(false); + } + else { + equipButton.gameObject.SetActive(true); + if (item.equipped) { + equipButton.GetComponentInChildren().text = "Unequip"; + } + else { + equipButton.GetComponentInChildren().text = "Equip"; + } + } + + } + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/Menu/InventoryUIController.cs.meta b/Assets/Scripts/Menu/InventoryUIController.cs.meta new file mode 100644 index 0000000..1a6d130 --- /dev/null +++ b/Assets/Scripts/Menu/InventoryUIController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0015e48a4cfa91f4a8b0dabbdaac9ed0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/ItemViewController.cs b/Assets/Scripts/Menu/ItemViewController.cs new file mode 100644 index 0000000..fda1d04 --- /dev/null +++ b/Assets/Scripts/Menu/ItemViewController.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using System.Collections; + +public class ItemViewController : MonoBehaviour { + public UnityEngine.UI.Image itemImageView; + public UnityEngine.UI.Text itemEquippedText; + public UnityEngine.UI.Text itemCountText; + public UnityEngine.UI.Button itemButton; + public PickableItem item; + + // Use this for initialization + void Start () { + itemCountText.text = ""; + itemEquippedText.text = ""; + } + + // Update is called once per frame + void Update () { + if (item != null) { + //itemCountText.text = item.description.IsEquippable && item.equipped ? "E" : ""; + itemEquippedText.text = item.description.IsEquippable && item.equipped ? "E" : ""; + + if (itemImageView != null) { + itemImageView.sprite = item.inventoryIcon; + } + } + + + } +} diff --git a/Assets/Scripts/Menu/ItemViewController.cs.meta b/Assets/Scripts/Menu/ItemViewController.cs.meta new file mode 100644 index 0000000..4289dc5 --- /dev/null +++ b/Assets/Scripts/Menu/ItemViewController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 717748885f3d1874cae663d6806e83b4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/ItemsView.cs b/Assets/Scripts/Menu/ItemsView.cs new file mode 100644 index 0000000..82b06d6 --- /dev/null +++ b/Assets/Scripts/Menu/ItemsView.cs @@ -0,0 +1,110 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +public static class RectTransformTools { + public static Vector2 Size(this RectTransform tf) { + Vector3[] c = new Vector3[4]; + tf.GetLocalCorners(c); + return new Vector2(c[2].x - c[0].x, c[1].y - c[0].y); + } +} + +public class ItemViewReference : MonoBehaviour { + public ItemViewController itemView; +} + + +public delegate void ItemsViewDelegate(ItemsView container); + +public class ItemsView : MonoBehaviour { + public RectTransform container; + private IEnumerable _items; + public GameObject itemViewPrototype; + private List _views = new List(); + public List Views { + get { return _views; } + } + public float itemsMargin = 5.0f; + public event ItemsViewDelegate SelectionChanged; + private ItemViewController _selection; + public ItemViewController Selection { + get { return _selection; } + } + + protected virtual void OnSelectionChanged() { + ItemsViewDelegate handler = SelectionChanged; + if (handler != null) { + handler(this); + } + } + + public IEnumerable Items { + get { return _items; } + set { + _items = value; + RebuildUI(); + } + } + + private void Start() { + + var t = itemViewPrototype.GetComponent(); + + var tfSize = t.anchoredPosition; + + } + + void OnClick(UnityEngine.UI.Button b) { + var view = b.gameObject.GetComponent().itemView; + _selection = view; + OnSelectionChanged(); + } + + + public void RebuildUI() { + //remove old items view + foreach (var view in _views) { + Destroy(view.gameObject); + } + _views.Clear(); + + //create new views + if (itemViewPrototype != null) { + foreach (var item in _items) { + var view = Instantiate(itemViewPrototype).GetComponent(); + view.item = item; + _views.Add(view); + view.GetComponent().parent = container; + var reference = view.itemButton.gameObject.AddComponent(); + reference.itemView = view; + view.itemButton.onClick.AddListener(OnClick); + } + } + else { + Debug.LogWarning("Can't create items view! Prototype not assigned!"); + } + + ArrangeItems(); + + } + + + public void ArrangeItems() { + var areaSize = container.Size(); + var itemSize = itemViewPrototype.GetComponent().Size(); + + int hCount = (int)((areaSize.x - itemsMargin) / (itemSize.x + itemsMargin)); + + for (int i = 0; i < _views.Count; ++i) { + var view = _views[i]; + var tf = view.GetComponent(); + int row = i/hCount; + int column = i%hCount; + tf.anchoredPosition = new Vector2(column * (itemSize.x + itemsMargin) + itemsMargin + itemSize.x * 0.5f, -(row * (itemSize.y + itemsMargin) + itemsMargin + itemSize.y * 0.5f)); + + } + } + +} diff --git a/Assets/Scripts/Menu/ItemsView.cs.meta b/Assets/Scripts/Menu/ItemsView.cs.meta new file mode 100644 index 0000000..4a15446 --- /dev/null +++ b/Assets/Scripts/Menu/ItemsView.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 290656d8e5aa63d4fb058ab6a110af3a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/MainMenuController.cs b/Assets/Scripts/Menu/MainMenuController.cs new file mode 100644 index 0000000..b935f09 --- /dev/null +++ b/Assets/Scripts/Menu/MainMenuController.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using System.Collections; + +public class MainMenuController : MonoBehaviour { + public AudioClip newGameSound; + private AudioSource _source; + public GameObject fadeImage; + + public void OnButtonExit(){ + Application.Quit(); + } + + public void OnButtonNewGame(){ + Invoke("NewGameLoad", 5); + if(_source != null & newGameSound != null){ + _source.PlayOneShot(newGameSound); + } + + //fadeImage.GetComponent().SetTrigger("Fade"); + } + catch { + + } + + + + } + + private void NewGameLoad(){ + Debug.Log("Load level"); + Application.LoadLevel("Level0"); + } + + // Use this for initialization + void Start () { + Time.timeScale = 1; + _source = GetComponent(); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/Menu/MainMenuController.cs.meta b/Assets/Scripts/Menu/MainMenuController.cs.meta new file mode 100644 index 0000000..a42c6ff --- /dev/null +++ b/Assets/Scripts/Menu/MainMenuController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 511befb185f4cef429c7c08edfe10b4d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/MainMenuFadeOut.anim b/Assets/Scripts/Menu/MainMenuFadeOut.anim new file mode 100644 index 0000000..a9a26a1 Binary files /dev/null and b/Assets/Scripts/Menu/MainMenuFadeOut.anim differ diff --git a/Assets/Scripts/Menu/MainMenuFadeOut.anim.meta b/Assets/Scripts/Menu/MainMenuFadeOut.anim.meta new file mode 100644 index 0000000..f9204a7 --- /dev/null +++ b/Assets/Scripts/Menu/MainMenuFadeOut.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d62c226b11260e14a81fda9615c6924d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/Menu/MainMenuNotFaded.anim b/Assets/Scripts/Menu/MainMenuNotFaded.anim new file mode 100644 index 0000000..a28064d Binary files /dev/null and b/Assets/Scripts/Menu/MainMenuNotFaded.anim differ diff --git a/Assets/Scripts/Menu/MainMenuNotFaded.anim.meta b/Assets/Scripts/Menu/MainMenuNotFaded.anim.meta new file mode 100644 index 0000000..fa6ba1a --- /dev/null +++ b/Assets/Scripts/Menu/MainMenuNotFaded.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b0fcff03f5d7e3442a72590d0a2668ef +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/NotificationsController.cs b/Assets/Scripts/NotificationsController.cs new file mode 100644 index 0000000..0f8b8df --- /dev/null +++ b/Assets/Scripts/NotificationsController.cs @@ -0,0 +1,58 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class Notification{ + public GameObject source; + public string text; +} + +public enum NotificationElement{ + Text, + Item, + ImportantText +} + +public class NotificationsController : MonoBehaviour { + public HudController hud; + private static string itemColor = "00ff00ff"; + + private static List _notifications = new List(); + + public static void AddNotification(Notification n){ + _notifications.Add(n); + } + + public static string AppendString(string src, string txt, NotificationElement elementType){ + var result = src; + if(elementType == NotificationElement.Item){ + result += "" + txt + ""; + }else if(elementType == NotificationElement.ImportantText){ + result += "" + txt + ""; + }else{ + result += txt; + } + return result; + } + + public static void RemoveNotification(Notification n){ + _notifications.Remove(n); + } + // Use this for initialization + void Start () { + + } + + void OnGUI(){ + + } + + // Update is called once per frame + void Update () { + if(_notifications != null && _notifications.Count > 0){ + hud.SetNotify(_notifications[0].text); + }else{ + hud.SetNotify(""); + } + } +} diff --git a/Assets/Scripts/NotificationsController.cs.meta b/Assets/Scripts/NotificationsController.cs.meta new file mode 100644 index 0000000..866cee7 --- /dev/null +++ b/Assets/Scripts/NotificationsController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3ea75647829feb944b52b4752e1f6294 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PauseUiController.cs b/Assets/Scripts/PauseUiController.cs new file mode 100644 index 0000000..03ef801 --- /dev/null +++ b/Assets/Scripts/PauseUiController.cs @@ -0,0 +1,18 @@ +using UnityEngine; +using System.Collections; + +public class PauseUiController : UiController { + + public void OnContinue() { + var game = FindObjectOfType(); + game.ShowPreviousUi(); + } + + public void OnMainMenu() { + Application.LoadLevel(0); + } + + public void OnExit() { + Application.Quit(); + } +} diff --git a/Assets/Scripts/PauseUiController.cs.meta b/Assets/Scripts/PauseUiController.cs.meta new file mode 100644 index 0000000..a0d87ed --- /dev/null +++ b/Assets/Scripts/PauseUiController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 72b8219ae72bcd54a97824646b535450 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Physics2DEx.cs b/Assets/Scripts/Physics2DEx.cs new file mode 100644 index 0000000..164e25a --- /dev/null +++ b/Assets/Scripts/Physics2DEx.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using System.Collections; + +public static class Physics2DExtensions { + public static Vector2 GetWorldPointVelocityEx(this Rigidbody2D body, Vector2 worldPoint) { + var physics = body.GetComponent(); + if (physics != null) { + return physics.GetWorldPointVelocity(worldPoint); + } + return body.GetPointVelocity(worldPoint); + } +} + +[RequireComponent(typeof(Rigidbody2D))] +public class Physics2DEx : MonoBehaviour { + private Vector2 _velocity; + private float _angularVelocity; + public float AngularVelocity { + get { return _angularVelocity; } + } + private Rigidbody2D _rigidBody; + + // Use this for initialization + void Start () { + _rigidBody = GetComponent(); + } + + void FixedUpdate() { + _velocity = _rigidBody.velocity; + _angularVelocity = _rigidBody.angularVelocity; + } + + public Vector2 GetWorldPointVelocity(Vector2 worldPoint) { + if (_rigidBody == null) { + _rigidBody = GetComponent(); + if (_rigidBody == null) { + Debug.LogErrorFormat(gameObject, "Physics2DEx requires component RigidBody2D! {0}", name); + return Vector2.zero; + } + } + + var radiusVector = worldPoint - _rigidBody.worldCenterOfMass; + return (Vector3)_velocity + Vector3.Cross(Vector3.forward * (_angularVelocity * Mathf.Deg2Rad), (Vector3)radiusVector); + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/Physics2DEx.cs.meta b/Assets/Scripts/Physics2DEx.cs.meta new file mode 100644 index 0000000..b304321 --- /dev/null +++ b/Assets/Scripts/Physics2DEx.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2539a3713707c6e4cbdf2034f38ca176 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PhysicsDebug.cs b/Assets/Scripts/PhysicsDebug.cs new file mode 100644 index 0000000..0a5e80d --- /dev/null +++ b/Assets/Scripts/PhysicsDebug.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class PhysicsDebug : MonoBehaviour { + public WorldSpaceLabel velocityOutput; + + + void FixedUpdate() { + var rb = GetComponent(); + if (rb != null) { + velocityOutput.text = "Velocity: " + rb.velocity; + } + + } +} diff --git a/Assets/Scripts/PhysicsDebug.cs.meta b/Assets/Scripts/PhysicsDebug.cs.meta new file mode 100644 index 0000000..bff0297 --- /dev/null +++ b/Assets/Scripts/PhysicsDebug.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d78611b167dfba348a2b380b63aa077d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PickableItem.cs b/Assets/Scripts/PickableItem.cs new file mode 100644 index 0000000..fc51033 --- /dev/null +++ b/Assets/Scripts/PickableItem.cs @@ -0,0 +1,102 @@ +using UnityEngine; +using System.Collections; +using System; + +public enum ItemSocketType{ + Default, + Pocket, + Hands +} + +[Serializable] +public class ItemDescription{ + public bool IsEquippable; + public string Name; + public string Description; + public string TypeName; + public ItemSocketType TargetSocket; +} + +public class PickableItem : MonoBehaviour { + public ItemDescription description; + public PlayerSensor sensor; + private GameAction _action; + public AudioClip pickupSound; + public int uid; + public bool equipped; + public Sprite inventoryIcon; + + protected virtual void Start(){ + if (sensor != null) { + sensor.PlayerEnter += HandlePlayerEnter; + sensor.PlayerExit += HandlePlayerExit; + } + else { + Debug.Log("Player sensor is null"); + } + + _action = new GameAction(gameObject, "pick " + description.Name); + } + + void HandlePlayerEnter (PlayerSensor s, GameObject player) + { + ActionController.AddAction(_action); + } + + void HandlePlayerExit (PlayerSensor s, GameObject player) + { + ActionController.RemoveAction(_action); + } + + public virtual void OnPrepareUse() { + + } + + + + public virtual void OnBeginUse() { + + + } + + public virtual void OnEndUse() { + + } + + + + public virtual void OnEquipped(){ + + } + + public virtual void OnUnequipped(){ + + } + + void OnAction(ActionArgs args){ + + if(args != null && args.Caller != null){ + var inventory = args.Caller.GetComponent(); + if(inventory != null){ + Debug.Log("Inventory add item: " + name); + inventory.AddItem(this); + if(pickupSound != null){ + AudioSource.PlayClipAtPoint(pickupSound, transform.position); + } + + ActionController.RemoveAction(_action); + sensor.enabled = false; + sensor.sensorEnabled = false; + gameObject.SetActive(false); + //Destroy(gameObject); + } + }else{ + Debug.LogWarning("PickableItem: unknown caller"); + } + /*var audio = Inventory.Audio; + if(audio != null && pickupSound != null){ + audio.PlayOneShot(pickupSound); + }*/ + + } +} diff --git a/Assets/Scripts/PickableItem.cs.meta b/Assets/Scripts/PickableItem.cs.meta new file mode 100644 index 0000000..3e18762 --- /dev/null +++ b/Assets/Scripts/PickableItem.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5a42298a5d4cbab4c9be0cd9f289d996 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PixelPerfectCamera.cs b/Assets/Scripts/PixelPerfectCamera.cs new file mode 100644 index 0000000..2832ae5 --- /dev/null +++ b/Assets/Scripts/PixelPerfectCamera.cs @@ -0,0 +1,40 @@ +using UnityEngine; +using System.Collections; + +[ExecuteInEditMode] +public class PixelPerfectCamera : MonoBehaviour { + private Camera _cam; + public int pixelsToUnits = 1; + public int zoom = 1; + + // Use this for initialization + void Start () { + + FindCamera(); + FitCameraSize(); + } + + + + // Update is called once per frame + void Update () { + FitCameraSize(); + } + + void FitCameraSize(){ + if(_cam != null){ + float camSize = ((float)(_cam.pixelHeight) / 2.0f ) / pixelsToUnits; + _cam.orthographicSize = camSize / zoom; + } + } + + void FindCamera(){ + _cam = gameObject.GetComponent(); + } + + void OnValidate(){ + FindCamera(); + FitCameraSize(); + } + +} diff --git a/Assets/Scripts/PixelPerfectCamera.cs.meta b/Assets/Scripts/PixelPerfectCamera.cs.meta new file mode 100644 index 0000000..b57327f --- /dev/null +++ b/Assets/Scripts/PixelPerfectCamera.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 243ef0ea167d21b449b8163d622739e2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PlayerController.controller b/Assets/Scripts/PlayerController.controller new file mode 100644 index 0000000..550f17b Binary files /dev/null and b/Assets/Scripts/PlayerController.controller differ diff --git a/Assets/Scripts/PlayerController.controller.meta b/Assets/Scripts/PlayerController.controller.meta new file mode 100644 index 0000000..6fdbc36 --- /dev/null +++ b/Assets/Scripts/PlayerController.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6d648afda9e237043b23e3e04a0af10e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs new file mode 100644 index 0000000..ae2cc15 --- /dev/null +++ b/Assets/Scripts/PlayerController.cs @@ -0,0 +1,156 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using System.Collections; +using System; + +[Serializable] +public class ItemSocket{ + public GameObject place; + public ItemSocketType socketType; + private PickableItem _attachedItem; + public PickableItem AttachedItem { + get { return _attachedItem; } + } + public void AttachItem(PickableItem item) { + if (item == null || place == null) { + return; + } + item.transform.parent = place.transform; + item.transform.localPosition = Vector3.zero; + item.transform.localRotation = Quaternion.identity; + item.transform.localScale = Vector3.one; + item.equipped = true; + item.OnEquipped(); + _attachedItem = item; + } + + /* public PickableItem[] GetAttachedItems() { + if (place.transform.childCount == 0) { + return null; + } + var result = new List(); + for (int i = 0; i < place.transform.childCount; ++i) { + var child = place.transform.GetChild(i).GetComponent(); + if (child != null) { + result.Add(child); + } + } + return result.ToArray(); + }*/ + + public PickableItem DetachItem(Transform newParent = null) { + var item = _attachedItem; + if (item != null) { + item.transform.parent = newParent; + item.gameObject.SetActive(false); + item.equipped = false; + item.OnUnequipped(); + } + _attachedItem = null; + return item; + } +} + +[RequireComponent(typeof(Health))] +[RequireComponent(typeof(Inventory))] +public class PlayerController : HumanController { + private GameController _game; + + protected override void Start () { + base.Start(); + _game = FindObjectOfType(); + } + + + + // Update is called once per frame + protected override void Update () { + base.Update(); + + if (_game.State == GameState.Gameplay) { + if (Input.GetKeyDown(KeyCode.Alpha1)) { + inventory.EquipItem(inventory.QueryItemIndex("Pistol", null, null)); + } + + if (Input.GetKeyDown(KeyCode.K)) { + PrepareItem(); + } + + if (Input.GetKeyUp(KeyCode.K)) { + UnprepareItem(); + } + + if (gunArmed) { + if (Input.GetKeyDown(KeyCode.J)) { + var socket = GetSocket(ItemSocketType.Hands); + if (socket != null) { + var item = socket.AttachedItem; + if (item != null) { + item.OnBeginUse(); + } + } + } + + if (Input.GetKeyUp(KeyCode.J)) { + var socket = GetSocket(ItemSocketType.Hands); + if (socket != null) { + var item = socket.AttachedItem; + if (item != null) { + item.OnEndUse(); + } + } + } + + } + + if (grounded && Input.GetKey(KeyCode.LeftControl)) { + crouch = true; + var v = _rb.velocity; + v.x = 0; + _rb.velocity = v; + } else { + crouch = false; + } + + if (!health.Dead) { + if (Input.GetKeyDown(KeyCode.Space)) { + if (grounded) { + _rb.AddForce(Vector2.up * jumpAcceleration * _rb.mass); + anim.SetTrigger("Jump"); + } else { + } + + } + } + } + + } + + protected override void FixedUpdate(){ + base.FixedUpdate(); + + if(!health.Dead && _game.State == GameState.Gameplay){ + float maxSpeed = maxWalkSpeed; + + + if(Input.GetKey(KeyCode.LeftShift)){ + maxSpeed = maxRunSpeed; + } + + + + if(!crouch && grounded){ + if(Input.GetKey(KeyCode.D)){ + UpdateMovement(maxSpeed); + } + + if(Input.GetKey(KeyCode.A)){ + UpdateMovement(-maxSpeed); + } + } + } + + + } +} diff --git a/Assets/Scripts/PlayerController.cs.meta b/Assets/Scripts/PlayerController.cs.meta new file mode 100644 index 0000000..0f06138 --- /dev/null +++ b/Assets/Scripts/PlayerController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bf0aad561ab464041a9244523bd4672b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PlayerDeadStateEnter.cs b/Assets/Scripts/PlayerDeadStateEnter.cs new file mode 100644 index 0000000..61e28fb --- /dev/null +++ b/Assets/Scripts/PlayerDeadStateEnter.cs @@ -0,0 +1,13 @@ +using UnityEngine; +using System.Collections; + +public class PlayerDeadStateEnter : StateMachineBehaviour { + + public override void OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + var player = animator.gameObject.GetComponent(); + if(player != null){ + player.OnDeadStateEnter(); + } + } +} diff --git a/Assets/Scripts/PlayerDeadStateEnter.cs.meta b/Assets/Scripts/PlayerDeadStateEnter.cs.meta new file mode 100644 index 0000000..c7548e2 --- /dev/null +++ b/Assets/Scripts/PlayerDeadStateEnter.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e6b5fa7106d4dfa499b0770389fbdff3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/PlayerSensor.cs b/Assets/Scripts/PlayerSensor.cs new file mode 100644 index 0000000..122010d --- /dev/null +++ b/Assets/Scripts/PlayerSensor.cs @@ -0,0 +1,88 @@ +using UnityEngine; +using System.Collections; + +public delegate void PlayerSensorDelegate(PlayerSensor senso, GameObject player); + +public class PlayerSensor : Predicate { + #region implemented abstract members of Predicate + + protected override bool CheckInternal () + { + return isPlayerInside; + } + + protected override bool CheckInternal (object param) + { + return Check(); + } + + #endregion + + public bool sensorEnabled = true; + private bool isPlayerInside; + public event PlayerSensorDelegate PlayerEnter; + private PlayerController _player; + public PlayerController Player { + get { return _player; } + } + protected virtual void OnPlayerEnter (GameObject player) + { + var handler = PlayerEnter; + if (handler != null) + handler (this, player); + } + + public event PlayerSensorDelegate PlayerExit; + + protected virtual void OnPlayerExit (GameObject player) + { + var handler = PlayerExit; + if (handler != null) + handler (this, player); + } + + + + void OnTriggerEnter2D(Collider2D other) { + if (!sensorEnabled) { + return; + } + + if(isPlayerInside){ + return; + } + + + + _player = other.gameObject.GetComponent(); + + + + if (_player != null) { + + isPlayerInside = true; + + OnPlayerEnter(_player.gameObject); + } + } + + void OnTriggerExit2D(Collider2D other) { + if (!sensorEnabled) { + return; + } + if(!isPlayerInside){ + return; + } + + + var p = other.gameObject.GetComponent(); + + + if (_player == p) { + + isPlayerInside = false; + OnPlayerExit(_player.gameObject); + _player = null; + } + } +} diff --git a/Assets/Scripts/PlayerSensor.cs.meta b/Assets/Scripts/PlayerSensor.cs.meta new file mode 100644 index 0000000..423ed47 --- /dev/null +++ b/Assets/Scripts/PlayerSensor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85931a2351159474992c9c9fdce849c5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Predicate.cs b/Assets/Scripts/Predicate.cs new file mode 100644 index 0000000..f6e4dfb --- /dev/null +++ b/Assets/Scripts/Predicate.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public abstract class Predicate : MonoBehaviour { + public bool invert; + public bool Check(){ + var tmp = CheckInternal(); + return invert ? !tmp : tmp; + } + public bool Check(object param){ + var tmp = CheckInternal(param); + return invert ? !tmp : tmp; + } + + protected abstract bool CheckInternal(); + protected abstract bool CheckInternal(object param); +} diff --git a/Assets/Scripts/Predicate.cs.meta b/Assets/Scripts/Predicate.cs.meta new file mode 100644 index 0000000..452451d --- /dev/null +++ b/Assets/Scripts/Predicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 307a00aed135e4a478f6274a7d89500c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/RandomSoundPlayer.cs b/Assets/Scripts/RandomSoundPlayer.cs new file mode 100644 index 0000000..a41e679 --- /dev/null +++ b/Assets/Scripts/RandomSoundPlayer.cs @@ -0,0 +1,60 @@ +using UnityEngine; +using System.Collections; + +public class RandomSoundPlayer : MonoBehaviour { + public AudioClip[] clips; + public AudioSource target; + public GameObject newObjectPrototype; + public bool forceInstantinate; + + public void Play(bool newObject = false){ + if (forceInstantinate) { + newObject = true; + } + + if (!newObject && (target == null)) { + Debug.Log("Can't play because audio source is null", this); + return; + } + if (clips == null || clips.Length == 0) { + Debug.Log("Can't play because clips are null", this); + return; + } + + + + var sound = clips[Random.Range(0, clips.Length - 1)]; + if (newObject) { + GameObject g; + AudioSource source; + + + + if (newObjectPrototype != null) { + g = Instantiate(newObjectPrototype); + g.transform.parent = null; + source = g.GetComponent(); + source.clip = clips[0]; + source.playOnAwake = true; + g.SetActive(true); + } + else { + g = new GameObject("SingleShotTmpSound"); + source = g.AddComponent(); + source.PlayOneShot(sound); + } + g.transform.position = transform.position; + + Destroy(g, sound.length); + } + else { + if (target != null) { + target.PlayOneShot(sound); + } + else { + Debug.LogWarning("Audio source not set!", this); + } + } + + } +} diff --git a/Assets/Scripts/RandomSoundPlayer.cs.meta b/Assets/Scripts/RandomSoundPlayer.cs.meta new file mode 100644 index 0000000..76f3173 --- /dev/null +++ b/Assets/Scripts/RandomSoundPlayer.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a301533f7c2da54499776b6a5091eb3b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/RaycastTester.cs b/Assets/Scripts/RaycastTester.cs new file mode 100644 index 0000000..0a237da --- /dev/null +++ b/Assets/Scripts/RaycastTester.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; + +public class RaycastTester : MonoBehaviour { + + public GameObject target; + public float distance = 100; + + // Use this for initialization + void Start () { + + } + + private void FixedUpdate() { + if (target != null) { + var src = transform.position; + var dst = target.transform.position; + + var hit = Physics2D.Raycast(src, (dst - src).normalized, distance, 1 << target.gameObject.layer); + if (hit.rigidbody != null) { + Debug.Log("!!!Hit collider: " + hit.collider.name); + } + else { + Debug.Log("!!!Nothing hit"); + } + + Debug.DrawLine(src, dst); + } + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/RaycastTester.cs.meta b/Assets/Scripts/RaycastTester.cs.meta new file mode 100644 index 0000000..cf97251 --- /dev/null +++ b/Assets/Scripts/RaycastTester.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: adfbfc31a0b49cb418171e965e9bc8ad +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Rope.cs b/Assets/Scripts/Rope.cs new file mode 100644 index 0000000..f319f87 --- /dev/null +++ b/Assets/Scripts/Rope.cs @@ -0,0 +1,39 @@ +using UnityEngine; +using System.Collections; + +public class Rope : MonoBehaviour { + public HingeJoint2D[] objects; + bool isfixed = false; + int fixCount = 0; + // Use this for initialization + void Start () { + //Invoke("Fix", Time.time); + // + } + + void Fix(){ + + foreach(var j in objects){ + j.useMotor = true; + JointMotor2D m = new JointMotor2D(); + m.maxMotorTorque = 0; + m.motorSpeed = 0; + j.motor = m; + j.useMotor = false; + j.enabled = true; + } + } + + void FixedUpdate(){ + if(fixCount < 10){ + Fix(); + isfixed = true; + fixCount++; + } + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/Rope.cs.meta b/Assets/Scripts/Rope.cs.meta new file mode 100644 index 0000000..413d74e --- /dev/null +++ b/Assets/Scripts/Rope.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1e6f3102772d923468c9944e58eff8b1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/SaveGame.cs b/Assets/Scripts/SaveGame.cs new file mode 100644 index 0000000..a854b99 --- /dev/null +++ b/Assets/Scripts/SaveGame.cs @@ -0,0 +1,14 @@ +using System.Threading; +using UnityEngine; +using System.Collections; + +public class SaveGame : MonoBehaviour { + + public void Save() { + + } + + public void Load() { + //Object.DontDestroyOnLoad(); + } +} diff --git a/Assets/Scripts/SaveGame.cs.meta b/Assets/Scripts/SaveGame.cs.meta new file mode 100644 index 0000000..3c52272 --- /dev/null +++ b/Assets/Scripts/SaveGame.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 11e31e586148d3548914dc66a9bd6eaa +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/SavePoint.cs b/Assets/Scripts/SavePoint.cs new file mode 100644 index 0000000..236e094 --- /dev/null +++ b/Assets/Scripts/SavePoint.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using System.Collections; + +public class SavePoint : PlayerSensor { + private GameAction _saveAction; + private AudioSource _audio; + private float lastSaveTime = -100; + public float savePeriod = 5.0f; + + void Start(){ + _saveAction = new GameAction(); + _saveAction.target = gameObject; + _saveAction.text = "Save state"; + + _audio = GetComponent(); + } + + protected override void OnPlayerEnter (GameObject player) + { + base.OnPlayerEnter (player); + ActionController.AddAction(_saveAction); + } + + protected override void OnPlayerExit (GameObject player) + { + base.OnPlayerExit (player); + ActionController.RemoveAction(_saveAction); + } + + void OnAction(ActionArgs a){ + if(Time.time - lastSaveTime >= savePeriod){ + Debug.Log("Save"); + lastSaveTime = Time.time; + if(_audio != null){ + _audio.Play(); + } + } + + + } +} diff --git a/Assets/Scripts/SavePoint.cs.meta b/Assets/Scripts/SavePoint.cs.meta new file mode 100644 index 0000000..6fc3d33 --- /dev/null +++ b/Assets/Scripts/SavePoint.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d8b83553664ac44392ff091353d8aeb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/SoundSystem.meta b/Assets/Scripts/SoundSystem.meta new file mode 100644 index 0000000..eba84f2 --- /dev/null +++ b/Assets/Scripts/SoundSystem.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 44594a729d6e6cf47a960618ca45fb4b +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Scripts/SoundSystem/AiSound.cs b/Assets/Scripts/SoundSystem/AiSound.cs new file mode 100644 index 0000000..8680121 --- /dev/null +++ b/Assets/Scripts/SoundSystem/AiSound.cs @@ -0,0 +1,71 @@ +using System.Diagnostics; +using System.Linq; +using UnityEngine; +using System.Collections; +using Debug = UnityEngine.Debug; + +public class AiSound : MonoBehaviour { + public AudioSource audio; + private bool _isPlaying; + private float _startTime; + public float rangeScale = 1.0f; + public float StartTime { + get { return _startTime; } + } + public bool IsPlaying { + get { return _isPlaying; } + } + + + void Start () { + + } + + private void BroadcastBeginPlaying() { + _startTime = Time.time; + + var overlapped = Physics2D.OverlapCircleAll(transform.position, audio.maxDistance * rangeScale); + var listeners = overlapped.Select(v => v.gameObject.GetComponent()).Where(v => v != null).Distinct().ToList(); + + if (listeners.Count() != 0) { + foreach (var listener in listeners) { + listener.OnSoundStart(this); + Debug.Log("Broadcast begin playing to object: " + listener.name); + } + } + else { + Debug.Log("AiSound started but no listeners found"); + } + + + + } + + private void BroadcastEndPlaying() { + Debug.Log("EndPlaying"); + } + + + void Update () { + if (audio != null) { + if (_isPlaying != audio.isPlaying) { + if (!_isPlaying) { + BroadcastBeginPlaying(); + } + else { + BroadcastEndPlaying(); + } + } + _isPlaying = audio.isPlaying; + } + else { + Debug.LogWarning("AiSound AudioSource is null!!!", this); + } + } + + void OnDrawGizmos() { + if (audio != null) { + AdvancedGizmo.DrawCircle(transform.position, Vector3.forward, audio.maxDistance * rangeScale, Color.green); + } + } +} diff --git a/Assets/Scripts/SoundSystem/AiSound.cs.meta b/Assets/Scripts/SoundSystem/AiSound.cs.meta new file mode 100644 index 0000000..24cdd9d --- /dev/null +++ b/Assets/Scripts/SoundSystem/AiSound.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8fd9d1ef233396e4a9fdb2019f8f8c19 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/SoundSystem/AiSoundListener.cs b/Assets/Scripts/SoundSystem/AiSoundListener.cs new file mode 100644 index 0000000..b958008 --- /dev/null +++ b/Assets/Scripts/SoundSystem/AiSoundListener.cs @@ -0,0 +1,41 @@ +using System.Linq; +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class AiSoundListener : MonoBehaviour { + + private List _sensibleSounds = new List(); + private AiSound _latestSound; + public AiSound LatestSound { + get { return _latestSound; } + } + public void OnSoundStart(AiSound sound) { + if (sound == null) { + return; + } + if (!_sensibleSounds.Contains(sound)) { + _sensibleSounds.Add(sound); + } + _latestSound = FindLatest(); + } + + public AiSound FindLatest(float volumeTreshold = 0) { + if (_sensibleSounds.Count == 0) { + return null; + } + return _sensibleSounds.OrderByDescending(v => v.StartTime).First(); + } + + // Use this for initialization + void Start () { + + } + + void Update () { + _sensibleSounds.RemoveAll(v => !v.IsPlaying); + if (!_sensibleSounds.Contains(_latestSound)) { + _latestSound = FindLatest(); + } + } +} diff --git a/Assets/Scripts/SoundSystem/AiSoundListener.cs.meta b/Assets/Scripts/SoundSystem/AiSoundListener.cs.meta new file mode 100644 index 0000000..5dd9409 --- /dev/null +++ b/Assets/Scripts/SoundSystem/AiSoundListener.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 687dc430974c4b642a8e3118eb2f9628 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/SpriteDebugger.cs b/Assets/Scripts/SpriteDebugger.cs new file mode 100644 index 0000000..219c69f --- /dev/null +++ b/Assets/Scripts/SpriteDebugger.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class SpriteDebugger : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + //var sr = gameObject.GetComponent(); + //var s = sr.sprite; + //s. + } +} diff --git a/Assets/Scripts/SpriteDebugger.cs.meta b/Assets/Scripts/SpriteDebugger.cs.meta new file mode 100644 index 0000000..2711bc9 --- /dev/null +++ b/Assets/Scripts/SpriteDebugger.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e0dd6d27b6998f54ea5f77f0a386be8d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Switch.cs b/Assets/Scripts/Switch.cs new file mode 100644 index 0000000..391ca82 --- /dev/null +++ b/Assets/Scripts/Switch.cs @@ -0,0 +1,121 @@ +using UnityEngine; +using System.Collections; + +public enum SwitchState{ + On, + Off, + Error +} + +public class Switch : Predicate { + protected override bool CheckInternal () + { + return state == SwitchState.On; + } + + protected override bool CheckInternal (object param) + { + return Check (); + } + + + public Color errorColor; + public Color offColor; + public Color onColor; + public SwitchState state; + private PlayerSensor _sensor; + private Notification _notify; + private GameAction _action; + public string actionOn = "Switch ON"; + public string actionOff = "Switch OFF"; + public string errorNotify = "Switch not working"; + public AudioClip soundOn; + public AudioClip soundOff; + private AudioSource _audio; + public bool interactive = true; + public WaveController ledIntensityController; + public Predicate interactivePredicate; + private Led _led; + + // Use this for initialization + void Start () { + _action = new GameAction(); + _action.target = gameObject; + _notify = new Notification(); + _notify.source = gameObject; + _led = GetComponentInChildren(); + _led.color = errorColor; + + _sensor = GetComponentInChildren(); + _sensor.PlayerEnter += HandlePlayerEnter; + _sensor.PlayerExit += HandlePlayerExit; + + _audio = GetComponent(); + } + + void SetState(SwitchState s){ + state = s; + if(state == SwitchState.Off){ + _audio.PlayOneShot(soundOff); + }else if(state == SwitchState.On){ + _audio.PlayOneShot(soundOn); + } + } + + void OnAction(ActionArgs a){ + if(state == SwitchState.On){ + SetState(SwitchState.Off); + }else if(state == SwitchState.Off){ + SetState(SwitchState.On); + } + } + + void HandlePlayerEnter (PlayerSensor sensor, GameObject player) + { + if(interactive){ + NotificationsController.AddNotification(_notify); + ActionController.AddAction(_action); + } + } + + void HandlePlayerExit (PlayerSensor sensor, GameObject player) + { + if(interactive){ + NotificationsController.RemoveNotification(_notify); + ActionController.RemoveAction(_action); + } + } + + // Update is called once per frame + void Update () { + if(interactivePredicate != null){ + interactive = interactivePredicate.Check(); + } + + if(state == SwitchState.Error){ + _notify.text = errorNotify; + _action.text = ""; + }else{ + if(state == SwitchState.On){ + _action.text = actionOff; + }else{ + _action.text = actionOn; + } + _notify.text = ""; + } + + Color c; + if(state == SwitchState.On){ + c = onColor; + }else if(state == SwitchState.Off){ + c = offColor; + }else{ + c = errorColor; + } + _led.color = c; + + float intensity = ledIntensityController == null ? 0 : ledIntensityController.Get(); + + _led.intensity = Mathf.Clamp(intensity, 0.5f, 1.0f); + } +} diff --git a/Assets/Scripts/Switch.cs.meta b/Assets/Scripts/Switch.cs.meta new file mode 100644 index 0000000..c18f30c --- /dev/null +++ b/Assets/Scripts/Switch.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c99f43a26dcaa6947ba480c3e9dae3cc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/TestCircleCast.cs b/Assets/Scripts/TestCircleCast.cs new file mode 100644 index 0000000..7e3f4c2 --- /dev/null +++ b/Assets/Scripts/TestCircleCast.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using System.Collections; + +public class TestCircleCast : MonoBehaviour { + public float radius = 0.5f; + public float distance = 1.0f; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + + void OnDrawGizmos(){ + + var c = Physics2D.CircleCast(transform.position, radius, -Vector2.up, distance - radius); + Gizmos.DrawWireSphere(transform.position, radius); + + if(c.collider != null){ + Debug.Log("Collided! Distance: " + (c.point - (Vector2)transform.position).magnitude); + } + } +} diff --git a/Assets/Scripts/TestCircleCast.cs.meta b/Assets/Scripts/TestCircleCast.cs.meta new file mode 100644 index 0000000..b2424c4 --- /dev/null +++ b/Assets/Scripts/TestCircleCast.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5bde5032af686944da936e6f3a855aad +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/TimeWaveController.cs b/Assets/Scripts/TimeWaveController.cs new file mode 100644 index 0000000..76f15d9 --- /dev/null +++ b/Assets/Scripts/TimeWaveController.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using System.Collections; + +public class TimeWaveController : WaveController { + + public override float Get () + { + return Mathf.Sin(Time.time * phaseScale); + } + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/TimeWaveController.cs.meta b/Assets/Scripts/TimeWaveController.cs.meta new file mode 100644 index 0000000..83a48fd --- /dev/null +++ b/Assets/Scripts/TimeWaveController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: af6fdc8e9da9189408f11d9a75471996 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Tools.cs b/Assets/Scripts/Tools.cs new file mode 100644 index 0000000..21ce768 --- /dev/null +++ b/Assets/Scripts/Tools.cs @@ -0,0 +1,62 @@ +using UnityEngine; +using System.Collections; + +public class Tools{ + + static Material lineMaterial; + static void CreateLineMaterial() + { + if( !lineMaterial ) { + lineMaterial = new Material( "Shader \"Lines/Colored Blended\" {" + + "SubShader { Pass { " + + " Blend SrcAlpha OneMinusSrcAlpha " + + " ZWrite Off Cull Off Fog { Mode Off } " + + " BindChannels {" + + " Bind \"vertex\", vertex Bind \"color\", color }" + + "} } }" ); + lineMaterial.hideFlags = HideFlags.HideAndDontSave; + lineMaterial.shader.hideFlags = HideFlags.HideAndDontSave; + } + } + + + public static void DrawRectangle(Rect rect, Color color){ + DrawRectangle (rect.x, rect.y, rect.width, rect.height, color); + } + public static void DrawRectangle(float x, float y, float width, float height, Color color){ + CreateLineMaterial (); + lineMaterial.SetPass (0); + GL.Begin(GL.QUADS); + GL.Color(color); + GL.Vertex3(x, y, 0); + GL.Vertex3(x, y + height, 0); + GL.Vertex3(x + width, y + height, 0); + GL.Vertex3(x + width, y, 0); + GL.End(); + } + + public static Rect BoundsToRect(Bounds bounds){ + return new Rect(bounds.min.x, bounds.min.y, bounds.max.x - bounds.min.x, bounds.max.y - bounds.min.y); + } + + public static Vector3 WorldToGuiPoint(Vector3 point){ + + var pt = Camera.main.WorldToScreenPoint(point); + pt.y = Camera.main.pixelHeight - pt.y; + return pt; + } + + public static void BeginGui(bool verticalFlip = true){ + GL.PushMatrix(); + if (verticalFlip) { + GL.LoadPixelMatrix (0, Camera.current.pixelWidth, Camera.current.pixelHeight, 0); + } else { + GL.LoadPixelMatrix (0, Camera.current.pixelWidth, 0, Camera.current.pixelHeight); + } + + } + + public static void EndGui(){ + GL.PopMatrix(); + } +} diff --git a/Assets/Scripts/Tools.cs.meta b/Assets/Scripts/Tools.cs.meta new file mode 100644 index 0000000..7262c52 --- /dev/null +++ b/Assets/Scripts/Tools.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe041408446789f47b19ba149b8a69c7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Trigger.cs b/Assets/Scripts/Trigger.cs new file mode 100644 index 0000000..40d8c29 --- /dev/null +++ b/Assets/Scripts/Trigger.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public delegate void TriggerEvent(); +public class Trigger : MonoBehaviour { + public event TriggerEvent Trig; + + protected virtual void OnTrig () + { + var handler = Trig; + if (handler != null) + handler (); + } + +} diff --git a/Assets/Scripts/Trigger.cs.meta b/Assets/Scripts/Trigger.cs.meta new file mode 100644 index 0000000..f30a825 --- /dev/null +++ b/Assets/Scripts/Trigger.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: aaf89e416c33fc142abdeddc075720e9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/TruePredicate.cs b/Assets/Scripts/TruePredicate.cs new file mode 100644 index 0000000..7dd20db --- /dev/null +++ b/Assets/Scripts/TruePredicate.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class TruePredicate : Predicate { + + + + protected override bool CheckInternal() { + return true; + } + + protected override bool CheckInternal(object param) { + return true; + } +} diff --git a/Assets/Scripts/TruePredicate.cs.meta b/Assets/Scripts/TruePredicate.cs.meta new file mode 100644 index 0000000..61c1033 --- /dev/null +++ b/Assets/Scripts/TruePredicate.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3f04b1b10876570439cc1d2528d4823d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/UiController.cs b/Assets/Scripts/UiController.cs new file mode 100644 index 0000000..ed31134 --- /dev/null +++ b/Assets/Scripts/UiController.cs @@ -0,0 +1,7 @@ +using UnityEngine; +using System.Collections; + +public class UiController : MonoBehaviour { + + +} diff --git a/Assets/Scripts/UiController.cs.meta b/Assets/Scripts/UiController.cs.meta new file mode 100644 index 0000000..44cb3e3 --- /dev/null +++ b/Assets/Scripts/UiController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 91f1e784122eb8449b7ef7feb97e2921 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/VerticalProgressBar.cs b/Assets/Scripts/VerticalProgressBar.cs new file mode 100644 index 0000000..f105c51 --- /dev/null +++ b/Assets/Scripts/VerticalProgressBar.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class VerticalProgressBar { + private float _value; + public float Value{ + get{ return _value;} + set{_value = Mathf.Clamp01(value);} + } + + public void OnGUI(Rect rect){ + Tools.DrawRectangle (rect, new Color(0,0.1f,0,0.5f)); + Tools.DrawRectangle (new Rect(rect.x, rect.y + rect.height * (1.0f - _value), rect.width, rect.height - rect.height * (1.0f - _value)), new Color(1,1,0,0.9f)); + } +} + +public class HorizontalProgressBar { + + public static void OnGUI(Rect rect, float value, Color foreground){ + value = Mathf.Clamp01 (value); + Tools.DrawRectangle (rect, new Color(0,0.1f,0,0.5f)); + Tools.DrawRectangle (new Rect(rect.x, rect.y, rect.width * (value), rect.height), foreground); + } +} diff --git a/Assets/Scripts/VerticalProgressBar.cs.meta b/Assets/Scripts/VerticalProgressBar.cs.meta new file mode 100644 index 0000000..59e6b4f --- /dev/null +++ b/Assets/Scripts/VerticalProgressBar.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4a535540f9644e94b834043bbd5e29ae +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/VisibilityZone.cs b/Assets/Scripts/VisibilityZone.cs new file mode 100644 index 0000000..866f1ae --- /dev/null +++ b/Assets/Scripts/VisibilityZone.cs @@ -0,0 +1,72 @@ +using UnityEngine; +using System.Collections; + +public class VisibilityZone : Zone { + private GameObject obj; + private float startupDepth; + private Material startupMaterial; + private bool startupVisibility; + private SpriteRenderer renderer; + private bool initialized; + private bool hidden; + public ZoneVisibilityControl control; + + public Predicate[] visibilityPredicates; + + // Use this for initialization + void Start () { + Init (); + } + + public void Init(){ + if(!initialized){ + obj = gameObject; + startupDepth = obj.transform.position.z; + renderer = obj.GetComponent(); + startupMaterial = renderer.sharedMaterial; + startupVisibility = obj.activeSelf; + initialized = true; + } + } + + public bool IsInside(Vector2 position){ + var b = renderer.bounds; + + var r = new Rect(b.min.x, b.min.y, b.max.x - b.min.x, b.max.y - b.min.y); + return r.Contains(position); + //Vector3 tp = new Vector3(position.x, position.y, b.min.z); + //return b.Contains(tp); + } + + public void Hide(Material hideMaterial, float hideDepth){ + hidden = true; + var pos = obj.transform.position; + pos.z = hideDepth; + obj.transform.position = pos; + renderer.sharedMaterial = hideMaterial; + obj.SetActive(true); + } + + public void Show(){ + hidden = false; + var pos = obj.transform.position; + pos.z = startupDepth; + obj.transform.position = pos; + renderer.sharedMaterial = startupMaterial; + obj.SetActive(startupVisibility); + } + + // Update is called once per frame + void Update () { + if (control == null) { + return; + } + foreach(var p in visibilityPredicates){ + if(p != null && p.Check(this)){ + Show (); + return; + } + } + Hide (control.hideMaterial, control.hideDepth); + } +} diff --git a/Assets/Scripts/VisibilityZone.cs.meta b/Assets/Scripts/VisibilityZone.cs.meta new file mode 100644 index 0000000..9e70d83 --- /dev/null +++ b/Assets/Scripts/VisibilityZone.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a6a4311a785196640851cf28205b6a61 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/WaveClamp.cs b/Assets/Scripts/WaveClamp.cs new file mode 100644 index 0000000..daa219e --- /dev/null +++ b/Assets/Scripts/WaveClamp.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using System.Collections; + +public class WaveClamp : WaveController { + public WaveController wave; + public float min = 0; + public float max = 1; + + public override float Get () + { + return Mathf.Clamp(wave.Get(), min, max); + } + + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/WaveClamp.cs.meta b/Assets/Scripts/WaveClamp.cs.meta new file mode 100644 index 0000000..f10e944 --- /dev/null +++ b/Assets/Scripts/WaveClamp.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f9258c88a3504f4f9544d072ba067ee +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/WaveController.cs b/Assets/Scripts/WaveController.cs new file mode 100644 index 0000000..a59b8bd --- /dev/null +++ b/Assets/Scripts/WaveController.cs @@ -0,0 +1,7 @@ +using UnityEngine; +using System.Collections; + +public abstract class WaveController : MonoBehaviour { + public float phaseScale = 1; + public abstract float Get(); +} diff --git a/Assets/Scripts/WaveController.cs.meta b/Assets/Scripts/WaveController.cs.meta new file mode 100644 index 0000000..ff5d450 --- /dev/null +++ b/Assets/Scripts/WaveController.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cf4e3a0675bfda144a1a2d8aed483a89 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/WorldSpaceLabel.cs b/Assets/Scripts/WorldSpaceLabel.cs new file mode 100644 index 0000000..d7bcf58 --- /dev/null +++ b/Assets/Scripts/WorldSpaceLabel.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using System.Collections; + +public class WorldSpaceLabel : MonoBehaviour { + + public Vector3 offset3D; + public Vector2 offset2D; + public string text = ""; + + void OnGUI() { + var pt = Tools.WorldToGuiPoint(transform.position + offset3D) + (Vector3)offset2D; + GUI.Label(new Rect(pt.x, pt.y, 200, 30), text); + } +} diff --git a/Assets/Scripts/WorldSpaceLabel.cs.meta b/Assets/Scripts/WorldSpaceLabel.cs.meta new file mode 100644 index 0000000..c71d686 --- /dev/null +++ b/Assets/Scripts/WorldSpaceLabel.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e017474813fa6594d93fbfffe9b7518d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/Zone.cs b/Assets/Scripts/Zone.cs new file mode 100644 index 0000000..27f76cf --- /dev/null +++ b/Assets/Scripts/Zone.cs @@ -0,0 +1,7 @@ +using UnityEngine; +using System.Collections; + +public class Zone : MonoBehaviour { + + +} diff --git a/Assets/Scripts/Zone.cs.meta b/Assets/Scripts/Zone.cs.meta new file mode 100644 index 0000000..7e6ea7c --- /dev/null +++ b/Assets/Scripts/Zone.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fcfe9bf7265723e4aa9f22ed8ebf44be +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Scripts/ZoneVisibilityControl.cs b/Assets/Scripts/ZoneVisibilityControl.cs new file mode 100644 index 0000000..4ed7cd9 --- /dev/null +++ b/Assets/Scripts/ZoneVisibilityControl.cs @@ -0,0 +1,72 @@ +using UnityEngine; +using System.Collections; + +/*public class VisibilityZone{ + + + public VisibilityZone(GameObject src, float overlayDepth){ + + } + + +}*/ + +public class ZoneVisibilityControl : Predicate { + #region implemented abstract members of Predicate + protected override bool CheckInternal () + { + return false; + } + protected override bool CheckInternal (object param) + { + var z = param as VisibilityZone; + if(z == null){ + return false; + } + return z.IsInside(viewer.transform.position); + } + #endregion + + private VisibilityZone[] zones; + public GameObject viewer; + private VisibilityZone currentVisible; + public Material hideMaterial; + public float hideDepth = -1.0f; + + // Use this for initialization + void Start () { + zones = FindObjectsOfType(); + foreach(var zone in zones){ + zone.Init(); + zone.Hide(hideMaterial, hideDepth); + } + } + + void UpateVisibility(){ + foreach(var zone in zones){ + if(zone.IsInside(viewer.transform.position)){ + if(currentVisible != zone){ + if(currentVisible != null){ + currentVisible.Hide (hideMaterial, hideDepth); + } + + currentVisible = zone; + currentVisible.Show(); + + } + return; + } + } + if(currentVisible != null){ + currentVisible.Hide (hideMaterial, hideDepth); + currentVisible = null; + } + + } + // Update is called once per frame + void Update () { + //UpateVisibility(); + } + + +} diff --git a/Assets/Scripts/ZoneVisibilityControl.cs.meta b/Assets/Scripts/ZoneVisibilityControl.cs.meta new file mode 100644 index 0000000..80e20ef --- /dev/null +++ b/Assets/Scripts/ZoneVisibilityControl.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 64b36d26e4014d24a83bdbe1c110dc7e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Sounds.meta b/Assets/Sounds.meta new file mode 100644 index 0000000..f3c8576 --- /dev/null +++ b/Assets/Sounds.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: acb72c549d5e2a14a8bc2e7af629dca0 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/07. INTRUDER 2.mp3 b/Assets/Sounds/07. INTRUDER 2.mp3 new file mode 100644 index 0000000..d021880 Binary files /dev/null and b/Assets/Sounds/07. INTRUDER 2.mp3 differ diff --git a/Assets/Sounds/07. INTRUDER 2.mp3.meta b/Assets/Sounds/07. INTRUDER 2.mp3.meta new file mode 100644 index 0000000..64b66eb --- /dev/null +++ b/Assets/Sounds/07. INTRUDER 2.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 77fa41b77decdc84d84823beb6f0260e +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/0x84.wav b/Assets/Sounds/0x84.wav new file mode 100644 index 0000000..a5ca2ba Binary files /dev/null and b/Assets/Sounds/0x84.wav differ diff --git a/Assets/Sounds/0x84.wav.meta b/Assets/Sounds/0x84.wav.meta new file mode 100644 index 0000000..c96f458 --- /dev/null +++ b/Assets/Sounds/0x84.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 042d15c123bcdf349bc214b600d8a061 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/14-bells_single_ring.flac b/Assets/Sounds/14-bells_single_ring.flac new file mode 100644 index 0000000..f92ec5d Binary files /dev/null and b/Assets/Sounds/14-bells_single_ring.flac differ diff --git a/Assets/Sounds/14-bells_single_ring.flac.meta b/Assets/Sounds/14-bells_single_ring.flac.meta new file mode 100644 index 0000000..5aec47e --- /dev/null +++ b/Assets/Sounds/14-bells_single_ring.flac.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ede4a7e3de3284f44a045738a38adac7 +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/14-bells_single_ring.wav b/Assets/Sounds/14-bells_single_ring.wav new file mode 100644 index 0000000..4dd976b Binary files /dev/null and b/Assets/Sounds/14-bells_single_ring.wav differ diff --git a/Assets/Sounds/14-bells_single_ring.wav.meta b/Assets/Sounds/14-bells_single_ring.wav.meta new file mode 100644 index 0000000..41d1dd9 --- /dev/null +++ b/Assets/Sounds/14-bells_single_ring.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: e323ccc5a33b021498976eb14ac5fb52 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Ambient.meta b/Assets/Sounds/Ambient.meta new file mode 100644 index 0000000..4293166 --- /dev/null +++ b/Assets/Sounds/Ambient.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: bcd597bfd8956464282b1b8d82afb83d +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3 b/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3 new file mode 100644 index 0000000..fa9b639 Binary files /dev/null and b/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3 differ diff --git a/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3.meta b/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3.meta new file mode 100644 index 0000000..66dfc5d --- /dev/null +++ b/Assets/Sounds/Ambient/43 - wind dry gusty and whistling wind. weather .mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: ff0bf85e8cfe96a4c81213e9e18f7fd0 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav b/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav new file mode 100644 index 0000000..419fa6c Binary files /dev/null and b/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav differ diff --git a/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav.meta b/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav.meta new file mode 100644 index 0000000..03e7272 --- /dev/null +++ b/Assets/Sounds/Ambient/SF-DS Ambience Drone Low 02.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 281a15bdbcca06545beebf2c8d1cfb7e +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/AmbientMixer.mixer b/Assets/Sounds/AmbientMixer.mixer new file mode 100644 index 0000000..165421a Binary files /dev/null and b/Assets/Sounds/AmbientMixer.mixer differ diff --git a/Assets/Sounds/AmbientMixer.mixer.meta b/Assets/Sounds/AmbientMixer.mixer.meta new file mode 100644 index 0000000..c649bc3 --- /dev/null +++ b/Assets/Sounds/AmbientMixer.mixer.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b559265fb4c14564288c072db84c8ce5 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Background.mixer b/Assets/Sounds/Background.mixer new file mode 100644 index 0000000..b0df206 Binary files /dev/null and b/Assets/Sounds/Background.mixer differ diff --git a/Assets/Sounds/Background.mixer.meta b/Assets/Sounds/Background.mixer.meta new file mode 100644 index 0000000..6260b7b --- /dev/null +++ b/Assets/Sounds/Background.mixer.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: eb408b25c8e3fea4e944b4e336b0efcc +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot.meta b/Assets/Sounds/Bot.meta new file mode 100644 index 0000000..8e35ba2 --- /dev/null +++ b/Assets/Sounds/Bot.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: a4e88caf323e3ca4f8f2bb92630e5e9d +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Death0.wav b/Assets/Sounds/Bot/Death0.wav new file mode 100644 index 0000000..9025180 Binary files /dev/null and b/Assets/Sounds/Bot/Death0.wav differ diff --git a/Assets/Sounds/Bot/Death0.wav.meta b/Assets/Sounds/Bot/Death0.wav.meta new file mode 100644 index 0000000..b1083c8 --- /dev/null +++ b/Assets/Sounds/Bot/Death0.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: a6cc8ecf6abde3b4f8cb34a4262842cf +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Death1.wav b/Assets/Sounds/Bot/Death1.wav new file mode 100644 index 0000000..fbed0a3 Binary files /dev/null and b/Assets/Sounds/Bot/Death1.wav differ diff --git a/Assets/Sounds/Bot/Death1.wav.meta b/Assets/Sounds/Bot/Death1.wav.meta new file mode 100644 index 0000000..b149570 --- /dev/null +++ b/Assets/Sounds/Bot/Death1.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: d1fbf2cc8a6b62649ba2d2471946e312 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Hit0.wav b/Assets/Sounds/Bot/Hit0.wav new file mode 100644 index 0000000..cd95803 Binary files /dev/null and b/Assets/Sounds/Bot/Hit0.wav differ diff --git a/Assets/Sounds/Bot/Hit0.wav.meta b/Assets/Sounds/Bot/Hit0.wav.meta new file mode 100644 index 0000000..fd72f44 --- /dev/null +++ b/Assets/Sounds/Bot/Hit0.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 6452fde239172b64699165bc4fa5acbb +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Hit1.wav b/Assets/Sounds/Bot/Hit1.wav new file mode 100644 index 0000000..d096eb3 Binary files /dev/null and b/Assets/Sounds/Bot/Hit1.wav differ diff --git a/Assets/Sounds/Bot/Hit1.wav.meta b/Assets/Sounds/Bot/Hit1.wav.meta new file mode 100644 index 0000000..194ca5c --- /dev/null +++ b/Assets/Sounds/Bot/Hit1.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 8a434ca6f060e7642ae8af2ceb91de3f +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Hit2.wav b/Assets/Sounds/Bot/Hit2.wav new file mode 100644 index 0000000..d4a4776 Binary files /dev/null and b/Assets/Sounds/Bot/Hit2.wav differ diff --git a/Assets/Sounds/Bot/Hit2.wav.meta b/Assets/Sounds/Bot/Hit2.wav.meta new file mode 100644 index 0000000..98c7635 --- /dev/null +++ b/Assets/Sounds/Bot/Hit2.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 6c25c70b5d8c5bd46be9702ef9a8b414 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Hit3.wav b/Assets/Sounds/Bot/Hit3.wav new file mode 100644 index 0000000..1f42f40 Binary files /dev/null and b/Assets/Sounds/Bot/Hit3.wav differ diff --git a/Assets/Sounds/Bot/Hit3.wav.meta b/Assets/Sounds/Bot/Hit3.wav.meta new file mode 100644 index 0000000..d8ff56c --- /dev/null +++ b/Assets/Sounds/Bot/Hit3.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 223394a8446166e479f483d3ae55586e +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/Hmm.wav b/Assets/Sounds/Bot/Hmm.wav new file mode 100644 index 0000000..f1e8490 Binary files /dev/null and b/Assets/Sounds/Bot/Hmm.wav differ diff --git a/Assets/Sounds/Bot/Hmm.wav.meta b/Assets/Sounds/Bot/Hmm.wav.meta new file mode 100644 index 0000000..f5e53c5 --- /dev/null +++ b/Assets/Sounds/Bot/Hmm.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 68f17591b61223c49b35382608eb0857 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/IHearedSomething.wav b/Assets/Sounds/Bot/IHearedSomething.wav new file mode 100644 index 0000000..b147050 Binary files /dev/null and b/Assets/Sounds/Bot/IHearedSomething.wav differ diff --git a/Assets/Sounds/Bot/IHearedSomething.wav.meta b/Assets/Sounds/Bot/IHearedSomething.wav.meta new file mode 100644 index 0000000..4171737 --- /dev/null +++ b/Assets/Sounds/Bot/IHearedSomething.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 80bd05619dab7654eb0cab31da9251ba +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/ReturnToPosition.wav b/Assets/Sounds/Bot/ReturnToPosition.wav new file mode 100644 index 0000000..aacd280 Binary files /dev/null and b/Assets/Sounds/Bot/ReturnToPosition.wav differ diff --git a/Assets/Sounds/Bot/ReturnToPosition.wav.meta b/Assets/Sounds/Bot/ReturnToPosition.wav.meta new file mode 100644 index 0000000..d2f3deb --- /dev/null +++ b/Assets/Sounds/Bot/ReturnToPosition.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 3ef8d12a8df805f4aab041bf2e72354d +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/What's that.wav b/Assets/Sounds/Bot/What's that.wav new file mode 100644 index 0000000..dfa44de Binary files /dev/null and b/Assets/Sounds/Bot/What's that.wav differ diff --git a/Assets/Sounds/Bot/What's that.wav.meta b/Assets/Sounds/Bot/What's that.wav.meta new file mode 100644 index 0000000..f57c771 --- /dev/null +++ b/Assets/Sounds/Bot/What's that.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 03d296ec483574a4092f8422d51ac8a3 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Bot/WhoWasThat.wav b/Assets/Sounds/Bot/WhoWasThat.wav new file mode 100644 index 0000000..00356b3 Binary files /dev/null and b/Assets/Sounds/Bot/WhoWasThat.wav differ diff --git a/Assets/Sounds/Bot/WhoWasThat.wav.meta b/Assets/Sounds/Bot/WhoWasThat.wav.meta new file mode 100644 index 0000000..ea4f91e --- /dev/null +++ b/Assets/Sounds/Bot/WhoWasThat.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 0713c939447595a4aa6f6e43430f2a66 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Break.meta b/Assets/Sounds/Break.meta new file mode 100644 index 0000000..3e6e2ad --- /dev/null +++ b/Assets/Sounds/Break.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: ec242b5c0d8586a40ad5346d4465ae10 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Break/crate.wav b/Assets/Sounds/Break/crate.wav new file mode 100644 index 0000000..a1dc926 Binary files /dev/null and b/Assets/Sounds/Break/crate.wav differ diff --git a/Assets/Sounds/Break/crate.wav.meta b/Assets/Sounds/Break/crate.wav.meta new file mode 100644 index 0000000..8444554 --- /dev/null +++ b/Assets/Sounds/Break/crate.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 5fafb240c5af70641ae706f19ada1077 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door.meta b/Assets/Sounds/Door.meta new file mode 100644 index 0000000..1d0e1e0 --- /dev/null +++ b/Assets/Sounds/Door.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 40dffc136ff03c142b9ef51a200dec5f +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/Door Heavy Close 03.wav b/Assets/Sounds/Door/Door Heavy Close 03.wav new file mode 100644 index 0000000..ca45fa5 Binary files /dev/null and b/Assets/Sounds/Door/Door Heavy Close 03.wav differ diff --git a/Assets/Sounds/Door/Door Heavy Close 03.wav.meta b/Assets/Sounds/Door/Door Heavy Close 03.wav.meta new file mode 100644 index 0000000..d10aa35 --- /dev/null +++ b/Assets/Sounds/Door/Door Heavy Close 03.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: ece004867bc66e5459885acd30dfe50d +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 1 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/Door Heavy Open 03.wav b/Assets/Sounds/Door/Door Heavy Open 03.wav new file mode 100644 index 0000000..ef5f64b Binary files /dev/null and b/Assets/Sounds/Door/Door Heavy Open 03.wav differ diff --git a/Assets/Sounds/Door/Door Heavy Open 03.wav.meta b/Assets/Sounds/Door/Door Heavy Open 03.wav.meta new file mode 100644 index 0000000..e1f5988 --- /dev/null +++ b/Assets/Sounds/Door/Door Heavy Open 03.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 099e2fa422dae124db55424bd52bd00b +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 1 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/SH2 Door Open (Secret).mp3 b/Assets/Sounds/Door/SH2 Door Open (Secret).mp3 new file mode 100644 index 0000000..ab9ba5b Binary files /dev/null and b/Assets/Sounds/Door/SH2 Door Open (Secret).mp3 differ diff --git a/Assets/Sounds/Door/SH2 Door Open (Secret).mp3.meta b/Assets/Sounds/Door/SH2 Door Open (Secret).mp3.meta new file mode 100644 index 0000000..60dfe35 --- /dev/null +++ b/Assets/Sounds/Door/SH2 Door Open (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: f0eb59f63a6c78b4d8618cbc4242e059 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3 b/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3 new file mode 100644 index 0000000..9169b32 Binary files /dev/null and b/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3 differ diff --git a/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3.meta b/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3.meta new file mode 100644 index 0000000..0601659 --- /dev/null +++ b/Assets/Sounds/Door/SH2 Door Shut (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 231d20e354fd3b442bc115d5cd6cdc45 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3 b/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3 new file mode 100644 index 0000000..ee93565 Binary files /dev/null and b/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3 differ diff --git a/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3.meta b/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3.meta new file mode 100644 index 0000000..2da6b07 --- /dev/null +++ b/Assets/Sounds/Door/SH2 Elevator Doors Open (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 120726bdb46a4e8468efca9028cd3366 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Door/SOUND_0938.mp3 b/Assets/Sounds/Door/SOUND_0938.mp3 new file mode 100644 index 0000000..7a37ace Binary files /dev/null and b/Assets/Sounds/Door/SOUND_0938.mp3 differ diff --git a/Assets/Sounds/Door/SOUND_0938.mp3.meta b/Assets/Sounds/Door/SOUND_0938.mp3.meta new file mode 100644 index 0000000..3e1859b --- /dev/null +++ b/Assets/Sounds/Door/SOUND_0938.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 90dacc7b5f1181e47a82b50324b324d5 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Elevator.meta b/Assets/Sounds/Elevator.meta new file mode 100644 index 0000000..c50720c --- /dev/null +++ b/Assets/Sounds/Elevator.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 7d7dbf6adc2b20640bd565b31db922c6 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3 b/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3 new file mode 100644 index 0000000..b735eb9 Binary files /dev/null and b/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3 differ diff --git a/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3.meta b/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3.meta new file mode 100644 index 0000000..00382ba --- /dev/null +++ b/Assets/Sounds/Elevator/SH2 Elevator 02 (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: acaa27f9f61f5e24eb70a27ea2ba533a +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Elevator/bigelevatormove.wav b/Assets/Sounds/Elevator/bigelevatormove.wav new file mode 100644 index 0000000..3ded022 Binary files /dev/null and b/Assets/Sounds/Elevator/bigelevatormove.wav differ diff --git a/Assets/Sounds/Elevator/bigelevatormove.wav.meta b/Assets/Sounds/Elevator/bigelevatormove.wav.meta new file mode 100644 index 0000000..d990bfa --- /dev/null +++ b/Assets/Sounds/Elevator/bigelevatormove.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: b92f7aa1a865eba4ba5106bd19841379 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Elevator/bigelevatorstart.mp3 b/Assets/Sounds/Elevator/bigelevatorstart.mp3 new file mode 100644 index 0000000..2d07630 Binary files /dev/null and b/Assets/Sounds/Elevator/bigelevatorstart.mp3 differ diff --git a/Assets/Sounds/Elevator/bigelevatorstart.mp3.meta b/Assets/Sounds/Elevator/bigelevatorstart.mp3.meta new file mode 100644 index 0000000..a4f141c --- /dev/null +++ b/Assets/Sounds/Elevator/bigelevatorstart.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 35142b54e5eedee4e880d142bba1dac3 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Elevator/bigelevatorstop.mp3 b/Assets/Sounds/Elevator/bigelevatorstop.mp3 new file mode 100644 index 0000000..ab39dd8 Binary files /dev/null and b/Assets/Sounds/Elevator/bigelevatorstop.mp3 differ diff --git a/Assets/Sounds/Elevator/bigelevatorstop.mp3.meta b/Assets/Sounds/Elevator/bigelevatorstop.mp3.meta new file mode 100644 index 0000000..5e947a3 --- /dev/null +++ b/Assets/Sounds/Elevator/bigelevatorstop.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 73fd4293e43ba1b4b8668a46c7f85bef +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Explosion.meta b/Assets/Sounds/Explosion.meta new file mode 100644 index 0000000..72bc891 --- /dev/null +++ b/Assets/Sounds/Explosion.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: eeb78d89088517d41a5ee144e9f59281 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav b/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav new file mode 100644 index 0000000..606584a Binary files /dev/null and b/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav differ diff --git a/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav.meta b/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav.meta new file mode 100644 index 0000000..115bd1e --- /dev/null +++ b/Assets/Sounds/Explosion/57 Explosion 1,Short,Small.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 902e68db7adb1704eba6003c0aea870a +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav b/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav new file mode 100644 index 0000000..835d75f Binary files /dev/null and b/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav differ diff --git a/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav.meta b/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav.meta new file mode 100644 index 0000000..abd2282 --- /dev/null +++ b/Assets/Sounds/Explosion/Alarm_ Beep Timer, Rapid, Repeating Single Tone.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: bee2f3fbd29970242abbecc06021f75f +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Fan.meta b/Assets/Sounds/Fan.meta new file mode 100644 index 0000000..354ca76 --- /dev/null +++ b/Assets/Sounds/Fan.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b6a2bb43b1cb79e4c823a8f4611bc3c1 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Fan.mixer b/Assets/Sounds/Fan.mixer new file mode 100644 index 0000000..8c76a90 Binary files /dev/null and b/Assets/Sounds/Fan.mixer differ diff --git a/Assets/Sounds/Fan.mixer.meta b/Assets/Sounds/Fan.mixer.meta new file mode 100644 index 0000000..bfabfa1 --- /dev/null +++ b/Assets/Sounds/Fan.mixer.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c9912d98f16c3f04b9537debdba780d5 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Fan/SH2 Fan (Secret).mp3 b/Assets/Sounds/Fan/SH2 Fan (Secret).mp3 new file mode 100644 index 0000000..5c56626 Binary files /dev/null and b/Assets/Sounds/Fan/SH2 Fan (Secret).mp3 differ diff --git a/Assets/Sounds/Fan/SH2 Fan (Secret).mp3.meta b/Assets/Sounds/Fan/SH2 Fan (Secret).mp3.meta new file mode 100644 index 0000000..6813958 --- /dev/null +++ b/Assets/Sounds/Fan/SH2 Fan (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 2d0d7053014379f4f85b934384af8f12 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Fan/ventilation fan.wav b/Assets/Sounds/Fan/ventilation fan.wav new file mode 100644 index 0000000..c5e6f6e Binary files /dev/null and b/Assets/Sounds/Fan/ventilation fan.wav differ diff --git a/Assets/Sounds/Fan/ventilation fan.wav.meta b/Assets/Sounds/Fan/ventilation fan.wav.meta new file mode 100644 index 0000000..dff73ae --- /dev/null +++ b/Assets/Sounds/Fan/ventilation fan.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 4adb13cf5ed35d6429d0a8686bfb5013 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 1 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Final.mixer b/Assets/Sounds/Final.mixer new file mode 100644 index 0000000..59d5ecb Binary files /dev/null and b/Assets/Sounds/Final.mixer differ diff --git a/Assets/Sounds/Final.mixer.meta b/Assets/Sounds/Final.mixer.meta new file mode 100644 index 0000000..95e5958 --- /dev/null +++ b/Assets/Sounds/Final.mixer.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 630cab9dee176e646860b7bc6d642488 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Footstep.meta b/Assets/Sounds/Footstep.meta new file mode 100644 index 0000000..48279d5 --- /dev/null +++ b/Assets/Sounds/Footstep.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f16d271621a2c1a4592721538cd0d413 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Footstep/Footstep.mp3 b/Assets/Sounds/Footstep/Footstep.mp3 new file mode 100644 index 0000000..b6d4295 Binary files /dev/null and b/Assets/Sounds/Footstep/Footstep.mp3 differ diff --git a/Assets/Sounds/Footstep/Footstep.mp3.meta b/Assets/Sounds/Footstep/Footstep.mp3.meta new file mode 100644 index 0000000..ddbf562 --- /dev/null +++ b/Assets/Sounds/Footstep/Footstep.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 3444c8421e3c5b94da539d4bb9141c38 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Foreground.mixer b/Assets/Sounds/Foreground.mixer new file mode 100644 index 0000000..4428ad6 Binary files /dev/null and b/Assets/Sounds/Foreground.mixer differ diff --git a/Assets/Sounds/Foreground.mixer.meta b/Assets/Sounds/Foreground.mixer.meta new file mode 100644 index 0000000..201f3db --- /dev/null +++ b/Assets/Sounds/Foreground.mixer.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 63011988fa4d07442b113c1f5e82dc5d +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/GetPaper.mp3 b/Assets/Sounds/GetPaper.mp3 new file mode 100644 index 0000000..2ab767d Binary files /dev/null and b/Assets/Sounds/GetPaper.mp3 differ diff --git a/Assets/Sounds/GetPaper.mp3.meta b/Assets/Sounds/GetPaper.mp3.meta new file mode 100644 index 0000000..9de91d8 --- /dev/null +++ b/Assets/Sounds/GetPaper.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 48486526969aef14eb87ea9a0ed70963 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser.meta b/Assets/Sounds/Laser.meta new file mode 100644 index 0000000..d276a94 --- /dev/null +++ b/Assets/Sounds/Laser.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: c0b90fe491138f34ca167d1f6168e744 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electric Current.wav b/Assets/Sounds/Laser/Electric Current.wav new file mode 100644 index 0000000..c70d49e Binary files /dev/null and b/Assets/Sounds/Laser/Electric Current.wav differ diff --git a/Assets/Sounds/Laser/Electric Current.wav.meta b/Assets/Sounds/Laser/Electric Current.wav.meta new file mode 100644 index 0000000..384629d --- /dev/null +++ b/Assets/Sounds/Laser/Electric Current.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: a36c81b1afcd3f14296c81b7d5c7afe7 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electric Flare-Up.wav b/Assets/Sounds/Laser/Electric Flare-Up.wav new file mode 100644 index 0000000..e91ab5f Binary files /dev/null and b/Assets/Sounds/Laser/Electric Flare-Up.wav differ diff --git a/Assets/Sounds/Laser/Electric Flare-Up.wav.meta b/Assets/Sounds/Laser/Electric Flare-Up.wav.meta new file mode 100644 index 0000000..7e865f5 --- /dev/null +++ b/Assets/Sounds/Laser/Electric Flare-Up.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 2a9dd8d94f82b3845b769fb3ebd941c3 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electric Hum.wav b/Assets/Sounds/Laser/Electric Hum.wav new file mode 100644 index 0000000..0e52ccb Binary files /dev/null and b/Assets/Sounds/Laser/Electric Hum.wav differ diff --git a/Assets/Sounds/Laser/Electric Hum.wav.meta b/Assets/Sounds/Laser/Electric Hum.wav.meta new file mode 100644 index 0000000..4e8c833 --- /dev/null +++ b/Assets/Sounds/Laser/Electric Hum.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 28e08a46a0c97ff418dce1cf3a0fe5bc +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electric Sizzle Mix.wav b/Assets/Sounds/Laser/Electric Sizzle Mix.wav new file mode 100644 index 0000000..12fa978 Binary files /dev/null and b/Assets/Sounds/Laser/Electric Sizzle Mix.wav differ diff --git a/Assets/Sounds/Laser/Electric Sizzle Mix.wav.meta b/Assets/Sounds/Laser/Electric Sizzle Mix.wav.meta new file mode 100644 index 0000000..ea98093 --- /dev/null +++ b/Assets/Sounds/Laser/Electric Sizzle Mix.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 1f4075e6eeb16e141b164430d2061c99 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electric Zap.wav b/Assets/Sounds/Laser/Electric Zap.wav new file mode 100644 index 0000000..e157183 Binary files /dev/null and b/Assets/Sounds/Laser/Electric Zap.wav differ diff --git a/Assets/Sounds/Laser/Electric Zap.wav.meta b/Assets/Sounds/Laser/Electric Zap.wav.meta new file mode 100644 index 0000000..57bb2f0 --- /dev/null +++ b/Assets/Sounds/Laser/Electric Zap.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 346f1d33ea6fbeb4187df1e3cf407378 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electricity bolt1.wav b/Assets/Sounds/Laser/Electricity bolt1.wav new file mode 100644 index 0000000..600b254 Binary files /dev/null and b/Assets/Sounds/Laser/Electricity bolt1.wav differ diff --git a/Assets/Sounds/Laser/Electricity bolt1.wav.meta b/Assets/Sounds/Laser/Electricity bolt1.wav.meta new file mode 100644 index 0000000..650c1bb --- /dev/null +++ b/Assets/Sounds/Laser/Electricity bolt1.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 3941c1bedaf892a46a292dea17503ecc +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electricity bolt2.wav b/Assets/Sounds/Laser/Electricity bolt2.wav new file mode 100644 index 0000000..21889c6 Binary files /dev/null and b/Assets/Sounds/Laser/Electricity bolt2.wav differ diff --git a/Assets/Sounds/Laser/Electricity bolt2.wav.meta b/Assets/Sounds/Laser/Electricity bolt2.wav.meta new file mode 100644 index 0000000..f0d5c1d --- /dev/null +++ b/Assets/Sounds/Laser/Electricity bolt2.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 3681eb326a13a644eaeb17a5a184aa4b +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Electricity loop2.wav b/Assets/Sounds/Laser/Electricity loop2.wav new file mode 100644 index 0000000..e797c6e Binary files /dev/null and b/Assets/Sounds/Laser/Electricity loop2.wav differ diff --git a/Assets/Sounds/Laser/Electricity loop2.wav.meta b/Assets/Sounds/Laser/Electricity loop2.wav.meta new file mode 100644 index 0000000..9c26653 --- /dev/null +++ b/Assets/Sounds/Laser/Electricity loop2.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 5e391627a0f053841bd3066e1e07a7f4 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Energy Burst Large 00.wav b/Assets/Sounds/Laser/Energy Burst Large 00.wav new file mode 100644 index 0000000..5bac293 Binary files /dev/null and b/Assets/Sounds/Laser/Energy Burst Large 00.wav differ diff --git a/Assets/Sounds/Laser/Energy Burst Large 00.wav.meta b/Assets/Sounds/Laser/Energy Burst Large 00.wav.meta new file mode 100644 index 0000000..f358b58 --- /dev/null +++ b/Assets/Sounds/Laser/Energy Burst Large 00.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: b8cc2b178737f0c42bc02ffb226134c2 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Energy Burst Large 01.wav b/Assets/Sounds/Laser/Energy Burst Large 01.wav new file mode 100644 index 0000000..0e5a7e7 Binary files /dev/null and b/Assets/Sounds/Laser/Energy Burst Large 01.wav differ diff --git a/Assets/Sounds/Laser/Energy Burst Large 01.wav.meta b/Assets/Sounds/Laser/Energy Burst Large 01.wav.meta new file mode 100644 index 0000000..22475fe --- /dev/null +++ b/Assets/Sounds/Laser/Energy Burst Large 01.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 7bde69cf33ee0964bb24a8c8961e31ba +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Energy Burst Large 02.wav b/Assets/Sounds/Laser/Energy Burst Large 02.wav new file mode 100644 index 0000000..6a22f8a Binary files /dev/null and b/Assets/Sounds/Laser/Energy Burst Large 02.wav differ diff --git a/Assets/Sounds/Laser/Energy Burst Large 02.wav.meta b/Assets/Sounds/Laser/Energy Burst Large 02.wav.meta new file mode 100644 index 0000000..9d95059 --- /dev/null +++ b/Assets/Sounds/Laser/Energy Burst Large 02.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: f1d444cf141f8d54d8fa5c481a132d5a +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Energy Burst Large 03.wav b/Assets/Sounds/Laser/Energy Burst Large 03.wav new file mode 100644 index 0000000..9a8fb52 Binary files /dev/null and b/Assets/Sounds/Laser/Energy Burst Large 03.wav differ diff --git a/Assets/Sounds/Laser/Energy Burst Large 03.wav.meta b/Assets/Sounds/Laser/Energy Burst Large 03.wav.meta new file mode 100644 index 0000000..d13f918 --- /dev/null +++ b/Assets/Sounds/Laser/Energy Burst Large 03.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: e26839f5f6e9586439463e73b46101df +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav b/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav new file mode 100644 index 0000000..53f5027 Binary files /dev/null and b/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav differ diff --git a/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav.meta b/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav.meta new file mode 100644 index 0000000..dc315ab --- /dev/null +++ b/Assets/Sounds/Laser/HighVoltageElectricity_ZA02.339.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: e1bd3eb402330d2439f3e2ccbed0fe4d +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/Laser Clicks 3.wav b/Assets/Sounds/Laser/Laser Clicks 3.wav new file mode 100644 index 0000000..a341f95 Binary files /dev/null and b/Assets/Sounds/Laser/Laser Clicks 3.wav differ diff --git a/Assets/Sounds/Laser/Laser Clicks 3.wav.meta b/Assets/Sounds/Laser/Laser Clicks 3.wav.meta new file mode 100644 index 0000000..1a4c7a5 --- /dev/null +++ b/Assets/Sounds/Laser/Laser Clicks 3.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: b9770bb6612cabd409f08ccfa9621f85 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav b/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav new file mode 100644 index 0000000..7f8f0ee Binary files /dev/null and b/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav differ diff --git a/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav.meta b/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav.meta new file mode 100644 index 0000000..5642971 --- /dev/null +++ b/Assets/Sounds/Laser/SF-DS Energy Burst Large 01.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: af0478c426be93747860131bb3b17306 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/electric Energy.mp3 b/Assets/Sounds/Laser/electric Energy.mp3 new file mode 100644 index 0000000..ee10fb2 Binary files /dev/null and b/Assets/Sounds/Laser/electric Energy.mp3 differ diff --git a/Assets/Sounds/Laser/electric Energy.mp3.meta b/Assets/Sounds/Laser/electric Energy.mp3.meta new file mode 100644 index 0000000..ac32167 --- /dev/null +++ b/Assets/Sounds/Laser/electric Energy.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: c38a97e22f851d44594898cc6fa32652 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Laser/electric2.wav b/Assets/Sounds/Laser/electric2.wav new file mode 100644 index 0000000..00914b3 Binary files /dev/null and b/Assets/Sounds/Laser/electric2.wav differ diff --git a/Assets/Sounds/Laser/electric2.wav.meta b/Assets/Sounds/Laser/electric2.wav.meta new file mode 100644 index 0000000..8671c42 --- /dev/null +++ b/Assets/Sounds/Laser/electric2.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 6a3e29e4f9e40e84fa0a59343d6ae236 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/MASU.mp3 b/Assets/Sounds/MASU.mp3 new file mode 100644 index 0000000..794b578 Binary files /dev/null and b/Assets/Sounds/MASU.mp3 differ diff --git a/Assets/Sounds/MASU.mp3.meta b/Assets/Sounds/MASU.mp3.meta new file mode 100644 index 0000000..bbe2d19 --- /dev/null +++ b/Assets/Sounds/MASU.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 5891ac0c92ae67246a2711fc436fee2f +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu.meta b/Assets/Sounds/Menu.meta new file mode 100644 index 0000000..e44b6b4 --- /dev/null +++ b/Assets/Sounds/Menu.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 8942530e52d4f82408641dacd7f00f98 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu/SOUND_0911.mp3 b/Assets/Sounds/Menu/SOUND_0911.mp3 new file mode 100644 index 0000000..2356465 Binary files /dev/null and b/Assets/Sounds/Menu/SOUND_0911.mp3 differ diff --git a/Assets/Sounds/Menu/SOUND_0911.mp3.meta b/Assets/Sounds/Menu/SOUND_0911.mp3.meta new file mode 100644 index 0000000..c57116d --- /dev/null +++ b/Assets/Sounds/Menu/SOUND_0911.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 2c17ed446fc6df640aa40c94778329dd +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu/SOUND_0912.mp3 b/Assets/Sounds/Menu/SOUND_0912.mp3 new file mode 100644 index 0000000..d721a4b Binary files /dev/null and b/Assets/Sounds/Menu/SOUND_0912.mp3 differ diff --git a/Assets/Sounds/Menu/SOUND_0912.mp3.meta b/Assets/Sounds/Menu/SOUND_0912.mp3.meta new file mode 100644 index 0000000..8fcf432 --- /dev/null +++ b/Assets/Sounds/Menu/SOUND_0912.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 4674d22b1b61c784fb963df0fe63fae8 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu/SOUND_0913.mp3 b/Assets/Sounds/Menu/SOUND_0913.mp3 new file mode 100644 index 0000000..cca78e1 Binary files /dev/null and b/Assets/Sounds/Menu/SOUND_0913.mp3 differ diff --git a/Assets/Sounds/Menu/SOUND_0913.mp3.meta b/Assets/Sounds/Menu/SOUND_0913.mp3.meta new file mode 100644 index 0000000..385e765 --- /dev/null +++ b/Assets/Sounds/Menu/SOUND_0913.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 5f74fca9ead45094d970759f92b2770d +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu/SOUND_0914.mp3 b/Assets/Sounds/Menu/SOUND_0914.mp3 new file mode 100644 index 0000000..c15e489 Binary files /dev/null and b/Assets/Sounds/Menu/SOUND_0914.mp3 differ diff --git a/Assets/Sounds/Menu/SOUND_0914.mp3.meta b/Assets/Sounds/Menu/SOUND_0914.mp3.meta new file mode 100644 index 0000000..85e9b76 --- /dev/null +++ b/Assets/Sounds/Menu/SOUND_0914.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 185daf75a038bc84999a31e728d592ef +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Menu/SOUND_0915.mp3 b/Assets/Sounds/Menu/SOUND_0915.mp3 new file mode 100644 index 0000000..474abf6 Binary files /dev/null and b/Assets/Sounds/Menu/SOUND_0915.mp3 differ diff --git a/Assets/Sounds/Menu/SOUND_0915.mp3.meta b/Assets/Sounds/Menu/SOUND_0915.mp3.meta new file mode 100644 index 0000000..ec77d9c --- /dev/null +++ b/Assets/Sounds/Menu/SOUND_0915.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 4e3b944a756f1e841ade8a841ddf7862 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Monster.meta b/Assets/Sounds/Monster.meta new file mode 100644 index 0000000..799f5c9 --- /dev/null +++ b/Assets/Sounds/Monster.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e0d028b085d5eac45a275da3e390acb6 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav b/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav new file mode 100644 index 0000000..39e52b4 Binary files /dev/null and b/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav differ diff --git a/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav.meta b/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav.meta new file mode 100644 index 0000000..3e40abd --- /dev/null +++ b/Assets/Sounds/Monster/Iron Scrape Reverb 03.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: dc55509f44f11a24aa0acf11bbda499a +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/PickItem.mp3 b/Assets/Sounds/PickItem.mp3 new file mode 100644 index 0000000..d31212d Binary files /dev/null and b/Assets/Sounds/PickItem.mp3 differ diff --git a/Assets/Sounds/PickItem.mp3.meta b/Assets/Sounds/PickItem.mp3.meta new file mode 100644 index 0000000..fac5685 --- /dev/null +++ b/Assets/Sounds/PickItem.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: abfff2ad6c48f53418766bf46f102e3b +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/SH2 Game Over (Secret).mp3 b/Assets/Sounds/SH2 Game Over (Secret).mp3 new file mode 100644 index 0000000..fece83a Binary files /dev/null and b/Assets/Sounds/SH2 Game Over (Secret).mp3 differ diff --git a/Assets/Sounds/SH2 Game Over (Secret).mp3.meta b/Assets/Sounds/SH2 Game Over (Secret).mp3.meta new file mode 100644 index 0000000..2d4bcd1 --- /dev/null +++ b/Assets/Sounds/SH2 Game Over (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 2b8384f8677acc54c866e39ad68d90fa +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/SH2 Start Game (Secret).mp3 b/Assets/Sounds/SH2 Start Game (Secret).mp3 new file mode 100644 index 0000000..6efef29 Binary files /dev/null and b/Assets/Sounds/SH2 Start Game (Secret).mp3 differ diff --git a/Assets/Sounds/SH2 Start Game (Secret).mp3.meta b/Assets/Sounds/SH2 Start Game (Secret).mp3.meta new file mode 100644 index 0000000..bfc81a0 --- /dev/null +++ b/Assets/Sounds/SH2 Start Game (Secret).mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: c11d8a12b76dab349a01724b8d854b28 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Shot.meta b/Assets/Sounds/Shot.meta new file mode 100644 index 0000000..1f2b3e9 --- /dev/null +++ b/Assets/Sounds/Shot.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: a8bee0c618f0aac46a2e94524b9fb92d +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Shot/GunShot0.mp3 b/Assets/Sounds/Shot/GunShot0.mp3 new file mode 100644 index 0000000..9a3f93f Binary files /dev/null and b/Assets/Sounds/Shot/GunShot0.mp3 differ diff --git a/Assets/Sounds/Shot/GunShot0.mp3.meta b/Assets/Sounds/Shot/GunShot0.mp3.meta new file mode 100644 index 0000000..3280ff3 --- /dev/null +++ b/Assets/Sounds/Shot/GunShot0.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: c97554dbf06cd4745b12d0937cd8b046 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Shot/GunShot1.mp3 b/Assets/Sounds/Shot/GunShot1.mp3 new file mode 100644 index 0000000..bed067f Binary files /dev/null and b/Assets/Sounds/Shot/GunShot1.mp3 differ diff --git a/Assets/Sounds/Shot/GunShot1.mp3.meta b/Assets/Sounds/Shot/GunShot1.mp3.meta new file mode 100644 index 0000000..b8a8fce --- /dev/null +++ b/Assets/Sounds/Shot/GunShot1.mp3.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 430d55c8c4d26e94b848983649b9a112 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Switch.meta b/Assets/Sounds/Switch.meta new file mode 100644 index 0000000..505e63b --- /dev/null +++ b/Assets/Sounds/Switch.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 7a63433e6430f8a42b9d51026a1268c7 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sounds/Switch/SwitchOff.wav b/Assets/Sounds/Switch/SwitchOff.wav new file mode 100644 index 0000000..66c894d Binary files /dev/null and b/Assets/Sounds/Switch/SwitchOff.wav differ diff --git a/Assets/Sounds/Switch/SwitchOff.wav.meta b/Assets/Sounds/Switch/SwitchOff.wav.meta new file mode 100644 index 0000000..fd3af32 --- /dev/null +++ b/Assets/Sounds/Switch/SwitchOff.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: c33efe7f77ab307469e99d2f24ddc7e2 +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 1 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/Switch/SwitchOn.wav b/Assets/Sounds/Switch/SwitchOn.wav new file mode 100644 index 0000000..537349d Binary files /dev/null and b/Assets/Sounds/Switch/SwitchOn.wav differ diff --git a/Assets/Sounds/Switch/SwitchOn.wav.meta b/Assets/Sounds/Switch/SwitchOn.wav.meta new file mode 100644 index 0000000..5662157 --- /dev/null +++ b/Assets/Sounds/Switch/SwitchOn.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 0ea465544373c124eb3fa58061e6db1d +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 1 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sounds/The Swarm.wav b/Assets/Sounds/The Swarm.wav new file mode 100644 index 0000000..1f7bfb0 Binary files /dev/null and b/Assets/Sounds/The Swarm.wav differ diff --git a/Assets/Sounds/The Swarm.wav.meta b/Assets/Sounds/The Swarm.wav.meta new file mode 100644 index 0000000..f5abd0a --- /dev/null +++ b/Assets/Sounds/The Swarm.wav.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 3fb8668fcba379d4db41e848296a878a +AudioImporter: + serializedVersion: 5 + format: 0 + loadType: 1 + quality: 1 + sampleRate: 0 + forceToMono: 0 + preloadAudioData: 1 + loadInBackground: 0 + overrideSampleRate: 0 + optimizeSampleRate: 0 + 3D: 1 + userData: + assetBundleName: diff --git a/Assets/Sprites.meta b/Assets/Sprites.meta new file mode 100644 index 0000000..e2c86dd --- /dev/null +++ b/Assets/Sprites.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 678acbe08f0497e4ba73d8c1acc4bca1 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Door 1.controller b/Assets/Sprites/Door 1.controller new file mode 100644 index 0000000..e26534a Binary files /dev/null and b/Assets/Sprites/Door 1.controller differ diff --git a/Assets/Sprites/Door 1.controller.meta b/Assets/Sprites/Door 1.controller.meta new file mode 100644 index 0000000..e50f66d --- /dev/null +++ b/Assets/Sprites/Door 1.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 39c606863ac1c5644b49ee5bef02aee2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Door.controller b/Assets/Sprites/Door.controller new file mode 100644 index 0000000..71828dc Binary files /dev/null and b/Assets/Sprites/Door.controller differ diff --git a/Assets/Sprites/Door.controller.meta b/Assets/Sprites/Door.controller.meta new file mode 100644 index 0000000..d3872ad --- /dev/null +++ b/Assets/Sprites/Door.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e8f46220b34ef0e488688b3659d29479 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorClosed.anim b/Assets/Sprites/DoorClosed.anim new file mode 100644 index 0000000..05b27d9 Binary files /dev/null and b/Assets/Sprites/DoorClosed.anim differ diff --git a/Assets/Sprites/DoorClosed.anim.meta b/Assets/Sprites/DoorClosed.anim.meta new file mode 100644 index 0000000..2bedd78 --- /dev/null +++ b/Assets/Sprites/DoorClosed.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 900a4a24ec4e3f94ebc8ae8ea0581e73 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorClosing.anim b/Assets/Sprites/DoorClosing.anim new file mode 100644 index 0000000..b738ce1 Binary files /dev/null and b/Assets/Sprites/DoorClosing.anim differ diff --git a/Assets/Sprites/DoorClosing.anim.meta b/Assets/Sprites/DoorClosing.anim.meta new file mode 100644 index 0000000..1af88c3 --- /dev/null +++ b/Assets/Sprites/DoorClosing.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 46f9861c4945f9b44ae769e3ec56232f +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF0.anim b/Assets/Sprites/DoorF0.anim new file mode 100644 index 0000000..ae825ba Binary files /dev/null and b/Assets/Sprites/DoorF0.anim differ diff --git a/Assets/Sprites/DoorF0.anim.meta b/Assets/Sprites/DoorF0.anim.meta new file mode 100644 index 0000000..193e0db --- /dev/null +++ b/Assets/Sprites/DoorF0.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 124dba4a648120e428aea41e690a8c7a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF1.anim b/Assets/Sprites/DoorF1.anim new file mode 100644 index 0000000..4b83d73 Binary files /dev/null and b/Assets/Sprites/DoorF1.anim differ diff --git a/Assets/Sprites/DoorF1.anim.meta b/Assets/Sprites/DoorF1.anim.meta new file mode 100644 index 0000000..a5f6908 --- /dev/null +++ b/Assets/Sprites/DoorF1.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 32fe524e0797779449d81075250836e1 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF2.anim b/Assets/Sprites/DoorF2.anim new file mode 100644 index 0000000..2c4864b Binary files /dev/null and b/Assets/Sprites/DoorF2.anim differ diff --git a/Assets/Sprites/DoorF2.anim.meta b/Assets/Sprites/DoorF2.anim.meta new file mode 100644 index 0000000..7f77cc9 --- /dev/null +++ b/Assets/Sprites/DoorF2.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: fc0f2ede81448a245bdae6f2323372ad +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF3.anim b/Assets/Sprites/DoorF3.anim new file mode 100644 index 0000000..715435c Binary files /dev/null and b/Assets/Sprites/DoorF3.anim differ diff --git a/Assets/Sprites/DoorF3.anim.meta b/Assets/Sprites/DoorF3.anim.meta new file mode 100644 index 0000000..65d9417 --- /dev/null +++ b/Assets/Sprites/DoorF3.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e83b999f38f5b704181467011337446e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF4.anim b/Assets/Sprites/DoorF4.anim new file mode 100644 index 0000000..b28dc28 Binary files /dev/null and b/Assets/Sprites/DoorF4.anim differ diff --git a/Assets/Sprites/DoorF4.anim.meta b/Assets/Sprites/DoorF4.anim.meta new file mode 100644 index 0000000..37226ef --- /dev/null +++ b/Assets/Sprites/DoorF4.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 33b58768b2406734cbff36001f3663bc +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF5.anim b/Assets/Sprites/DoorF5.anim new file mode 100644 index 0000000..a02c3fe Binary files /dev/null and b/Assets/Sprites/DoorF5.anim differ diff --git a/Assets/Sprites/DoorF5.anim.meta b/Assets/Sprites/DoorF5.anim.meta new file mode 100644 index 0000000..8fed59f --- /dev/null +++ b/Assets/Sprites/DoorF5.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 7f2e16be6ba91bb48b77cab70f7e9c35 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorF6.anim b/Assets/Sprites/DoorF6.anim new file mode 100644 index 0000000..54bb837 Binary files /dev/null and b/Assets/Sprites/DoorF6.anim differ diff --git a/Assets/Sprites/DoorF6.anim.meta b/Assets/Sprites/DoorF6.anim.meta new file mode 100644 index 0000000..1c494fe --- /dev/null +++ b/Assets/Sprites/DoorF6.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 78595edae90eb5a4085008177bb9bee1 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorOpen.anim b/Assets/Sprites/DoorOpen.anim new file mode 100644 index 0000000..4bdbea8 Binary files /dev/null and b/Assets/Sprites/DoorOpen.anim differ diff --git a/Assets/Sprites/DoorOpen.anim.meta b/Assets/Sprites/DoorOpen.anim.meta new file mode 100644 index 0000000..8a29910 --- /dev/null +++ b/Assets/Sprites/DoorOpen.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ac8ceae94bb2ff74784c5e2b49514921 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/DoorOpened.anim b/Assets/Sprites/DoorOpened.anim new file mode 100644 index 0000000..290f523 Binary files /dev/null and b/Assets/Sprites/DoorOpened.anim differ diff --git a/Assets/Sprites/DoorOpened.anim.meta b/Assets/Sprites/DoorOpened.anim.meta new file mode 100644 index 0000000..5bf617c --- /dev/null +++ b/Assets/Sprites/DoorOpened.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 169122c2b10ea3a428c132390ebf82be +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Explosion.anim b/Assets/Sprites/Explosion.anim new file mode 100644 index 0000000..6accd97 Binary files /dev/null and b/Assets/Sprites/Explosion.anim differ diff --git a/Assets/Sprites/Explosion.anim.meta b/Assets/Sprites/Explosion.anim.meta new file mode 100644 index 0000000..b34e838 --- /dev/null +++ b/Assets/Sprites/Explosion.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 731c8db796bdceb4d8a1e2d5d9a54d2e +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/ExplosionInvisible.anim b/Assets/Sprites/ExplosionInvisible.anim new file mode 100644 index 0000000..c669453 Binary files /dev/null and b/Assets/Sprites/ExplosionInvisible.anim differ diff --git a/Assets/Sprites/ExplosionInvisible.anim.meta b/Assets/Sprites/ExplosionInvisible.anim.meta new file mode 100644 index 0000000..550dd1b --- /dev/null +++ b/Assets/Sprites/ExplosionInvisible.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6c804822d841aec40bc72fbc834552de +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Fan.meta b/Assets/Sprites/Fan.meta new file mode 100644 index 0000000..65f4e1c --- /dev/null +++ b/Assets/Sprites/Fan.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 1afcb83199867634cbc5fe665786b8c5 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Fan/Fan_p0.png b/Assets/Sprites/Fan/Fan_p0.png new file mode 100644 index 0000000..952d46b Binary files /dev/null and b/Assets/Sprites/Fan/Fan_p0.png differ diff --git a/Assets/Sprites/Fan/Fan_p0.png.meta b/Assets/Sprites/Fan/Fan_p0.png.meta new file mode 100644 index 0000000..e11f6e1 --- /dev/null +++ b/Assets/Sprites/Fan/Fan_p0.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: b07588539b2c49c4591a48e124df8b08 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: Fan_p0 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Fan/Fan_p1.png b/Assets/Sprites/Fan/Fan_p1.png new file mode 100644 index 0000000..85f49e1 Binary files /dev/null and b/Assets/Sprites/Fan/Fan_p1.png differ diff --git a/Assets/Sprites/Fan/Fan_p1.png.meta b/Assets/Sprites/Fan/Fan_p1.png.meta new file mode 100644 index 0000000..c033d43 --- /dev/null +++ b/Assets/Sprites/Fan/Fan_p1.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 1f86fffa03f983c49a127516edbaed2e +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: Fan_p1 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/GunFlash.anim b/Assets/Sprites/GunFlash.anim new file mode 100644 index 0000000..665a533 Binary files /dev/null and b/Assets/Sprites/GunFlash.anim differ diff --git a/Assets/Sprites/GunFlash.anim.meta b/Assets/Sprites/GunFlash.anim.meta new file mode 100644 index 0000000..dbb5fc9 --- /dev/null +++ b/Assets/Sprites/GunFlash.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b7cf9bd583f86d04ab9f8598dca4137a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/GunFlash.controller b/Assets/Sprites/GunFlash.controller new file mode 100644 index 0000000..9e3cc84 Binary files /dev/null and b/Assets/Sprites/GunFlash.controller differ diff --git a/Assets/Sprites/GunFlash.controller.meta b/Assets/Sprites/GunFlash.controller.meta new file mode 100644 index 0000000..1e6dbc5 --- /dev/null +++ b/Assets/Sprites/GunFlash.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6fd70a26b55459242a2d69f1e36f34a2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/GunFlashIdle.anim b/Assets/Sprites/GunFlashIdle.anim new file mode 100644 index 0000000..6b31037 Binary files /dev/null and b/Assets/Sprites/GunFlashIdle.anim differ diff --git a/Assets/Sprites/GunFlashIdle.anim.meta b/Assets/Sprites/GunFlashIdle.anim.meta new file mode 100644 index 0000000..3cb8086 --- /dev/null +++ b/Assets/Sprites/GunFlashIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0b79b6b40f567804f93b0292fbac84f4 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Guns.meta b/Assets/Sprites/Guns.meta new file mode 100644 index 0000000..f131f38 --- /dev/null +++ b/Assets/Sprites/Guns.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: fe0987055fa3cb54dab860d4fac7e461 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png b/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png new file mode 100644 index 0000000..5cb7a24 Binary files /dev/null and b/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png differ diff --git a/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png.meta b/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png.meta new file mode 100644 index 0000000..0ffff58 --- /dev/null +++ b/Assets/Sprites/Guns/Halo_Weapon_Sprite_Sheet_1_by_Drakojan14.png.meta @@ -0,0 +1,168 @@ +fileFormatVersion: 2 +guid: b3657231b1839a0408be0f54fcc1ca48 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: Halo_Weapon_Sprite_Sheet_1_by_Drakojan14 + - first: + 213: 21300002 + second: Pistol_0 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 8192 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 50 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: Pistol_0 + rect: + serializedVersion: 2 + x: 304 + y: 505 + width: 28 + height: 18 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + Pistol_0: 21300002 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Keys.meta b/Assets/Sprites/Keys.meta new file mode 100644 index 0000000..1f4fada --- /dev/null +++ b/Assets/Sprites/Keys.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: dfd01b70e17d38e4a9c7195156137911 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Keys/Keycard.png b/Assets/Sprites/Keys/Keycard.png new file mode 100644 index 0000000..aa09d0f Binary files /dev/null and b/Assets/Sprites/Keys/Keycard.png differ diff --git a/Assets/Sprites/Keys/Keycard.png.meta b/Assets/Sprites/Keys/Keycard.png.meta new file mode 100644 index 0000000..8939c25 --- /dev/null +++ b/Assets/Sprites/Keys/Keycard.png.meta @@ -0,0 +1,193 @@ +fileFormatVersion: 2 +guid: 183e298ebb06f0c48a195eeb1c31f603 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: Keycard + - first: + 213: 21300002 + second: CardSmall + - first: + 213: 21300004 + second: CardLarge + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 8192 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 60 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: CardSmall + rect: + serializedVersion: 2 + x: 55 + y: 87 + width: 26 + height: 17 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: CardLarge + rect: + serializedVersion: 2 + x: 93 + y: 2 + width: 160 + height: 102 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42305410000000000800000000000000 + internalID: 21300004 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + CardLarge: 21300004 + CardSmall: 21300002 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Mine 1.controller b/Assets/Sprites/Mine 1.controller new file mode 100644 index 0000000..1753d85 Binary files /dev/null and b/Assets/Sprites/Mine 1.controller differ diff --git a/Assets/Sprites/Mine 1.controller.meta b/Assets/Sprites/Mine 1.controller.meta new file mode 100644 index 0000000..8dcafba --- /dev/null +++ b/Assets/Sprites/Mine 1.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8f4117652070937418c0be37952d51e6 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Mine.controller b/Assets/Sprites/Mine.controller new file mode 100644 index 0000000..980328d Binary files /dev/null and b/Assets/Sprites/Mine.controller differ diff --git a/Assets/Sprites/Mine.controller.meta b/Assets/Sprites/Mine.controller.meta new file mode 100644 index 0000000..a27c7e6 --- /dev/null +++ b/Assets/Sprites/Mine.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6d0ff663601ed7d4e9265c806613fd17 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/MineIdle.anim b/Assets/Sprites/MineIdle.anim new file mode 100644 index 0000000..2e5bd1a Binary files /dev/null and b/Assets/Sprites/MineIdle.anim differ diff --git a/Assets/Sprites/MineIdle.anim.meta b/Assets/Sprites/MineIdle.anim.meta new file mode 100644 index 0000000..ac69960 --- /dev/null +++ b/Assets/Sprites/MineIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: dfd4e578d4eaedb47b138828398ff023 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerAttack.anim b/Assets/Sprites/PlayerAttack.anim new file mode 100644 index 0000000..587325f Binary files /dev/null and b/Assets/Sprites/PlayerAttack.anim differ diff --git a/Assets/Sprites/PlayerAttack.anim.meta b/Assets/Sprites/PlayerAttack.anim.meta new file mode 100644 index 0000000..23381f8 --- /dev/null +++ b/Assets/Sprites/PlayerAttack.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 00c43fd45f4da4c478c8177a59924997 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerCrouch.anim b/Assets/Sprites/PlayerCrouch.anim new file mode 100644 index 0000000..4f02879 Binary files /dev/null and b/Assets/Sprites/PlayerCrouch.anim differ diff --git a/Assets/Sprites/PlayerCrouch.anim.meta b/Assets/Sprites/PlayerCrouch.anim.meta new file mode 100644 index 0000000..bd041a4 --- /dev/null +++ b/Assets/Sprites/PlayerCrouch.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6bcd4b926b78e59489dc8657105f0f12 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerCrouchGunIdle.anim b/Assets/Sprites/PlayerCrouchGunIdle.anim new file mode 100644 index 0000000..9572431 Binary files /dev/null and b/Assets/Sprites/PlayerCrouchGunIdle.anim differ diff --git a/Assets/Sprites/PlayerCrouchGunIdle.anim.meta b/Assets/Sprites/PlayerCrouchGunIdle.anim.meta new file mode 100644 index 0000000..f3cdbc6 --- /dev/null +++ b/Assets/Sprites/PlayerCrouchGunIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2ef685bc121df644cad4e2ad45cf1208 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerCrouchIdle.anim b/Assets/Sprites/PlayerCrouchIdle.anim new file mode 100644 index 0000000..89b8d1c Binary files /dev/null and b/Assets/Sprites/PlayerCrouchIdle.anim differ diff --git a/Assets/Sprites/PlayerCrouchIdle.anim.meta b/Assets/Sprites/PlayerCrouchIdle.anim.meta new file mode 100644 index 0000000..ce37d79 --- /dev/null +++ b/Assets/Sprites/PlayerCrouchIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d67e3c27704789b4983c01e0c18e2e4c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerCrouchUp.anim b/Assets/Sprites/PlayerCrouchUp.anim new file mode 100644 index 0000000..ab8c589 Binary files /dev/null and b/Assets/Sprites/PlayerCrouchUp.anim differ diff --git a/Assets/Sprites/PlayerCrouchUp.anim.meta b/Assets/Sprites/PlayerCrouchUp.anim.meta new file mode 100644 index 0000000..42f62cc --- /dev/null +++ b/Assets/Sprites/PlayerCrouchUp.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e772c4b7231ddef4d810d8cbab31ae08 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerCrushSomething.anim b/Assets/Sprites/PlayerCrushSomething.anim new file mode 100644 index 0000000..6439dd8 Binary files /dev/null and b/Assets/Sprites/PlayerCrushSomething.anim differ diff --git a/Assets/Sprites/PlayerCrushSomething.anim.meta b/Assets/Sprites/PlayerCrushSomething.anim.meta new file mode 100644 index 0000000..0764878 --- /dev/null +++ b/Assets/Sprites/PlayerCrushSomething.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 95611bff43d171f459049629efd4fed5 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerDie.anim b/Assets/Sprites/PlayerDie.anim new file mode 100644 index 0000000..a3a0eb7 Binary files /dev/null and b/Assets/Sprites/PlayerDie.anim differ diff --git a/Assets/Sprites/PlayerDie.anim.meta b/Assets/Sprites/PlayerDie.anim.meta new file mode 100644 index 0000000..19142b2 --- /dev/null +++ b/Assets/Sprites/PlayerDie.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 35d34af0df3366142b9da4481b85ab70 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJump.anim b/Assets/Sprites/PlayerJump.anim new file mode 100644 index 0000000..32c123f Binary files /dev/null and b/Assets/Sprites/PlayerJump.anim differ diff --git a/Assets/Sprites/PlayerJump.anim.meta b/Assets/Sprites/PlayerJump.anim.meta new file mode 100644 index 0000000..299e130 --- /dev/null +++ b/Assets/Sprites/PlayerJump.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f68f446d30dc2a542b7027031686c0e7 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF0.anim b/Assets/Sprites/PlayerJumpF0.anim new file mode 100644 index 0000000..5883e4c Binary files /dev/null and b/Assets/Sprites/PlayerJumpF0.anim differ diff --git a/Assets/Sprites/PlayerJumpF0.anim.meta b/Assets/Sprites/PlayerJumpF0.anim.meta new file mode 100644 index 0000000..d04a5c1 --- /dev/null +++ b/Assets/Sprites/PlayerJumpF0.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e1304a4969603d34e957a1266ac9b422 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF1.anim b/Assets/Sprites/PlayerJumpF1.anim new file mode 100644 index 0000000..6d39944 Binary files /dev/null and b/Assets/Sprites/PlayerJumpF1.anim differ diff --git a/Assets/Sprites/PlayerJumpF1.anim.meta b/Assets/Sprites/PlayerJumpF1.anim.meta new file mode 100644 index 0000000..d6760e3 --- /dev/null +++ b/Assets/Sprites/PlayerJumpF1.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 97b8fe62f27fcee47bdd9a849a7d897f +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF2.anim b/Assets/Sprites/PlayerJumpF2.anim new file mode 100644 index 0000000..d5ce751 Binary files /dev/null and b/Assets/Sprites/PlayerJumpF2.anim differ diff --git a/Assets/Sprites/PlayerJumpF2.anim.meta b/Assets/Sprites/PlayerJumpF2.anim.meta new file mode 100644 index 0000000..736200e --- /dev/null +++ b/Assets/Sprites/PlayerJumpF2.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b7ae83df59f96174f9a02c4c7a8739e9 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF3.anim b/Assets/Sprites/PlayerJumpF3.anim new file mode 100644 index 0000000..516a2ab Binary files /dev/null and b/Assets/Sprites/PlayerJumpF3.anim differ diff --git a/Assets/Sprites/PlayerJumpF3.anim.meta b/Assets/Sprites/PlayerJumpF3.anim.meta new file mode 100644 index 0000000..d85db6f --- /dev/null +++ b/Assets/Sprites/PlayerJumpF3.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4c95b4e8593988745b020fcc3d39d591 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF4.anim b/Assets/Sprites/PlayerJumpF4.anim new file mode 100644 index 0000000..e7dbd8b Binary files /dev/null and b/Assets/Sprites/PlayerJumpF4.anim differ diff --git a/Assets/Sprites/PlayerJumpF4.anim.meta b/Assets/Sprites/PlayerJumpF4.anim.meta new file mode 100644 index 0000000..b045f77 --- /dev/null +++ b/Assets/Sprites/PlayerJumpF4.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1ded9f7dd86182043a671de4d7b521d4 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerJumpF5.anim b/Assets/Sprites/PlayerJumpF5.anim new file mode 100644 index 0000000..b3b9936 Binary files /dev/null and b/Assets/Sprites/PlayerJumpF5.anim differ diff --git a/Assets/Sprites/PlayerJumpF5.anim.meta b/Assets/Sprites/PlayerJumpF5.anim.meta new file mode 100644 index 0000000..c769ab2 --- /dev/null +++ b/Assets/Sprites/PlayerJumpF5.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1156cc6d84602c84e89c3334a854ea8a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerRun.anim b/Assets/Sprites/PlayerRun.anim new file mode 100644 index 0000000..bc655ba Binary files /dev/null and b/Assets/Sprites/PlayerRun.anim differ diff --git a/Assets/Sprites/PlayerRun.anim.meta b/Assets/Sprites/PlayerRun.anim.meta new file mode 100644 index 0000000..580f9cc --- /dev/null +++ b/Assets/Sprites/PlayerRun.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f203abe5682fb0c4d9170c548f683ce2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerStandIdle.anim b/Assets/Sprites/PlayerStandIdle.anim new file mode 100644 index 0000000..89de2f1 Binary files /dev/null and b/Assets/Sprites/PlayerStandIdle.anim differ diff --git a/Assets/Sprites/PlayerStandIdle.anim.meta b/Assets/Sprites/PlayerStandIdle.anim.meta new file mode 100644 index 0000000..63b14b5 --- /dev/null +++ b/Assets/Sprites/PlayerStandIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 54adb75c64d3bc04cb8ef076da5ede19 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerStandWeaponIdle.anim b/Assets/Sprites/PlayerStandWeaponIdle.anim new file mode 100644 index 0000000..bed7fca Binary files /dev/null and b/Assets/Sprites/PlayerStandWeaponIdle.anim differ diff --git a/Assets/Sprites/PlayerStandWeaponIdle.anim.meta b/Assets/Sprites/PlayerStandWeaponIdle.anim.meta new file mode 100644 index 0000000..f78bb2c --- /dev/null +++ b/Assets/Sprites/PlayerStandWeaponIdle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 5a22c7e9af8be32469c417bc6970127b +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerWalk.anim b/Assets/Sprites/PlayerWalk.anim new file mode 100644 index 0000000..1483596 Binary files /dev/null and b/Assets/Sprites/PlayerWalk.anim differ diff --git a/Assets/Sprites/PlayerWalk.anim.meta b/Assets/Sprites/PlayerWalk.anim.meta new file mode 100644 index 0000000..b2145a2 --- /dev/null +++ b/Assets/Sprites/PlayerWalk.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1f6c7819c7be64744af000c5abdffe1c +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerWalkDown.anim b/Assets/Sprites/PlayerWalkDown.anim new file mode 100644 index 0000000..3051dcd Binary files /dev/null and b/Assets/Sprites/PlayerWalkDown.anim differ diff --git a/Assets/Sprites/PlayerWalkDown.anim.meta b/Assets/Sprites/PlayerWalkDown.anim.meta new file mode 100644 index 0000000..769d160 --- /dev/null +++ b/Assets/Sprites/PlayerWalkDown.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 07436310c532adb4881c72abcfc5dea2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/PlayerWalkUp.anim b/Assets/Sprites/PlayerWalkUp.anim new file mode 100644 index 0000000..347f8b3 Binary files /dev/null and b/Assets/Sprites/PlayerWalkUp.anim differ diff --git a/Assets/Sprites/PlayerWalkUp.anim.meta b/Assets/Sprites/PlayerWalkUp.anim.meta new file mode 100644 index 0000000..7ce6152 --- /dev/null +++ b/Assets/Sprites/PlayerWalkUp.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 75ad2198e46f0534c927b8121c063044 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Save.meta b/Assets/Sprites/Save.meta new file mode 100644 index 0000000..3f363f0 --- /dev/null +++ b/Assets/Sprites/Save.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 9f36c0cf412aec34bb4f88bdebcf3624 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/Save/circle6.png b/Assets/Sprites/Save/circle6.png new file mode 100644 index 0000000..fe02578 Binary files /dev/null and b/Assets/Sprites/Save/circle6.png differ diff --git a/Assets/Sprites/Save/circle6.png.meta b/Assets/Sprites/Save/circle6.png.meta new file mode 100644 index 0000000..7c03acc --- /dev/null +++ b/Assets/Sprites/Save/circle6.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 2892f82f4c69ac145ab07670f7889c01 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: circle6 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 8192 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 200 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Save/circle61.png b/Assets/Sprites/Save/circle61.png new file mode 100644 index 0000000..1b6f1ea Binary files /dev/null and b/Assets/Sprites/Save/circle61.png differ diff --git a/Assets/Sprites/Save/circle61.png.meta b/Assets/Sprites/Save/circle61.png.meta new file mode 100644 index 0000000..f27643d --- /dev/null +++ b/Assets/Sprites/Save/circle61.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 719168b5646d2774fbd52f009a18d827 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: circle61 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 75 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Save/circle62.png b/Assets/Sprites/Save/circle62.png new file mode 100644 index 0000000..8f7ebdf Binary files /dev/null and b/Assets/Sprites/Save/circle62.png differ diff --git a/Assets/Sprites/Save/circle62.png.meta b/Assets/Sprites/Save/circle62.png.meta new file mode 100644 index 0000000..85366fd --- /dev/null +++ b/Assets/Sprites/Save/circle62.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 50a5d865f204a6542a4e8e247c6ddebc +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: circle62 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 75 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Save/circle63.png b/Assets/Sprites/Save/circle63.png new file mode 100644 index 0000000..80d4c47 Binary files /dev/null and b/Assets/Sprites/Save/circle63.png differ diff --git a/Assets/Sprites/Save/circle63.png.meta b/Assets/Sprites/Save/circle63.png.meta new file mode 100644 index 0000000..bf8e452 --- /dev/null +++ b/Assets/Sprites/Save/circle63.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 3eec7f10e4bdd8c4da7b8846bd13df5e +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: circle63 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 30 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/explosion.png b/Assets/Sprites/explosion.png new file mode 100644 index 0000000..0e420ff Binary files /dev/null and b/Assets/Sprites/explosion.png differ diff --git a/Assets/Sprites/explosion.png.meta b/Assets/Sprites/explosion.png.meta new file mode 100644 index 0000000..df18760 --- /dev/null +++ b/Assets/Sprites/explosion.png.meta @@ -0,0 +1,543 @@ +fileFormatVersion: 2 +guid: c60a1b6a67280984bab217bd238d49ad +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: explosion + - first: + 213: 21300002 + second: explosion_0 + - first: + 213: 21300004 + second: explosion_1 + - first: + 213: 21300006 + second: explosion_2 + - first: + 213: 21300008 + second: explosion_3 + - first: + 213: 21300010 + second: explosion_4 + - first: + 213: 21300012 + second: explosion_5 + - first: + 213: 21300014 + second: explosion_6 + - first: + 213: 21300016 + second: explosion_7 + - first: + 213: 21300018 + second: explosion_8 + - first: + 213: 21300020 + second: explosion_9 + - first: + 213: 21300022 + second: explosion_10 + - first: + 213: 21300024 + second: explosion_11 + - first: + 213: 21300026 + second: explosion_12 + - first: + 213: 21300028 + second: explosion_13 + - first: + 213: 21300030 + second: explosion_14 + - first: + 213: 21300032 + second: invis + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 40 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: explosion_0 + rect: + serializedVersion: 2 + x: 0 + y: 192 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_1 + rect: + serializedVersion: 2 + x: 64 + y: 192 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42305410000000000800000000000000 + internalID: 21300004 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_2 + rect: + serializedVersion: 2 + x: 128 + y: 192 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 62305410000000000800000000000000 + internalID: 21300006 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_3 + rect: + serializedVersion: 2 + x: 192 + y: 192 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 82305410000000000800000000000000 + internalID: 21300008 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_4 + rect: + serializedVersion: 2 + x: 0 + y: 128 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a2305410000000000800000000000000 + internalID: 21300010 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_5 + rect: + serializedVersion: 2 + x: 64 + y: 128 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c2305410000000000800000000000000 + internalID: 21300012 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_6 + rect: + serializedVersion: 2 + x: 128 + y: 128 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e2305410000000000800000000000000 + internalID: 21300014 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_7 + rect: + serializedVersion: 2 + x: 192 + y: 128 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03305410000000000800000000000000 + internalID: 21300016 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_8 + rect: + serializedVersion: 2 + x: 0 + y: 64 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 23305410000000000800000000000000 + internalID: 21300018 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_9 + rect: + serializedVersion: 2 + x: 64 + y: 64 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 43305410000000000800000000000000 + internalID: 21300020 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_10 + rect: + serializedVersion: 2 + x: 128 + y: 64 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 63305410000000000800000000000000 + internalID: 21300022 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_11 + rect: + serializedVersion: 2 + x: 192 + y: 64 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 83305410000000000800000000000000 + internalID: 21300024 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_12 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a3305410000000000800000000000000 + internalID: 21300026 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_13 + rect: + serializedVersion: 2 + x: 64 + y: 0 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c3305410000000000800000000000000 + internalID: 21300028 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: explosion_14 + rect: + serializedVersion: 2 + x: 128 + y: 0 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e3305410000000000800000000000000 + internalID: 21300030 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: invis + rect: + serializedVersion: 2 + x: 192 + y: 0 + width: 64 + height: 63 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04305410000000000800000000000000 + internalID: 21300032 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + explosion_0: 21300002 + explosion_1: 21300004 + explosion_10: 21300022 + explosion_11: 21300024 + explosion_12: 21300026 + explosion_13: 21300028 + explosion_14: 21300030 + explosion_2: 21300006 + explosion_3: 21300008 + explosion_4: 21300010 + explosion_5: 21300012 + explosion_6: 21300014 + explosion_7: 21300016 + explosion_8: 21300018 + explosion_9: 21300020 + invis: 21300032 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/explosion_0.controller b/Assets/Sprites/explosion_0.controller new file mode 100644 index 0000000..dfc0dd0 Binary files /dev/null and b/Assets/Sprites/explosion_0.controller differ diff --git a/Assets/Sprites/explosion_0.controller.meta b/Assets/Sprites/explosion_0.controller.meta new file mode 100644 index 0000000..a082d1a --- /dev/null +++ b/Assets/Sprites/explosion_0.controller.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 88c08fd53c3c2b74db9154d4b8d1da54 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Sprites/images (3) — копия.png b/Assets/Sprites/images (3) — копия.png new file mode 100644 index 0000000..a11063e Binary files /dev/null and b/Assets/Sprites/images (3) — копия.png differ diff --git a/Assets/Sprites/images (3) — копия.png.meta b/Assets/Sprites/images (3) — копия.png.meta new file mode 100644 index 0000000..f69dd91 --- /dev/null +++ b/Assets/Sprites/images (3) — копия.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: d2bdbeb6482778f4c859e0f9a97691b4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/images (3).png b/Assets/Sprites/images (3).png new file mode 100644 index 0000000..6b79d7e Binary files /dev/null and b/Assets/Sprites/images (3).png differ diff --git a/Assets/Sprites/images (3).png.meta b/Assets/Sprites/images (3).png.meta new file mode 100644 index 0000000..08c4c2b --- /dev/null +++ b/Assets/Sprites/images (3).png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 2d23028eeda91b6469c728352c21115a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/minimal_industry — копия.png b/Assets/Sprites/minimal_industry — копия.png new file mode 100644 index 0000000..723e42f Binary files /dev/null and b/Assets/Sprites/minimal_industry — копия.png differ diff --git a/Assets/Sprites/minimal_industry — копия.png.meta b/Assets/Sprites/minimal_industry — копия.png.meta new file mode 100644 index 0000000..e2b046d --- /dev/null +++ b/Assets/Sprites/minimal_industry — копия.png.meta @@ -0,0 +1,1192 @@ +fileFormatVersion: 2 +guid: f15526fd9ec3618448e91eff1ffd3043 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F" + - first: + 213: 21300002 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_0" + - first: + 213: 21300004 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_1" + - first: + 213: 21300006 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_2" + - first: + 213: 21300008 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_3" + - first: + 213: 21300010 + second: Big_wall + - first: + 213: 21300012 + second: Floor + - first: + 213: 21300014 + second: VerticalLine + - first: + 213: 21300016 + second: HorizontalLine + - first: + 213: 21300018 + second: VerticalLine2 + - first: + 213: 21300020 + second: VerticalLine3 + - first: + 213: 21300022 + second: Door + - first: + 213: 21300024 + second: Door_00 + - first: + 213: 21300026 + second: Door_01 + - first: + 213: 21300028 + second: Door_02 + - first: + 213: 21300030 + second: Door_03 + - first: + 213: 21300032 + second: Door_04 + - first: + 213: 21300034 + second: Door_05 + - first: + 213: 21300036 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_17" + - first: + 213: 21300038 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_18" + - first: + 213: 21300040 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_19" + - first: + 213: 21300042 + second: DoorBG + - first: + 213: 21300044 + second: Lamp_ceiling_00 + - first: + 213: 21300046 + second: Lamp_wall + - first: + 213: 21300048 + second: Camera_wall + - first: + 213: 21300050 + second: LightCone + - first: + 213: 21300052 + second: Doorway + - first: + 213: 21300054 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_26" + - first: + 213: 21300056 + second: WallThin + - first: + 213: 21300058 + second: DoorWay_Thin + - first: + 213: 21300060 + second: CargoLift_platform + - first: + 213: 21300062 + second: CargoLift_Fence + - first: + 213: 21300064 + second: LiftController + - first: + 213: 21300066 + second: LightFloor + - first: + 213: 21300068 + second: Forklift + - first: + 213: 21300070 + second: Flashlight + - first: + 213: 21300072 + second: Flashlight_beam + - first: + 213: 21300074 + second: Floor + - first: + 213: 21300076 + second: Floor2 + - first: + 213: 21300078 + second: Fence + - first: + 213: 21300080 + second: LaserTop + - first: + 213: 21300082 + second: LaserBottom + - first: + 213: 21300084 + second: LaserRay + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 8 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_0" + rect: + serializedVersion: 2 + x: 213 + y: 144 + width: 9 + height: 2 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_1" + rect: + serializedVersion: 2 + x: 226 + y: 137 + width: 9 + height: 2 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42305410000000000800000000000000 + internalID: 21300004 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_2" + rect: + serializedVersion: 2 + x: 213 + y: 137 + width: 9 + height: 2 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 62305410000000000800000000000000 + internalID: 21300006 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_3" + rect: + serializedVersion: 2 + x: 226 + y: 144 + width: 9 + height: 2 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 82305410000000000800000000000000 + internalID: 21300008 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Big_wall + rect: + serializedVersion: 2 + x: 361 + y: 405 + width: 9 + height: 65 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a2305410000000000800000000000000 + internalID: 21300010 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Floor + rect: + serializedVersion: 2 + x: 380 + y: 464 + width: 32 + height: 4 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c2305410000000000800000000000000 + internalID: 21300012 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: VerticalLine + rect: + serializedVersion: 2 + x: 370 + y: 407 + width: 1 + height: 61 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e2305410000000000800000000000000 + internalID: 21300014 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: HorizontalLine + rect: + serializedVersion: 2 + x: 380 + y: 451 + width: 32 + height: 1 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03305410000000000800000000000000 + internalID: 21300016 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: VerticalLine2 + rect: + serializedVersion: 2 + x: 372 + y: 407 + width: 1 + height: 63 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 23305410000000000800000000000000 + internalID: 21300018 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: VerticalLine3 + rect: + serializedVersion: 2 + x: 374 + y: 405 + width: 1 + height: 65 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 43305410000000000800000000000000 + internalID: 21300020 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door + rect: + serializedVersion: 2 + x: 397 + y: 405 + width: 15 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 63305410000000000800000000000000 + internalID: 21300022 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_00 + rect: + serializedVersion: 2 + x: 414 + y: 405 + width: 2 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 83305410000000000800000000000000 + internalID: 21300024 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_01 + rect: + serializedVersion: 2 + x: 419 + y: 405 + width: 4 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a3305410000000000800000000000000 + internalID: 21300026 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_02 + rect: + serializedVersion: 2 + x: 425 + y: 405 + width: 7 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c3305410000000000800000000000000 + internalID: 21300028 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_03 + rect: + serializedVersion: 2 + x: 434 + y: 405 + width: 10 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e3305410000000000800000000000000 + internalID: 21300030 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_04 + rect: + serializedVersion: 2 + x: 397 + y: 368 + width: 12 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04305410000000000800000000000000 + internalID: 21300032 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Door_05 + rect: + serializedVersion: 2 + x: 413 + y: 368 + width: 14 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 24305410000000000800000000000000 + internalID: 21300034 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_17" + rect: + serializedVersion: 2 + x: 378 + y: 405 + width: 2 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 44305410000000000800000000000000 + internalID: 21300036 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_18" + rect: + serializedVersion: 2 + x: 385 + y: 405 + width: 2 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64305410000000000800000000000000 + internalID: 21300038 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_19" + rect: + serializedVersion: 2 + x: 372 + y: 388 + width: 6 + height: 7 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 84305410000000000800000000000000 + internalID: 21300040 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: DoorBG + rect: + serializedVersion: 2 + x: 389 + y: 405 + width: 1 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a4305410000000000800000000000000 + internalID: 21300042 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Lamp_ceiling_00 + rect: + serializedVersion: 2 + x: 282 + y: 460 + width: 7 + height: 13 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c4305410000000000800000000000000 + internalID: 21300044 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Lamp_wall + rect: + serializedVersion: 2 + x: 281 + y: 448 + width: 8 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e4305410000000000800000000000000 + internalID: 21300046 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Camera_wall + rect: + serializedVersion: 2 + x: 283 + y: 437 + width: 6 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 05305410000000000800000000000000 + internalID: 21300048 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LightCone + rect: + serializedVersion: 2 + x: 278 + y: 351 + width: 67 + height: 54 + alignment: 2 + pivot: {x: 0.5, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 25305410000000000800000000000000 + internalID: 21300050 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Doorway + rect: + serializedVersion: 2 + x: 247 + y: 409 + width: 7 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 45305410000000000800000000000000 + internalID: 21300052 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_26" + rect: + serializedVersion: 2 + x: 12 + y: 270 + width: 61 + height: 61 + alignment: 8 + pivot: {x: 1, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 65305410000000000800000000000000 + internalID: 21300054 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WallThin + rect: + serializedVersion: 2 + x: 354 + y: 407 + width: 4 + height: 61 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 85305410000000000800000000000000 + internalID: 21300056 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: DoorWay_Thin + rect: + serializedVersion: 2 + x: 241 + y: 409 + width: 4 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a5305410000000000800000000000000 + internalID: 21300058 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: CargoLift_platform + rect: + serializedVersion: 2 + x: 181 + y: 470 + width: 67 + height: 3 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c5305410000000000800000000000000 + internalID: 21300060 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: CargoLift_Fence + rect: + serializedVersion: 2 + x: 181 + y: 473 + width: 67 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e5305410000000000800000000000000 + internalID: 21300062 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LiftController + rect: + serializedVersion: 2 + x: 239 + y: 486 + width: 6 + height: 18 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 06305410000000000800000000000000 + internalID: 21300064 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LightFloor + rect: + serializedVersion: 2 + x: 153 + y: 489 + width: 18 + height: 10 + alignment: 7 + pivot: {x: 0.5, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 26305410000000000800000000000000 + internalID: 21300066 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Forklift + rect: + serializedVersion: 2 + x: 100 + y: 480 + width: 44 + height: 39 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 46305410000000000800000000000000 + internalID: 21300068 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Flashlight + rect: + serializedVersion: 2 + x: 210 + y: 507 + width: 2 + height: 3 + alignment: 8 + pivot: {x: 1, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 66305410000000000800000000000000 + internalID: 21300070 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Flashlight_beam + rect: + serializedVersion: 2 + x: 221 + y: 518 + width: 50 + height: 33 + alignment: 5 + pivot: {x: 1, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 86305410000000000800000000000000 + internalID: 21300072 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Floor + rect: + serializedVersion: 2 + x: 147 + y: 391 + width: 16 + height: 2 + alignment: 1 + pivot: {x: 0, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 5aef5b860959c4760800000000000000 + internalID: 7443488731601174181 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Floor2 + rect: + serializedVersion: 2 + x: 67 + y: 391 + width: 72 + height: 2 + alignment: 1 + pivot: {x: 0, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c6305410000000000800000000000000 + internalID: 21300076 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Fence + rect: + serializedVersion: 2 + x: 12 + y: 367 + width: 20 + height: 20 + alignment: 1 + pivot: {x: 0, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e6305410000000000800000000000000 + internalID: 21300078 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LaserTop + rect: + serializedVersion: 2 + x: 38 + y: 621 + width: 5 + height: 2 + alignment: 1 + pivot: {x: 0, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 07305410000000000800000000000000 + internalID: 21300080 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LaserBottom + rect: + serializedVersion: 2 + x: 38 + y: 562 + width: 5 + height: 2 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 27305410000000000800000000000000 + internalID: 21300082 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: LaserRay + rect: + serializedVersion: 2 + x: 40 + y: 564 + width: 1 + height: 57 + alignment: 1 + pivot: {x: 0, y: 1} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 47305410000000000800000000000000 + internalID: 21300084 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + Big_wall: 21300010 + Camera_wall: 21300048 + CargoLift_Fence: 21300062 + CargoLift_platform: 21300060 + Door: 21300022 + DoorBG: 21300042 + DoorWay_Thin: 21300058 + Door_00: 21300024 + Door_01: 21300026 + Door_02: 21300028 + Door_03: 21300030 + Door_04: 21300032 + Door_05: 21300034 + Doorway: 21300052 + Fence: 21300078 + Flashlight: 21300070 + Flashlight_beam: 21300072 + Floor: 21300012 + Floor2: 21300076 + Forklift: 21300068 + HorizontalLine: 21300016 + Lamp_ceiling_00: 21300044 + Lamp_wall: 21300046 + LaserBottom: 21300082 + LaserRay: 21300084 + LaserTop: 21300080 + LiftController: 21300064 + LightCone: 21300050 + LightFloor: 21300066 + VerticalLine: 21300014 + VerticalLine2: 21300018 + VerticalLine3: 21300020 + WallThin: 21300056 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_0": 21300002 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_1": 21300004 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_17": 21300036 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_18": 21300038 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_19": 21300040 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_2": 21300006 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_26": 21300054 + "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F_3": 21300008 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/minimal_industry — копия.psd b/Assets/Sprites/minimal_industry — копия.psd new file mode 100644 index 0000000..9b515b7 Binary files /dev/null and b/Assets/Sprites/minimal_industry — копия.psd differ diff --git a/Assets/Sprites/minimal_industry — копия.psd.meta b/Assets/Sprites/minimal_industry — копия.psd.meta new file mode 100644 index 0000000..f635d4f --- /dev/null +++ b/Assets/Sprites/minimal_industry — копия.psd.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 4df590051416e254a8e52fdea275bc7b +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: "minimal_industry \u2014 \u043A\u043E\u043F\u0438\u044F" + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/minimal_industry.png b/Assets/Sprites/minimal_industry.png new file mode 100644 index 0000000..b9f6db9 Binary files /dev/null and b/Assets/Sprites/minimal_industry.png differ diff --git a/Assets/Sprites/minimal_industry.png.meta b/Assets/Sprites/minimal_industry.png.meta new file mode 100644 index 0000000..5e786f3 --- /dev/null +++ b/Assets/Sprites/minimal_industry.png.meta @@ -0,0 +1,4267 @@ +fileFormatVersion: 2 +guid: 84dea024d3f790b45b26dd55f2566c93 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: minimal_industry + - first: + 213: 21300002 + second: minimal_industry_0 + - first: + 213: 21300004 + second: minimal_industry_1 + - first: + 213: 21300006 + second: minimal_industry_2 + - first: + 213: 21300008 + second: minimal_industry_3 + - first: + 213: 21300010 + second: minimal_industry_4 + - first: + 213: 21300012 + second: minimal_industry_5 + - first: + 213: 21300014 + second: minimal_industry_6 + - first: + 213: 21300016 + second: minimal_industry_7 + - first: + 213: 21300018 + second: minimal_industry_8 + - first: + 213: 21300020 + second: minimal_industry_9 + - first: + 213: 21300022 + second: minimal_industry_10 + - first: + 213: 21300024 + second: minimal_industry_11 + - first: + 213: 21300026 + second: minimal_industry_12 + - first: + 213: 21300028 + second: minimal_industry_13 + - first: + 213: 21300030 + second: minimal_industry_14 + - first: + 213: 21300032 + second: minimal_industry_15 + - first: + 213: 21300034 + second: minimal_industry_16 + - first: + 213: 21300036 + second: minimal_industry_17 + - first: + 213: 21300038 + second: minimal_industry_18 + - first: + 213: 21300040 + second: minimal_industry_19 + - first: + 213: 21300042 + second: minimal_industry_20 + - first: + 213: 21300044 + second: minimal_industry_21 + - first: + 213: 21300046 + second: minimal_industry_22 + - first: + 213: 21300048 + second: WireTurnBL + - first: + 213: 21300050 + second: minimal_industry_24 + - first: + 213: 21300052 + second: TubeSmallTurnSquareBL + - first: + 213: 21300054 + second: TubeSmallTurnRoundBL + - first: + 213: 21300056 + second: minimal_industry_27 + - first: + 213: 21300058 + second: minimal_industry_28 + - first: + 213: 21300060 + second: minimal_industry_29 + - first: + 213: 21300062 + second: minimal_industry_30 + - first: + 213: 21300064 + second: minimal_industry_31 + - first: + 213: 21300066 + second: minimal_industry_32 + - first: + 213: 21300068 + second: minimal_industry_33 + - first: + 213: 21300070 + second: minimal_industry_34 + - first: + 213: 21300072 + second: minimal_industry_35 + - first: + 213: 21300074 + second: minimal_industry_36 + - first: + 213: 21300076 + second: minimal_industry_37 + - first: + 213: 21300078 + second: minimal_industry_38 + - first: + 213: 21300080 + second: minimal_industry_39 + - first: + 213: 21300082 + second: minimal_industry_40 + - first: + 213: 21300084 + second: minimal_industry_41 + - first: + 213: 21300086 + second: minimal_industry_42 + - first: + 213: 21300088 + second: minimal_industry_43 + - first: + 213: 21300090 + second: minimal_industry_44 + - first: + 213: 21300092 + second: minimal_industry_45 + - first: + 213: 21300094 + second: minimal_industry_46 + - first: + 213: 21300096 + second: minimal_industry_47 + - first: + 213: 21300098 + second: minimal_industry_48 + - first: + 213: 21300100 + second: minimal_industry_49 + - first: + 213: 21300102 + second: minimal_industry_50 + - first: + 213: 21300104 + second: minimal_industry_51 + - first: + 213: 21300106 + second: minimal_industry_52 + - first: + 213: 21300108 + second: TableMedium + - first: + 213: 21300110 + second: TableBig + - first: + 213: 21300112 + second: minimal_industry_55 + - first: + 213: 21300114 + second: minimal_industry_56 + - first: + 213: 21300116 + second: minimal_industry_57 + - first: + 213: 21300118 + second: minimal_industry_58 + - first: + 213: 21300120 + second: minimal_industry_59 + - first: + 213: 21300122 + second: minimal_industry_60 + - first: + 213: 21300124 + second: minimal_industry_61 + - first: + 213: 21300126 + second: minimal_industry_62 + - first: + 213: 21300128 + second: minimal_industry_63 + - first: + 213: 21300130 + second: minimal_industry_64 + - first: + 213: 21300132 + second: minimal_industry_65 + - first: + 213: 21300134 + second: minimal_industry_66 + - first: + 213: 21300136 + second: TubeSmallLongVertical + - first: + 213: 21300138 + second: TubeSmallTurnSquareBR + - first: + 213: 21300140 + second: TubeSmallTurnSquareTR + - first: + 213: 21300142 + second: TubeSmallTurnSquareTL + - first: + 213: 21300144 + second: TubeSmallTurnRoundBR + - first: + 213: 21300146 + second: TubeSmallTurnRoundTR + - first: + 213: 21300148 + second: TubeSmallTurnRoundTL + - first: + 213: 21300150 + second: TubeSmallMiddleVertical + - first: + 213: 21300152 + second: TubeSmallShortBottom + - first: + 213: 21300154 + second: TubeSmallShortLeft + - first: + 213: 21300156 + second: TubeSmallShortRight + - first: + 213: 21300158 + second: TubeSmallHub + - first: + 213: 21300160 + second: TubeSmallShortTop + - first: + 213: 21300162 + second: TubeSmallMiddleH + - first: + 213: 21300164 + second: TubeSmallLongH + - first: + 213: 21300166 + second: WireHub + - first: + 213: 21300168 + second: WireH + - first: + 213: 21300170 + second: WireV + - first: + 213: 21300172 + second: WireTurnTR + - first: + 213: 21300174 + second: WireTurnTL + - first: + 213: 21300176 + second: WireTurnBR + - first: + 213: 21300178 + second: minimal_industry_88 + - first: + 213: 21300180 + second: minimal_industry_89 + - first: + 213: 21300182 + second: minimal_industry_90 + - first: + 213: 21300184 + second: minimal_industry_91 + - first: + 213: 21300186 + second: minimal_industry_92 + - first: + 213: 21300188 + second: minimal_industry_93 + - first: + 213: 21300190 + second: minimal_industry_94 + - first: + 213: 21300192 + second: minimal_industry_95 + - first: + 213: 21300194 + second: minimal_industry_96 + - first: + 213: 21300196 + second: minimal_industry_97 + - first: + 213: 21300198 + second: minimal_industry_98 + - first: + 213: 21300200 + second: minimal_industry_99 + - first: + 213: 21300202 + second: minimal_industry_100 + - first: + 213: 21300204 + second: minimal_industry_101 + - first: + 213: 21300206 + second: minimal_industry_102 + - first: + 213: 21300208 + second: minimal_industry_103 + - first: + 213: 21300210 + second: minimal_industry_104 + - first: + 213: 21300212 + second: minimal_industry_105 + - first: + 213: 21300214 + second: minimal_industry_106 + - first: + 213: 21300216 + second: minimal_industry_107 + - first: + 213: 21300218 + second: minimal_industry_108 + - first: + 213: 21300220 + second: minimal_industry_109 + - first: + 213: 21300222 + second: minimal_industry_110 + - first: + 213: 21300224 + second: minimal_industry_111 + - first: + 213: 21300226 + second: minimal_industry_112 + - first: + 213: 21300228 + second: minimal_industry_113 + - first: + 213: 21300230 + second: minimal_industry_114 + - first: + 213: 21300232 + second: minimal_industry_115 + - first: + 213: 21300234 + second: minimal_industry_116 + - first: + 213: 21300236 + second: minimal_industry_117 + - first: + 213: 21300238 + second: minimal_industry_118 + - first: + 213: 21300240 + second: minimal_industry_119 + - first: + 213: 21300242 + second: minimal_industry_120 + - first: + 213: 21300244 + second: minimal_industry_121 + - first: + 213: 21300246 + second: minimal_industry_122 + - first: + 213: 21300248 + second: minimal_industry_123 + - first: + 213: 21300250 + second: minimal_industry_124 + - first: + 213: 21300252 + second: minimal_industry_125 + - first: + 213: 21300254 + second: minimal_industry_126 + - first: + 213: 21300256 + second: minimal_industry_127 + - first: + 213: 21300258 + second: minimal_industry_128 + - first: + 213: 21300260 + second: minimal_industry_129 + - first: + 213: 21300262 + second: minimal_industry_130 + - first: + 213: 21300264 + second: minimal_industry_131 + - first: + 213: 21300266 + second: minimal_industry_132 + - first: + 213: 21300268 + second: minimal_industry_133 + - first: + 213: 21300270 + second: minimal_industry_134 + - first: + 213: 21300272 + second: minimal_industry_135 + - first: + 213: 21300274 + second: minimal_industry_136 + - first: + 213: 21300276 + second: minimal_industry_137 + - first: + 213: 21300278 + second: minimal_industry_138 + - first: + 213: 21300280 + second: minimal_industry_139 + - first: + 213: 21300282 + second: minimal_industry_140 + - first: + 213: 21300284 + second: minimal_industry_141 + - first: + 213: 21300286 + second: minimal_industry_142 + - first: + 213: 21300288 + second: minimal_industry_143 + - first: + 213: 21300290 + second: minimal_industry_144 + - first: + 213: 21300292 + second: minimal_industry_145 + - first: + 213: 21300294 + second: minimal_industry_146 + - first: + 213: 21300296 + second: minimal_industry_147 + - first: + 213: 21300298 + second: minimal_industry_148 + - first: + 213: 21300300 + second: minimal_industry_149 + - first: + 213: 21300302 + second: minimal_industry_150 + - first: + 213: 21300304 + second: WireSmallHub + - first: + 213: 21300306 + second: WireSDV + - first: + 213: 21300308 + second: WireSDHPins + - first: + 213: 21300310 + second: WireSDVPins + - first: + 213: 21300312 + second: WireSDV + - first: + 213: 21300314 + second: WireSDH + - first: + 213: 21300316 + second: WireSSHPin + - first: + 213: 21300318 + second: WireSSH + - first: + 213: 21300320 + second: WireSSV + - first: + 213: 21300322 + second: WireSSVPin + - first: + 213: 21300324 + second: Switch + - first: + 213: 21300326 + second: PX1x1 + - first: + 213: 21300328 + second: PX2x1 + - first: + 213: 21300330 + second: PX1x2 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 8192 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 8 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: minimal_industry_0 + rect: + serializedVersion: 2 + x: 0 + y: 496 + width: 32 + height: 112 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_1 + rect: + serializedVersion: 2 + x: 98 + y: 609 + width: 76 + height: 30 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42305410000000000800000000000000 + internalID: 21300004 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_2 + rect: + serializedVersion: 2 + x: 272 + y: 624 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 62305410000000000800000000000000 + internalID: 21300006 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_3 + rect: + serializedVersion: 2 + x: 112 + y: 576 + width: 48 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 82305410000000000800000000000000 + internalID: 21300008 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_4 + rect: + serializedVersion: 2 + x: 98 + y: 480 + width: 156 + height: 96 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a2305410000000000800000000000000 + internalID: 21300010 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_5 + rect: + serializedVersion: 2 + x: 272 + y: 512 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c2305410000000000800000000000000 + internalID: 21300012 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_6 + rect: + serializedVersion: 2 + x: 272 + y: 464 + width: 32 + height: 48 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e2305410000000000800000000000000 + internalID: 21300014 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_7 + rect: + serializedVersion: 2 + x: 32 + y: 368 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03305410000000000800000000000000 + internalID: 21300016 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_8 + rect: + serializedVersion: 2 + x: 80 + y: 368 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 23305410000000000800000000000000 + internalID: 21300018 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_9 + rect: + serializedVersion: 2 + x: 272 + y: 368 + width: 48 + height: 48 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 43305410000000000800000000000000 + internalID: 21300020 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_10 + rect: + serializedVersion: 2 + x: 0 + y: 248 + width: 16 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 63305410000000000800000000000000 + internalID: 21300022 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_11 + rect: + serializedVersion: 2 + x: 128 + y: 352 + width: 48 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 83305410000000000800000000000000 + internalID: 21300024 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_12 + rect: + serializedVersion: 2 + x: 128 + y: 336 + width: 80 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a3305410000000000800000000000000 + internalID: 21300026 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_13 + rect: + serializedVersion: 2 + x: 337 + y: 289 + width: 30 + height: 30 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c3305410000000000800000000000000 + internalID: 21300028 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_14 + rect: + serializedVersion: 2 + x: 369 + y: 289 + width: 62 + height: 30 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e3305410000000000800000000000000 + internalID: 21300030 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_15 + rect: + serializedVersion: 2 + x: 133 + y: 288 + width: 6 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04305410000000000800000000000000 + internalID: 21300032 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_16 + rect: + serializedVersion: 2 + x: 149 + y: 288 + width: 22 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 24305410000000000800000000000000 + internalID: 21300034 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_17 + rect: + serializedVersion: 2 + x: 128 + y: 272 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 44305410000000000800000000000000 + internalID: 21300036 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_18 + rect: + serializedVersion: 2 + x: 337 + y: 225 + width: 30 + height: 62 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64305410000000000800000000000000 + internalID: 21300038 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_19 + rect: + serializedVersion: 2 + x: 0 + y: 232 + width: 16 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 84305410000000000800000000000000 + internalID: 21300040 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_20 + rect: + serializedVersion: 2 + x: 128 + y: 208 + width: 64 + height: 56 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a4305410000000000800000000000000 + internalID: 21300042 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_21 + rect: + serializedVersion: 2 + x: 0 + y: 216 + width: 16 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c4305410000000000800000000000000 + internalID: 21300044 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_22 + rect: + serializedVersion: 2 + x: 0 + y: 201 + width: 16 + height: 7 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e4305410000000000800000000000000 + internalID: 21300046 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireTurnBL + rect: + serializedVersion: 2 + x: 19 + y: 147 + width: 13 + height: 13 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 05305410000000000800000000000000 + internalID: 21300048 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_24 + rect: + serializedVersion: 2 + x: 128 + y: 144 + width: 16 + height: 56 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 25305410000000000800000000000000 + internalID: 21300050 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnSquareBL + rect: + serializedVersion: 2 + x: 21 + y: 101 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 45305410000000000800000000000000 + internalID: 21300052 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnRoundBL + rect: + serializedVersion: 2 + x: 53 + y: 101 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 65305410000000000800000000000000 + internalID: 21300054 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_27 + rect: + serializedVersion: 2 + x: 144 + y: 82 + width: 16 + height: 34 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 85305410000000000800000000000000 + internalID: 21300056 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_28 + rect: + serializedVersion: 2 + x: 82 + y: 50 + width: 14 + height: 14 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a5305410000000000800000000000000 + internalID: 21300058 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_29 + rect: + serializedVersion: 2 + x: 194 + y: 48 + width: 12 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c5305410000000000800000000000000 + internalID: 21300060 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_30 + rect: + serializedVersion: 2 + x: 208 + y: 48 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e5305410000000000800000000000000 + internalID: 21300062 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_31 + rect: + serializedVersion: 2 + x: 148 + y: 32 + width: 8 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 06305410000000000800000000000000 + internalID: 21300064 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_32 + rect: + serializedVersion: 2 + x: 131 + y: 16 + width: 10 + height: 14 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 26305410000000000800000000000000 + internalID: 21300066 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_33 + rect: + serializedVersion: 2 + x: 144 + y: 0 + width: 16 + height: 26 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 46305410000000000800000000000000 + internalID: 21300068 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_34 + rect: + serializedVersion: 2 + x: 179 + y: 0 + width: 10 + height: 28 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 66305410000000000800000000000000 + internalID: 21300070 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_35 + rect: + serializedVersion: 2 + x: 195 + y: 0 + width: 10 + height: 27 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 86305410000000000800000000000000 + internalID: 21300072 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_36 + rect: + serializedVersion: 2 + x: 211 + y: 0 + width: 10 + height: 28 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a6305410000000000800000000000000 + internalID: 21300074 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_37 + rect: + serializedVersion: 2 + x: 132 + y: 0 + width: 8 + height: 9 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c6305410000000000800000000000000 + internalID: 21300076 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_38 + rect: + serializedVersion: 2 + x: 32 + y: 576 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e6305410000000000800000000000000 + internalID: 21300078 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_39 + rect: + serializedVersion: 2 + x: 32 + y: 400 + width: 64 + height: 176 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 07305410000000000800000000000000 + internalID: 21300080 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_40 + rect: + serializedVersion: 2 + x: 128 + y: 320 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 27305410000000000800000000000000 + internalID: 21300082 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_41 + rect: + serializedVersion: 2 + x: 144 + y: 320 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 47305410000000000800000000000000 + internalID: 21300084 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_42 + rect: + serializedVersion: 2 + x: 128 + y: 304 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 67305410000000000800000000000000 + internalID: 21300086 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_43 + rect: + serializedVersion: 2 + x: 144 + y: 304 + width: 32 + height: 15 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 87305410000000000800000000000000 + internalID: 21300088 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_44 + rect: + serializedVersion: 2 + x: 144 + y: 272 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a7305410000000000800000000000000 + internalID: 21300090 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_45 + rect: + serializedVersion: 2 + x: 160 + y: 272 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c7305410000000000800000000000000 + internalID: 21300092 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_46 + rect: + serializedVersion: 2 + x: 144 + y: 144 + width: 64 + height: 56 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e7305410000000000800000000000000 + internalID: 21300094 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_47 + rect: + serializedVersion: 2 + x: 128 + y: 82 + width: 16 + height: 38 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 08305410000000000800000000000000 + internalID: 21300096 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_48 + rect: + serializedVersion: 2 + x: 163 + y: 16 + width: 10 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 28305410000000000800000000000000 + internalID: 21300098 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_49 + rect: + serializedVersion: 2 + x: 163 + y: 32 + width: 10 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 48305410000000000800000000000000 + internalID: 21300100 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_50 + rect: + serializedVersion: 2 + x: 178 + y: 32 + width: 11 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 68305410000000000800000000000000 + internalID: 21300102 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_51 + rect: + serializedVersion: 2 + x: 128 + y: 48 + width: 16 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 88305410000000000800000000000000 + internalID: 21300104 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_52 + rect: + serializedVersion: 2 + x: 131 + y: 32 + width: 11 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a8305410000000000800000000000000 + internalID: 21300106 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TableMedium + rect: + serializedVersion: 2 + x: 144 + y: 48 + width: 16 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c8305410000000000800000000000000 + internalID: 21300108 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TableBig + rect: + serializedVersion: 2 + x: 160 + y: 48 + width: 32 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e8305410000000000800000000000000 + internalID: 21300110 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_55 + rect: + serializedVersion: 2 + x: 96 + y: 50 + width: 14 + height: 14 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 09305410000000000800000000000000 + internalID: 21300112 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_56 + rect: + serializedVersion: 2 + x: 96 + y: 64 + width: 14 + height: 14 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 29305410000000000800000000000000 + internalID: 21300114 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_57 + rect: + serializedVersion: 2 + x: 82 + y: 64 + width: 14 + height: 14 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 49305410000000000800000000000000 + internalID: 21300116 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_58 + rect: + serializedVersion: 2 + x: 48 + y: 2 + width: 30 + height: 30 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 69305410000000000800000000000000 + internalID: 21300118 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_59 + rect: + serializedVersion: 2 + x: 18 + y: 2 + width: 30 + height: 30 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 89305410000000000800000000000000 + internalID: 21300120 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_60 + rect: + serializedVersion: 2 + x: 18 + y: 32 + width: 30 + height: 31 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a9305410000000000800000000000000 + internalID: 21300122 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_61 + rect: + serializedVersion: 2 + x: 48 + y: 32 + width: 30 + height: 31 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c9305410000000000800000000000000 + internalID: 21300124 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_62 + rect: + serializedVersion: 2 + x: 32 + y: 66 + width: 32 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e9305410000000000800000000000000 + internalID: 21300126 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_63 + rect: + serializedVersion: 2 + x: 16 + y: 66 + width: 16 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0a305410000000000800000000000000 + internalID: 21300128 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_64 + rect: + serializedVersion: 2 + x: 0 + y: 64 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2a305410000000000800000000000000 + internalID: 21300130 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_65 + rect: + serializedVersion: 2 + x: 2 + y: 48 + width: 12 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4a305410000000000800000000000000 + internalID: 21300132 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_66 + rect: + serializedVersion: 2 + x: 2 + y: 16 + width: 12 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6a305410000000000800000000000000 + internalID: 21300134 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallLongVertical + rect: + serializedVersion: 2 + x: 5 + y: 80 + width: 6 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8a305410000000000800000000000000 + internalID: 21300136 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnSquareBR + rect: + serializedVersion: 2 + x: 32 + y: 101 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: aa305410000000000800000000000000 + internalID: 21300138 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnSquareTR + rect: + serializedVersion: 2 + x: 32 + y: 112 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ca305410000000000800000000000000 + internalID: 21300140 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnSquareTL + rect: + serializedVersion: 2 + x: 21 + y: 112 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ea305410000000000800000000000000 + internalID: 21300142 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnRoundBR + rect: + serializedVersion: 2 + x: 64 + y: 101 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0b305410000000000800000000000000 + internalID: 21300144 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnRoundTR + rect: + serializedVersion: 2 + x: 64 + y: 112 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2b305410000000000800000000000000 + internalID: 21300146 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallTurnRoundTL + rect: + serializedVersion: 2 + x: 53 + y: 112 + width: 11 + height: 11 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4b305410000000000800000000000000 + internalID: 21300148 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallMiddleVertical + rect: + serializedVersion: 2 + x: 5 + y: 112 + width: 6 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6b305410000000000800000000000000 + internalID: 21300150 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallShortBottom + rect: + serializedVersion: 2 + x: 5 + y: 128 + width: 6 + height: 5 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8b305410000000000800000000000000 + internalID: 21300152 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallShortLeft + rect: + serializedVersion: 2 + x: 0 + y: 133 + width: 5 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ab305410000000000800000000000000 + internalID: 21300154 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallShortRight + rect: + serializedVersion: 2 + x: 11 + y: 133 + width: 5 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cb305410000000000800000000000000 + internalID: 21300156 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallHub + rect: + serializedVersion: 2 + x: 5 + y: 133 + width: 6 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: eb305410000000000800000000000000 + internalID: 21300158 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallShortTop + rect: + serializedVersion: 2 + x: 5 + y: 139 + width: 6 + height: 5 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0c305410000000000800000000000000 + internalID: 21300160 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallMiddleH + rect: + serializedVersion: 2 + x: 16 + y: 133 + width: 16 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2c305410000000000800000000000000 + internalID: 21300162 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: TubeSmallLongH + rect: + serializedVersion: 2 + x: 32 + y: 133 + width: 32 + height: 6 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4c305410000000000800000000000000 + internalID: 21300164 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireHub + rect: + serializedVersion: 2 + x: 0 + y: 176 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6c305410000000000800000000000000 + internalID: 21300166 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireH + rect: + serializedVersion: 2 + x: 16 + y: 179 + width: 32 + height: 10 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8c305410000000000800000000000000 + internalID: 21300168 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireV + rect: + serializedVersion: 2 + x: 3 + y: 144 + width: 10 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ac305410000000000800000000000000 + internalID: 21300170 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireTurnTR + rect: + serializedVersion: 2 + x: 32 + y: 160 + width: 13 + height: 13 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cc305410000000000800000000000000 + internalID: 21300172 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireTurnTL + rect: + serializedVersion: 2 + x: 19 + y: 160 + width: 13 + height: 13 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ec305410000000000800000000000000 + internalID: 21300174 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireTurnBR + rect: + serializedVersion: 2 + x: 32 + y: 147 + width: 13 + height: 13 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0d305410000000000800000000000000 + internalID: 21300176 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_88 + rect: + serializedVersion: 2 + x: 16 + y: 201 + width: 48 + height: 7 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2d305410000000000800000000000000 + internalID: 21300178 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_89 + rect: + serializedVersion: 2 + x: 16 + y: 216 + width: 48 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4d305410000000000800000000000000 + internalID: 21300180 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_90 + rect: + serializedVersion: 2 + x: 288 + y: 624 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6d305410000000000800000000000000 + internalID: 21300182 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_91 + rect: + serializedVersion: 2 + x: 272 + y: 608 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8d305410000000000800000000000000 + internalID: 21300184 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_92 + rect: + serializedVersion: 2 + x: 288 + y: 608 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ad305410000000000800000000000000 + internalID: 21300186 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_93 + rect: + serializedVersion: 2 + x: 304 + y: 624 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cd305410000000000800000000000000 + internalID: 21300188 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_94 + rect: + serializedVersion: 2 + x: 336 + y: 624 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ed305410000000000800000000000000 + internalID: 21300190 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_95 + rect: + serializedVersion: 2 + x: 272 + y: 592 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0e305410000000000800000000000000 + internalID: 21300192 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_96 + rect: + serializedVersion: 2 + x: 288 + y: 592 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2e305410000000000800000000000000 + internalID: 21300194 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_97 + rect: + serializedVersion: 2 + x: 304 + y: 608 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4e305410000000000800000000000000 + internalID: 21300196 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_98 + rect: + serializedVersion: 2 + x: 336 + y: 608 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6e305410000000000800000000000000 + internalID: 21300198 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_99 + rect: + serializedVersion: 2 + x: 304 + y: 592 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8e305410000000000800000000000000 + internalID: 21300200 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_100 + rect: + serializedVersion: 2 + x: 336 + y: 592 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ae305410000000000800000000000000 + internalID: 21300202 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_101 + rect: + serializedVersion: 2 + x: 272 + y: 576 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ce305410000000000800000000000000 + internalID: 21300204 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_102 + rect: + serializedVersion: 2 + x: 288 + y: 576 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ee305410000000000800000000000000 + internalID: 21300206 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_103 + rect: + serializedVersion: 2 + x: 304 + y: 576 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0f305410000000000800000000000000 + internalID: 21300208 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_104 + rect: + serializedVersion: 2 + x: 336 + y: 576 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2f305410000000000800000000000000 + internalID: 21300210 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_105 + rect: + serializedVersion: 2 + x: 272 + y: 544 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4f305410000000000800000000000000 + internalID: 21300212 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_106 + rect: + serializedVersion: 2 + x: 304 + y: 544 + width: 32 + height: 32 + alignment: 9 + pivot: {x: 0.061125755, y: -0.030506134} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6f305410000000000800000000000000 + internalID: 21300214 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_107 + rect: + serializedVersion: 2 + x: 336 + y: 544 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8f305410000000000800000000000000 + internalID: 21300216 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_108 + rect: + serializedVersion: 2 + x: 400 + y: 544 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: af305410000000000800000000000000 + internalID: 21300218 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_109 + rect: + serializedVersion: 2 + x: 304 + y: 512 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: cf305410000000000800000000000000 + internalID: 21300220 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_110 + rect: + serializedVersion: 2 + x: 336 + y: 512 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ef305410000000000800000000000000 + internalID: 21300222 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_111 + rect: + serializedVersion: 2 + x: 400 + y: 512 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 00405410000000000800000000000000 + internalID: 21300224 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_112 + rect: + serializedVersion: 2 + x: 304 + y: 464 + width: 32 + height: 48 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 20405410000000000800000000000000 + internalID: 21300226 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_113 + rect: + serializedVersion: 2 + x: 336 + y: 464 + width: 64 + height: 48 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 40405410000000000800000000000000 + internalID: 21300228 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_114 + rect: + serializedVersion: 2 + x: 400 + y: 464 + width: 64 + height: 48 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 60405410000000000800000000000000 + internalID: 21300230 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_115 + rect: + serializedVersion: 2 + x: 272 + y: 448 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 80405410000000000800000000000000 + internalID: 21300232 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_116 + rect: + serializedVersion: 2 + x: 288 + y: 448 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a0405410000000000800000000000000 + internalID: 21300234 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_117 + rect: + serializedVersion: 2 + x: 304 + y: 448 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c0405410000000000800000000000000 + internalID: 21300236 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_118 + rect: + serializedVersion: 2 + x: 336 + y: 448 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e0405410000000000800000000000000 + internalID: 21300238 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_119 + rect: + serializedVersion: 2 + x: 336 + y: 432 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 01405410000000000800000000000000 + internalID: 21300240 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_120 + rect: + serializedVersion: 2 + x: 304 + y: 432 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 21405410000000000800000000000000 + internalID: 21300242 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_121 + rect: + serializedVersion: 2 + x: 272 + y: 432 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 41405410000000000800000000000000 + internalID: 21300244 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_122 + rect: + serializedVersion: 2 + x: 320 + y: 384 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 61405410000000000800000000000000 + internalID: 21300246 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_123 + rect: + serializedVersion: 2 + x: 352 + y: 384 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 81405410000000000800000000000000 + internalID: 21300248 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_124 + rect: + serializedVersion: 2 + x: 320 + y: 320 + width: 32 + height: 64 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a1405410000000000800000000000000 + internalID: 21300250 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_125 + rect: + serializedVersion: 2 + x: 272 + y: 160 + width: 64 + height: 64 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c1405410000000000800000000000000 + internalID: 21300252 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_126 + rect: + serializedVersion: 2 + x: 336 + y: 192 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e1405410000000000800000000000000 + internalID: 21300254 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_127 + rect: + serializedVersion: 2 + x: 368 + y: 192 + width: 64 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 02405410000000000800000000000000 + internalID: 21300256 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_128 + rect: + serializedVersion: 2 + x: 336 + y: 128 + width: 32 + height: 64 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22405410000000000800000000000000 + internalID: 21300258 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_129 + rect: + serializedVersion: 2 + x: 272 + y: 128 + width: 48 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42405410000000000800000000000000 + internalID: 21300260 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_130 + rect: + serializedVersion: 2 + x: 80 + y: 288 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 62405410000000000800000000000000 + internalID: 21300262 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_131 + rect: + serializedVersion: 2 + x: 80 + y: 256 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 82405410000000000800000000000000 + internalID: 21300264 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_132 + rect: + serializedVersion: 2 + x: 64 + y: 256 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a2405410000000000800000000000000 + internalID: 21300266 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_133 + rect: + serializedVersion: 2 + x: 64 + y: 288 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c2405410000000000800000000000000 + internalID: 21300268 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_134 + rect: + serializedVersion: 2 + x: 48 + y: 288 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e2405410000000000800000000000000 + internalID: 21300270 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_135 + rect: + serializedVersion: 2 + x: 48 + y: 256 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03405410000000000800000000000000 + internalID: 21300272 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_136 + rect: + serializedVersion: 2 + x: 16 + y: 288 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 23405410000000000800000000000000 + internalID: 21300274 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_137 + rect: + serializedVersion: 2 + x: 0 + y: 288 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 43405410000000000800000000000000 + internalID: 21300276 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_138 + rect: + serializedVersion: 2 + x: 0 + y: 272 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 63405410000000000800000000000000 + internalID: 21300278 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_139 + rect: + serializedVersion: 2 + x: 16 + y: 272 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 83405410000000000800000000000000 + internalID: 21300280 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_140 + rect: + serializedVersion: 2 + x: 0 + y: 256 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a3405410000000000800000000000000 + internalID: 21300282 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_141 + rect: + serializedVersion: 2 + x: 16 + y: 256 + width: 32 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c3405410000000000800000000000000 + internalID: 21300284 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_142 + rect: + serializedVersion: 2 + x: 16 + y: 320 + width: 48 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e3405410000000000800000000000000 + internalID: 21300286 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_143 + rect: + serializedVersion: 2 + x: 16 + y: 356 + width: 16 + height: 8 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04405410000000000800000000000000 + internalID: 21300288 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_144 + rect: + serializedVersion: 2 + x: 0 + y: 304 + width: 16 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 24405410000000000800000000000000 + internalID: 21300290 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_145 + rect: + serializedVersion: 2 + x: 4 + y: 336 + width: 8 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 44405410000000000800000000000000 + internalID: 21300292 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_146 + rect: + serializedVersion: 2 + x: 0 + y: 352 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64405410000000000800000000000000 + internalID: 21300294 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_147 + rect: + serializedVersion: 2 + x: 1 + y: 608 + width: 30 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 84405410000000000800000000000000 + internalID: 21300296 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_148 + rect: + serializedVersion: 2 + x: 272 + y: 224 + width: 32 + height: 32 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a4405410000000000800000000000000 + internalID: 21300298 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_149 + rect: + serializedVersion: 2 + x: 272 + y: 256 + width: 64 + height: 64 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c4405410000000000800000000000000 + internalID: 21300300 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: minimal_industry_150 + rect: + serializedVersion: 2 + x: 288 + y: 432 + width: 16 + height: 16 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e4405410000000000800000000000000 + internalID: 21300302 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSmallHub + rect: + serializedVersion: 2 + x: 86 + y: 184 + width: 5 + height: 5 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 05405410000000000800000000000000 + internalID: 21300304 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSDV + rect: + serializedVersion: 2 + x: 87 + y: 189 + width: 3 + height: 3 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 25405410000000000800000000000000 + internalID: 21300306 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSDHPins + rect: + serializedVersion: 2 + x: 91 + y: 184 + width: 7 + height: 5 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 45405410000000000800000000000000 + internalID: 21300308 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSDVPins + rect: + serializedVersion: 2 + x: 86 + y: 177 + width: 5 + height: 7 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 65405410000000000800000000000000 + internalID: 21300310 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSDV + rect: + serializedVersion: 2 + x: 86 + y: 165 + width: 5 + height: 12 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e72e17e0dd19a5750800000000000000 + internalID: 6294503807819833982 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSDH + rect: + serializedVersion: 2 + x: 98 + y: 184 + width: 12 + height: 5 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a5405410000000000800000000000000 + internalID: 21300314 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSSHPin + rect: + serializedVersion: 2 + x: 111 + y: 185 + width: 3 + height: 3 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c5405410000000000800000000000000 + internalID: 21300316 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSSH + rect: + serializedVersion: 2 + x: 114 + y: 185 + width: 5 + height: 3 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e5405410000000000800000000000000 + internalID: 21300318 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSSV + rect: + serializedVersion: 2 + x: 87 + y: 156 + width: 3 + height: 4 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 06405410000000000800000000000000 + internalID: 21300320 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: WireSSVPin + rect: + serializedVersion: 2 + x: 87 + y: 160 + width: 3 + height: 3 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 26405410000000000800000000000000 + internalID: 21300322 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Switch + rect: + serializedVersion: 2 + x: 87 + y: 147 + width: 3 + height: 4 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 46405410000000000800000000000000 + internalID: 21300324 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: PX1x1 + rect: + serializedVersion: 2 + x: 92 + y: 150 + width: 1 + height: 1 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 66405410000000000800000000000000 + internalID: 21300326 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: PX2x1 + rect: + serializedVersion: 2 + x: 94 + y: 150 + width: 2 + height: 1 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 86405410000000000800000000000000 + internalID: 21300328 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: PX1x2 + rect: + serializedVersion: 2 + x: 92 + y: 147 + width: 1 + height: 2 + alignment: 6 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a6405410000000000800000000000000 + internalID: 21300330 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + PX1x1: 21300326 + PX1x2: 21300330 + PX2x1: 21300328 + Switch: 21300324 + TableBig: 21300110 + TableMedium: 21300108 + TubeSmallHub: 21300158 + TubeSmallLongH: 21300164 + TubeSmallLongVertical: 21300136 + TubeSmallMiddleH: 21300162 + TubeSmallMiddleVertical: 21300150 + TubeSmallShortBottom: 21300152 + TubeSmallShortLeft: 21300154 + TubeSmallShortRight: 21300156 + TubeSmallShortTop: 21300160 + TubeSmallTurnRoundBL: 21300054 + TubeSmallTurnRoundBR: 21300144 + TubeSmallTurnRoundTL: 21300148 + TubeSmallTurnRoundTR: 21300146 + TubeSmallTurnSquareBL: 21300052 + TubeSmallTurnSquareBR: 21300138 + TubeSmallTurnSquareTL: 21300142 + TubeSmallTurnSquareTR: 21300140 + WireH: 21300168 + WireHub: 21300166 + WireSDH: 21300314 + WireSDHPins: 21300308 + WireSDV: 21300306 + WireSDVPins: 21300310 + WireSSH: 21300318 + WireSSHPin: 21300316 + WireSSV: 21300320 + WireSSVPin: 21300322 + WireSmallHub: 21300304 + WireTurnBL: 21300048 + WireTurnBR: 21300176 + WireTurnTL: 21300174 + WireTurnTR: 21300172 + WireV: 21300170 + minimal_industry_0: 21300002 + minimal_industry_1: 21300004 + minimal_industry_10: 21300022 + minimal_industry_100: 21300202 + minimal_industry_101: 21300204 + minimal_industry_102: 21300206 + minimal_industry_103: 21300208 + minimal_industry_104: 21300210 + minimal_industry_105: 21300212 + minimal_industry_106: 21300214 + minimal_industry_107: 21300216 + minimal_industry_108: 21300218 + minimal_industry_109: 21300220 + minimal_industry_11: 21300024 + minimal_industry_110: 21300222 + minimal_industry_111: 21300224 + minimal_industry_112: 21300226 + minimal_industry_113: 21300228 + minimal_industry_114: 21300230 + minimal_industry_115: 21300232 + minimal_industry_116: 21300234 + minimal_industry_117: 21300236 + minimal_industry_118: 21300238 + minimal_industry_119: 21300240 + minimal_industry_12: 21300026 + minimal_industry_120: 21300242 + minimal_industry_121: 21300244 + minimal_industry_122: 21300246 + minimal_industry_123: 21300248 + minimal_industry_124: 21300250 + minimal_industry_125: 21300252 + minimal_industry_126: 21300254 + minimal_industry_127: 21300256 + minimal_industry_128: 21300258 + minimal_industry_129: 21300260 + minimal_industry_13: 21300028 + minimal_industry_130: 21300262 + minimal_industry_131: 21300264 + minimal_industry_132: 21300266 + minimal_industry_133: 21300268 + minimal_industry_134: 21300270 + minimal_industry_135: 21300272 + minimal_industry_136: 21300274 + minimal_industry_137: 21300276 + minimal_industry_138: 21300278 + minimal_industry_139: 21300280 + minimal_industry_14: 21300030 + minimal_industry_140: 21300282 + minimal_industry_141: 21300284 + minimal_industry_142: 21300286 + minimal_industry_143: 21300288 + minimal_industry_144: 21300290 + minimal_industry_145: 21300292 + minimal_industry_146: 21300294 + minimal_industry_147: 21300296 + minimal_industry_148: 21300298 + minimal_industry_149: 21300300 + minimal_industry_15: 21300032 + minimal_industry_150: 21300302 + minimal_industry_16: 21300034 + minimal_industry_17: 21300036 + minimal_industry_18: 21300038 + minimal_industry_19: 21300040 + minimal_industry_2: 21300006 + minimal_industry_20: 21300042 + minimal_industry_21: 21300044 + minimal_industry_22: 21300046 + minimal_industry_24: 21300050 + minimal_industry_27: 21300056 + minimal_industry_28: 21300058 + minimal_industry_29: 21300060 + minimal_industry_3: 21300008 + minimal_industry_30: 21300062 + minimal_industry_31: 21300064 + minimal_industry_32: 21300066 + minimal_industry_33: 21300068 + minimal_industry_34: 21300070 + minimal_industry_35: 21300072 + minimal_industry_36: 21300074 + minimal_industry_37: 21300076 + minimal_industry_38: 21300078 + minimal_industry_39: 21300080 + minimal_industry_4: 21300010 + minimal_industry_40: 21300082 + minimal_industry_41: 21300084 + minimal_industry_42: 21300086 + minimal_industry_43: 21300088 + minimal_industry_44: 21300090 + minimal_industry_45: 21300092 + minimal_industry_46: 21300094 + minimal_industry_47: 21300096 + minimal_industry_48: 21300098 + minimal_industry_49: 21300100 + minimal_industry_5: 21300012 + minimal_industry_50: 21300102 + minimal_industry_51: 21300104 + minimal_industry_52: 21300106 + minimal_industry_55: 21300112 + minimal_industry_56: 21300114 + minimal_industry_57: 21300116 + minimal_industry_58: 21300118 + minimal_industry_59: 21300120 + minimal_industry_6: 21300014 + minimal_industry_60: 21300122 + minimal_industry_61: 21300124 + minimal_industry_62: 21300126 + minimal_industry_63: 21300128 + minimal_industry_64: 21300130 + minimal_industry_65: 21300132 + minimal_industry_66: 21300134 + minimal_industry_7: 21300016 + minimal_industry_8: 21300018 + minimal_industry_88: 21300178 + minimal_industry_89: 21300180 + minimal_industry_9: 21300020 + minimal_industry_90: 21300182 + minimal_industry_91: 21300184 + minimal_industry_92: 21300186 + minimal_industry_93: 21300188 + minimal_industry_94: 21300190 + minimal_industry_95: 21300192 + minimal_industry_96: 21300194 + minimal_industry_97: 21300196 + minimal_industry_98: 21300198 + minimal_industry_99: 21300200 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/notepaper.png b/Assets/Sprites/notepaper.png new file mode 100644 index 0000000..31fd072 Binary files /dev/null and b/Assets/Sprites/notepaper.png differ diff --git a/Assets/Sprites/notepaper.png.meta b/Assets/Sprites/notepaper.png.meta new file mode 100644 index 0000000..10c863c --- /dev/null +++ b/Assets/Sprites/notepaper.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 994c90dd4475ef348b660116e08f987d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/notepaper_small.png b/Assets/Sprites/notepaper_small.png new file mode 100644 index 0000000..5a32114 Binary files /dev/null and b/Assets/Sprites/notepaper_small.png differ diff --git a/Assets/Sprites/notepaper_small.png.meta b/Assets/Sprites/notepaper_small.png.meta new file mode 100644 index 0000000..123ef7b --- /dev/null +++ b/Assets/Sprites/notepaper_small.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 873e4fc0ef90b4742bb65759c8255248 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/steel_armor.png b/Assets/Sprites/steel_armor.png new file mode 100644 index 0000000..dc0c6f0 Binary files /dev/null and b/Assets/Sprites/steel_armor.png differ diff --git a/Assets/Sprites/steel_armor.png.meta b/Assets/Sprites/steel_armor.png.meta new file mode 100644 index 0000000..27cef68 --- /dev/null +++ b/Assets/Sprites/steel_armor.png.meta @@ -0,0 +1,1971 @@ +fileFormatVersion: 2 +guid: c08febbc390d97241ac1ca44242fdbba +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: steel_armor + - first: + 213: 21300002 + second: steel_armor_0 + - first: + 213: 21300004 + second: steel_armor_1 + - first: + 213: 21300006 + second: steel_armor_2 + - first: + 213: 21300008 + second: steel_armor_3 + - first: + 213: 21300010 + second: steel_armor_4 + - first: + 213: 21300012 + second: steel_armor_5 + - first: + 213: 21300014 + second: steel_armor_6 + - first: + 213: 21300016 + second: steel_armor_7 + - first: + 213: 21300018 + second: steel_armor_8 + - first: + 213: 21300020 + second: steel_armor_9 + - first: + 213: 21300022 + second: steel_armor_10 + - first: + 213: 21300024 + second: steel_armor_11 + - first: + 213: 21300026 + second: steel_armor_12 + - first: + 213: 21300028 + second: steel_armor_13 + - first: + 213: 21300030 + second: steel_armor_14 + - first: + 213: 21300032 + second: steel_armor_15 + - first: + 213: 21300034 + second: steel_armor_16 + - first: + 213: 21300036 + second: steel_armor_17 + - first: + 213: 21300038 + second: steel_armor_18 + - first: + 213: 21300040 + second: steel_armor_19 + - first: + 213: 21300042 + second: steel_armor_20 + - first: + 213: 21300044 + second: steel_armor_21 + - first: + 213: 21300046 + second: steel_armor_22 + - first: + 213: 21300048 + second: steel_armor_23 + - first: + 213: 21300050 + second: steel_armor_24 + - first: + 213: 21300052 + second: steel_armor_25 + - first: + 213: 21300054 + second: steel_armor_26 + - first: + 213: 21300056 + second: steel_armor_27 + - first: + 213: 21300058 + second: steel_armor_28 + - first: + 213: 21300060 + second: steel_armor_29 + - first: + 213: 21300062 + second: steel_armor_30 + - first: + 213: 21300064 + second: steel_armor_31 + - first: + 213: 21300066 + second: steel_armor_32 + - first: + 213: 21300068 + second: steel_armor_33 + - first: + 213: 21300070 + second: steel_armor_34 + - first: + 213: 21300072 + second: steel_armor_35 + - first: + 213: 21300074 + second: steel_armor_36 + - first: + 213: 21300076 + second: steel_armor_37 + - first: + 213: 21300078 + second: steel_armor_38 + - first: + 213: 21300080 + second: steel_armor_39 + - first: + 213: 21300082 + second: steel_armor_40 + - first: + 213: 21300084 + second: steel_armor_41 + - first: + 213: 21300086 + second: steel_armor_42 + - first: + 213: 21300088 + second: steel_armor_43 + - first: + 213: 21300090 + second: steel_armor_44 + - first: + 213: 21300092 + second: steel_armor_45 + - first: + 213: 21300094 + second: steel_armor_46 + - first: + 213: 21300096 + second: steel_armor_47 + - first: + 213: 21300098 + second: steel_armor_48 + - first: + 213: 21300100 + second: steel_armor_49 + - first: + 213: 21300102 + second: steel_armor_50 + - first: + 213: 21300104 + second: steel_armor_51 + - first: + 213: 21300106 + second: steel_armor_52 + - first: + 213: 21300108 + second: steel_armor_53 + - first: + 213: 21300110 + second: steel_armor_54 + - first: + 213: 21300112 + second: steel_armor_55 + - first: + 213: 21300114 + second: steel_armor_56 + - first: + 213: 21300116 + second: steel_armor_57 + - first: + 213: 21300118 + second: steel_armor_58 + - first: + 213: 21300120 + second: steel_armor_59 + - first: + 213: 21300122 + second: steel_armor_60 + - first: + 213: 21300124 + second: steel_armor_61 + - first: + 213: 21300126 + second: steel_armor_62 + - first: + 213: 21300128 + second: steel_armor_63 + - first: + 213: 21300130 + second: steel_armor_stand + - first: + 213: 21300132 + second: steel_armor_65 + - first: + 213: 21300134 + second: steel_armor_66 + - first: + 213: 21300136 + second: steel_armor_67 + - first: + 213: 21300138 + second: steel_armor_68 + - first: + 213: 21300140 + second: steel_armor_69 + - first: + 213: 21300142 + second: steel_armor_70 + - first: + 213: 21300144 + second: steel_armor_71 + - first: + 213: 21300146 + second: steel_armor_64 + - first: + 213: 21300148 + second: steel_armor_72 + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 4096 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 16 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 4096 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: steel_armor_0 + rect: + serializedVersion: 2 + x: 0 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 22305410000000000800000000000000 + internalID: 21300002 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_1 + rect: + serializedVersion: 2 + x: 64 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 42305410000000000800000000000000 + internalID: 21300004 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_2 + rect: + serializedVersion: 2 + x: 128 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 62305410000000000800000000000000 + internalID: 21300006 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_3 + rect: + serializedVersion: 2 + x: 192 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 82305410000000000800000000000000 + internalID: 21300008 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_4 + rect: + serializedVersion: 2 + x: 256 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a2305410000000000800000000000000 + internalID: 21300010 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_5 + rect: + serializedVersion: 2 + x: 320 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c2305410000000000800000000000000 + internalID: 21300012 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_6 + rect: + serializedVersion: 2 + x: 384 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e2305410000000000800000000000000 + internalID: 21300014 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_7 + rect: + serializedVersion: 2 + x: 448 + y: 960 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 03305410000000000800000000000000 + internalID: 21300016 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_8 + rect: + serializedVersion: 2 + x: 0 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 23305410000000000800000000000000 + internalID: 21300018 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_9 + rect: + serializedVersion: 2 + x: 64 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 43305410000000000800000000000000 + internalID: 21300020 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_10 + rect: + serializedVersion: 2 + x: 128 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 63305410000000000800000000000000 + internalID: 21300022 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_11 + rect: + serializedVersion: 2 + x: 192 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 83305410000000000800000000000000 + internalID: 21300024 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_12 + rect: + serializedVersion: 2 + x: 256 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a3305410000000000800000000000000 + internalID: 21300026 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_13 + rect: + serializedVersion: 2 + x: 320 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c3305410000000000800000000000000 + internalID: 21300028 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_14 + rect: + serializedVersion: 2 + x: 384 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e3305410000000000800000000000000 + internalID: 21300030 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_15 + rect: + serializedVersion: 2 + x: 448 + y: 896 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 04305410000000000800000000000000 + internalID: 21300032 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_16 + rect: + serializedVersion: 2 + x: 0 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 24305410000000000800000000000000 + internalID: 21300034 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_17 + rect: + serializedVersion: 2 + x: 64 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 44305410000000000800000000000000 + internalID: 21300036 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_18 + rect: + serializedVersion: 2 + x: 128 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 64305410000000000800000000000000 + internalID: 21300038 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_19 + rect: + serializedVersion: 2 + x: 192 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 84305410000000000800000000000000 + internalID: 21300040 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_20 + rect: + serializedVersion: 2 + x: 256 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a4305410000000000800000000000000 + internalID: 21300042 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_21 + rect: + serializedVersion: 2 + x: 320 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c4305410000000000800000000000000 + internalID: 21300044 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_22 + rect: + serializedVersion: 2 + x: 384 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e4305410000000000800000000000000 + internalID: 21300046 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_23 + rect: + serializedVersion: 2 + x: 448 + y: 832 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 05305410000000000800000000000000 + internalID: 21300048 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_24 + rect: + serializedVersion: 2 + x: 0 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 25305410000000000800000000000000 + internalID: 21300050 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_25 + rect: + serializedVersion: 2 + x: 64 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 45305410000000000800000000000000 + internalID: 21300052 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_26 + rect: + serializedVersion: 2 + x: 128 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 65305410000000000800000000000000 + internalID: 21300054 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_27 + rect: + serializedVersion: 2 + x: 192 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 85305410000000000800000000000000 + internalID: 21300056 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_28 + rect: + serializedVersion: 2 + x: 256 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a5305410000000000800000000000000 + internalID: 21300058 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_29 + rect: + serializedVersion: 2 + x: 320 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c5305410000000000800000000000000 + internalID: 21300060 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_30 + rect: + serializedVersion: 2 + x: 384 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e5305410000000000800000000000000 + internalID: 21300062 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_31 + rect: + serializedVersion: 2 + x: 448 + y: 768 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 06305410000000000800000000000000 + internalID: 21300064 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_32 + rect: + serializedVersion: 2 + x: 0 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 26305410000000000800000000000000 + internalID: 21300066 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_33 + rect: + serializedVersion: 2 + x: 64 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 46305410000000000800000000000000 + internalID: 21300068 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_34 + rect: + serializedVersion: 2 + x: 128 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 66305410000000000800000000000000 + internalID: 21300070 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_35 + rect: + serializedVersion: 2 + x: 192 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 86305410000000000800000000000000 + internalID: 21300072 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_36 + rect: + serializedVersion: 2 + x: 256 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a6305410000000000800000000000000 + internalID: 21300074 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_37 + rect: + serializedVersion: 2 + x: 320 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c6305410000000000800000000000000 + internalID: 21300076 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_38 + rect: + serializedVersion: 2 + x: 384 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e6305410000000000800000000000000 + internalID: 21300078 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_39 + rect: + serializedVersion: 2 + x: 448 + y: 704 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 07305410000000000800000000000000 + internalID: 21300080 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_40 + rect: + serializedVersion: 2 + x: 0 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 27305410000000000800000000000000 + internalID: 21300082 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_41 + rect: + serializedVersion: 2 + x: 64 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 47305410000000000800000000000000 + internalID: 21300084 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_42 + rect: + serializedVersion: 2 + x: 128 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 67305410000000000800000000000000 + internalID: 21300086 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_43 + rect: + serializedVersion: 2 + x: 192 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 87305410000000000800000000000000 + internalID: 21300088 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_44 + rect: + serializedVersion: 2 + x: 256 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a7305410000000000800000000000000 + internalID: 21300090 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_45 + rect: + serializedVersion: 2 + x: 320 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c7305410000000000800000000000000 + internalID: 21300092 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_46 + rect: + serializedVersion: 2 + x: 384 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e7305410000000000800000000000000 + internalID: 21300094 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_47 + rect: + serializedVersion: 2 + x: 448 + y: 640 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 08305410000000000800000000000000 + internalID: 21300096 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_48 + rect: + serializedVersion: 2 + x: 0 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 28305410000000000800000000000000 + internalID: 21300098 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_49 + rect: + serializedVersion: 2 + x: 64 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 48305410000000000800000000000000 + internalID: 21300100 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_50 + rect: + serializedVersion: 2 + x: 128 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 68305410000000000800000000000000 + internalID: 21300102 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_51 + rect: + serializedVersion: 2 + x: 192 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 88305410000000000800000000000000 + internalID: 21300104 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_52 + rect: + serializedVersion: 2 + x: 256 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a8305410000000000800000000000000 + internalID: 21300106 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_53 + rect: + serializedVersion: 2 + x: 320 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c8305410000000000800000000000000 + internalID: 21300108 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_54 + rect: + serializedVersion: 2 + x: 384 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e8305410000000000800000000000000 + internalID: 21300110 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_55 + rect: + serializedVersion: 2 + x: 448 + y: 576 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 09305410000000000800000000000000 + internalID: 21300112 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_56 + rect: + serializedVersion: 2 + x: 0 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 29305410000000000800000000000000 + internalID: 21300114 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_57 + rect: + serializedVersion: 2 + x: 64 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 49305410000000000800000000000000 + internalID: 21300116 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_58 + rect: + serializedVersion: 2 + x: 128 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 69305410000000000800000000000000 + internalID: 21300118 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_59 + rect: + serializedVersion: 2 + x: 192 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 89305410000000000800000000000000 + internalID: 21300120 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_60 + rect: + serializedVersion: 2 + x: 256 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: a9305410000000000800000000000000 + internalID: 21300122 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_61 + rect: + serializedVersion: 2 + x: 320 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: c9305410000000000800000000000000 + internalID: 21300124 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_62 + rect: + serializedVersion: 2 + x: 384 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: e9305410000000000800000000000000 + internalID: 21300126 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_63 + rect: + serializedVersion: 2 + x: 448 + y: 512 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0a305410000000000800000000000000 + internalID: 21300128 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_64 + rect: + serializedVersion: 2 + x: 0 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2b305410000000000800000000000000 + internalID: 21300146 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_65 + rect: + serializedVersion: 2 + x: 64 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4a305410000000000800000000000000 + internalID: 21300132 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_66 + rect: + serializedVersion: 2 + x: 128 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 6a305410000000000800000000000000 + internalID: 21300134 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_67 + rect: + serializedVersion: 2 + x: 192 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 8a305410000000000800000000000000 + internalID: 21300136 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_68 + rect: + serializedVersion: 2 + x: 256 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: aa305410000000000800000000000000 + internalID: 21300138 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_69 + rect: + serializedVersion: 2 + x: 320 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ca305410000000000800000000000000 + internalID: 21300140 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_70 + rect: + serializedVersion: 2 + x: 384 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ea305410000000000800000000000000 + internalID: 21300142 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_71 + rect: + serializedVersion: 2 + x: 448 + y: 448 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0b305410000000000800000000000000 + internalID: 21300144 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: steel_armor_72 + rect: + serializedVersion: 2 + x: 0 + y: 384 + width: 64 + height: 64 + alignment: 7 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 4b305410000000000800000000000000 + internalID: 21300148 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + steel_armor_0: 21300002 + steel_armor_1: 21300004 + steel_armor_10: 21300022 + steel_armor_11: 21300024 + steel_armor_12: 21300026 + steel_armor_13: 21300028 + steel_armor_14: 21300030 + steel_armor_15: 21300032 + steel_armor_16: 21300034 + steel_armor_17: 21300036 + steel_armor_18: 21300038 + steel_armor_19: 21300040 + steel_armor_2: 21300006 + steel_armor_20: 21300042 + steel_armor_21: 21300044 + steel_armor_22: 21300046 + steel_armor_23: 21300048 + steel_armor_24: 21300050 + steel_armor_25: 21300052 + steel_armor_26: 21300054 + steel_armor_27: 21300056 + steel_armor_28: 21300058 + steel_armor_29: 21300060 + steel_armor_3: 21300008 + steel_armor_30: 21300062 + steel_armor_31: 21300064 + steel_armor_32: 21300066 + steel_armor_33: 21300068 + steel_armor_34: 21300070 + steel_armor_35: 21300072 + steel_armor_36: 21300074 + steel_armor_37: 21300076 + steel_armor_38: 21300078 + steel_armor_39: 21300080 + steel_armor_4: 21300010 + steel_armor_40: 21300082 + steel_armor_41: 21300084 + steel_armor_42: 21300086 + steel_armor_43: 21300088 + steel_armor_44: 21300090 + steel_armor_45: 21300092 + steel_armor_46: 21300094 + steel_armor_47: 21300096 + steel_armor_48: 21300098 + steel_armor_49: 21300100 + steel_armor_5: 21300012 + steel_armor_50: 21300102 + steel_armor_51: 21300104 + steel_armor_52: 21300106 + steel_armor_53: 21300108 + steel_armor_54: 21300110 + steel_armor_55: 21300112 + steel_armor_56: 21300114 + steel_armor_57: 21300116 + steel_armor_58: 21300118 + steel_armor_59: 21300120 + steel_armor_6: 21300014 + steel_armor_60: 21300122 + steel_armor_61: 21300124 + steel_armor_62: 21300126 + steel_armor_63: 21300128 + steel_armor_64: 21300146 + steel_armor_65: 21300132 + steel_armor_66: 21300134 + steel_armor_67: 21300136 + steel_armor_68: 21300138 + steel_armor_69: 21300140 + steel_armor_7: 21300016 + steel_armor_70: 21300142 + steel_armor_71: 21300144 + steel_armor_72: 21300148 + steel_armor_8: 21300018 + steel_armor_9: 21300020 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets.meta b/Assets/Standard Assets.meta new file mode 100644 index 0000000..4fc4746 --- /dev/null +++ b/Assets/Standard Assets.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 2169eed7efda19442be7ad2a700f2e45 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only).meta b/Assets/Standard Assets/Image Effects (Pro Only).meta new file mode 100644 index 0000000..5b717ba --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only).meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d6e0c95a128e14227939c51b5d9ad74e +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js b/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js new file mode 100644 index 0000000..df7f992 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js @@ -0,0 +1,99 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Rendering/Screen Space Ambient Obscurance") + +class AmbientObscurance extends PostEffectsBase { + @Range (0,3) + public var intensity : float = 0.5; + @Range (0.1,3) + public var radius : float = 0.2; + @Range (0,3) + public var blurIterations : int = 1; + @Range (0,5) + public var blurFilterDistance : float = 1.25; + @Range (0,1) + public var downsample : int = 0; + + public var rand : Texture2D; + public var aoShader : Shader; + + private var aoMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (true); + + aoMaterial = CheckShaderAndCreateMaterial (aoShader, aoMaterial); + + if (!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnDisable () { + if(aoMaterial) + DestroyImmediate (aoMaterial); + aoMaterial = null; + } + + @ImageEffectOpaque + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (CheckResources () == false) { + Graphics.Blit (source, destination); + return; + } + + var P : Matrix4x4 = GetComponent(Camera).projectionMatrix; + var invP = P.inverse; + var projInfo : Vector4 = new Vector4 + ((-2.0f / (Screen.width * P[0])), + (-2.0f / (Screen.height * P[5])), + ((1.0f - P[2]) / P[0]), + ((1.0f + P[6]) / P[5])); + + aoMaterial.SetVector ("_ProjInfo", projInfo); // used for unprojection + aoMaterial.SetMatrix ("_ProjectionInv", invP); // only used for reference + aoMaterial.SetTexture ("_Rand", rand); // not needed for DX11 :) + aoMaterial.SetFloat ("_Radius", radius); + aoMaterial.SetFloat ("_Radius2", radius*radius); + aoMaterial.SetFloat ("_Intensity", intensity); + aoMaterial.SetFloat ("_BlurFilterDistance", blurFilterDistance); + + var rtW : int = source.width; + var rtH : int = source.height; + + var tmpRt : RenderTexture = RenderTexture.GetTemporary (rtW>>downsample, rtH>>downsample); + var tmpRt2 : RenderTexture; + + Graphics.Blit (source, tmpRt, aoMaterial, 0); + + if (downsample > 0) { + tmpRt2 = RenderTexture.GetTemporary (rtW, rtH); + Graphics.Blit(tmpRt, tmpRt2, aoMaterial, 4); + RenderTexture.ReleaseTemporary (tmpRt); + tmpRt = tmpRt2; + + // @NOTE: it's probably worth a shot to blur in low resolution + // instead with a bilat-upsample afterwards ... + } + + for (var i : int = 0; i < blurIterations; i++) { + aoMaterial.SetVector("_Axis", Vector2(1.0f,0.0f)); + tmpRt2 = RenderTexture.GetTemporary (rtW, rtH); + Graphics.Blit (tmpRt, tmpRt2, aoMaterial, 1); + RenderTexture.ReleaseTemporary (tmpRt); + + aoMaterial.SetVector("_Axis", Vector2(0.0f,1.0f)); + tmpRt = RenderTexture.GetTemporary (rtW, rtH); + Graphics.Blit (tmpRt2, tmpRt, aoMaterial, 1); + RenderTexture.ReleaseTemporary (tmpRt2); + } + + aoMaterial.SetTexture ("_AOTex", tmpRt); + Graphics.Blit (source, destination, aoMaterial, 2); + + RenderTexture.ReleaseTemporary (tmpRt); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js.meta new file mode 100644 index 0000000..c9d9b12 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/AmbientObscurance.js.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43d955acba56d47d3be0eb7eef88325c +MonoImporter: + serializedVersion: 2 + defaultReferences: + - rand: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} + - aoShader: {fileID: 4800000, guid: 95616c020c5604dda96cf76afbbc0272, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js b/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js new file mode 100644 index 0000000..062a9f5 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js @@ -0,0 +1,161 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Other/Antialiasing") + +enum AAMode { + FXAA2 = 0, + FXAA3Console = 1, + FXAA1PresetA = 2, + FXAA1PresetB = 3, + NFAA = 4, + SSAA = 5, + DLAA = 6, +} + +class AntialiasingAsPostEffect extends PostEffectsBase { + public var mode : AAMode = AAMode.FXAA3Console; + + public var showGeneratedNormals : boolean = false; + public var offsetScale : float = 0.2; + public var blurRadius : float = 18.0; + + public var edgeThresholdMin : float = 0.05f; + public var edgeThreshold : float = 0.2f; + public var edgeSharpness : float = 4.0f; + + public var dlaaSharp : boolean = false; + + public var ssaaShader : Shader; + private var ssaa : Material; + public var dlaaShader : Shader; + private var dlaa : Material; + public var nfaaShader : Shader; + private var nfaa : Material; + public var shaderFXAAPreset2 : Shader; + private var materialFXAAPreset2 : Material; + public var shaderFXAAPreset3 : Shader; + private var materialFXAAPreset3 : Material; + public var shaderFXAAII : Shader; + private var materialFXAAII : Material; + public var shaderFXAAIII : Shader; + private var materialFXAAIII : Material; + + function CurrentAAMaterial () : Material + { + var returnValue : Material = null; + + switch(mode) { + case AAMode.FXAA3Console: + returnValue = materialFXAAIII; + break; + case AAMode.FXAA2: + returnValue = materialFXAAII; + break; + case AAMode.FXAA1PresetA: + returnValue = materialFXAAPreset2; + break; + case AAMode.FXAA1PresetB: + returnValue = materialFXAAPreset3; + break; + case AAMode.NFAA: + returnValue = nfaa; + break; + case AAMode.SSAA: + returnValue = ssaa; + break; + case AAMode.DLAA: + returnValue = dlaa; + break; + default: + returnValue = null; + break; + } + + return returnValue; + } + + function CheckResources () { + CheckSupport (false); + + materialFXAAPreset2 = CreateMaterial (shaderFXAAPreset2, materialFXAAPreset2); + materialFXAAPreset3 = CreateMaterial (shaderFXAAPreset3, materialFXAAPreset3); + materialFXAAII = CreateMaterial (shaderFXAAII, materialFXAAII); + materialFXAAIII = CreateMaterial (shaderFXAAIII, materialFXAAIII); + nfaa = CreateMaterial (nfaaShader, nfaa); + ssaa = CreateMaterial (ssaaShader, ssaa); + dlaa = CreateMaterial (dlaaShader, dlaa); + + if(!ssaaShader.isSupported) { + NotSupported (); + ReportAutoDisable (); + } + + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + // ............................................................................. + // FXAA antialiasing modes ..................................................... + + if (mode == AAMode.FXAA3Console && (materialFXAAIII != null)) { + materialFXAAIII.SetFloat("_EdgeThresholdMin", edgeThresholdMin); + materialFXAAIII.SetFloat("_EdgeThreshold", edgeThreshold); + materialFXAAIII.SetFloat("_EdgeSharpness", edgeSharpness); + + Graphics.Blit (source, destination, materialFXAAIII); + } + else if (mode == AAMode.FXAA1PresetB && (materialFXAAPreset3 != null)) { + Graphics.Blit (source, destination, materialFXAAPreset3); + } + else if(mode == AAMode.FXAA1PresetA && materialFXAAPreset2 != null) { + source.anisoLevel = 4; + Graphics.Blit (source, destination, materialFXAAPreset2); + source.anisoLevel = 0; + } + else if(mode == AAMode.FXAA2 && materialFXAAII != null) { + Graphics.Blit (source, destination, materialFXAAII); + } + else if (mode == AAMode.SSAA && ssaa != null) { + + // ............................................................................. + // SSAA antialiasing ........................................................... + + Graphics.Blit (source, destination, ssaa); + } + else if (mode == AAMode.DLAA && dlaa != null) { + + // ............................................................................. + // DLAA antialiasing ........................................................... + + source.anisoLevel = 0; + var interim : RenderTexture = RenderTexture.GetTemporary (source.width, source.height); + Graphics.Blit (source, interim, dlaa, 0); + Graphics.Blit (interim, destination, dlaa, dlaaSharp ? 2 : 1); + RenderTexture.ReleaseTemporary (interim); + } + else if (mode == AAMode.NFAA && nfaa != null) { + + // ............................................................................. + // nfaa antialiasing .............................................. + + source.anisoLevel = 0; + + nfaa.SetFloat("_OffsetScale", offsetScale); + nfaa.SetFloat("_BlurRadius", blurRadius); + + Graphics.Blit (source, destination, nfaa, showGeneratedNormals ? 1 : 0); + } + else { + // none of the AA is supported, fallback to a simple blit + Graphics.Blit (source, destination); + } + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js.meta new file mode 100644 index 0000000..905021e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/AntialiasingAsPostEffect.js.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: a9aaa3f5f2d574f228e4a21aa38b61e4 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - ssaaShader: {fileID: 4800000, guid: b3728d1488b02490cbd196c7941bf1f8, type: 3} + - dlaaShader: {fileID: 4800000, guid: 017ca72b9e8a749058d13ebd527e98fa, type: 3} + - nfaaShader: {fileID: 4800000, guid: ce0cb2621f6d84e21a87414e471a3cce, type: 3} + - shaderFXAAPreset2: {fileID: 4800000, guid: 6f1418cffd12146f2a83be795f6fa5a7, type: 3} + - shaderFXAAPreset3: {fileID: 4800000, guid: c182fa94a5a0a4c02870641efcd38cd5, type: 3} + - shaderFXAAII: {fileID: 4800000, guid: cd5b323dcc592457790ff18b528f5e67, type: 3} + - shaderFXAAIII: {fileID: 4800000, guid: c547503fff0e8482ea5793727057041c, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js b/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js new file mode 100644 index 0000000..237a261 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js @@ -0,0 +1,335 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Bloom and Glow/Bloom") + +class Bloom extends PostEffectsBase { + enum LensFlareStyle { + Ghosting = 0, + Anamorphic = 1, + Combined = 2, + } + + enum TweakMode { + Basic = 0, + Complex = 1, + } + + enum HDRBloomMode { + Auto = 0, + On = 1, + Off = 2, + } + + enum BloomScreenBlendMode { + Screen = 0, + Add = 1, + } + + enum BloomQuality { + Cheap = 0, + High = 1, + } + + public var tweakMode : TweakMode = 0; + public var screenBlendMode : BloomScreenBlendMode = BloomScreenBlendMode.Add; + + public var hdr : HDRBloomMode = HDRBloomMode.Auto; + private var doHdr : boolean = false; + public var sepBlurSpread : float = 2.5f; + + public var quality : BloomQuality = BloomQuality.High; + + public var bloomIntensity : float = 0.5f; + public var bloomThreshhold : float = 0.5f; + public var bloomThreshholdColor : Color = Color.white; + public var bloomBlurIterations : int = 2; + + public var hollywoodFlareBlurIterations : int = 2; + public var flareRotation : float = 0.0f; + public var lensflareMode : LensFlareStyle = 1; + public var hollyStretchWidth : float = 2.5f; + public var lensflareIntensity : float = 0.0f; + public var lensflareThreshhold : float = 0.3f; + public var lensFlareSaturation : float = 0.75f; + public var flareColorA : Color = Color (0.4f, 0.4f, 0.8f, 0.75f); + public var flareColorB : Color = Color (0.4f, 0.8f, 0.8f, 0.75f); + public var flareColorC : Color = Color (0.8f, 0.4f, 0.8f, 0.75f); + public var flareColorD : Color = Color (0.8f, 0.4f, 0.0f, 0.75f); + public var blurWidth : float = 1.0f; + public var lensFlareVignetteMask : Texture2D; + + public var lensFlareShader : Shader; + private var lensFlareMaterial : Material; + + public var screenBlendShader : Shader; + private var screenBlend : Material; + + public var blurAndFlaresShader: Shader; + private var blurAndFlaresMaterial : Material; + + public var brightPassFilterShader : Shader; + private var brightPassFilterMaterial : Material; + + function CheckResources () : boolean { + CheckSupport (false); + + screenBlend = CheckShaderAndCreateMaterial (screenBlendShader, screenBlend); + lensFlareMaterial = CheckShaderAndCreateMaterial(lensFlareShader,lensFlareMaterial); + blurAndFlaresMaterial = CheckShaderAndCreateMaterial (blurAndFlaresShader, blurAndFlaresMaterial); + brightPassFilterMaterial = CheckShaderAndCreateMaterial(brightPassFilterShader, brightPassFilterMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + // screen blend is not supported when HDR is enabled (will cap values) + + doHdr = false; + if(hdr == HDRBloomMode.Auto) + doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent(Camera).hdr; + else { + doHdr = hdr == HDRBloomMode.On; + } + + doHdr = doHdr && supportHDRTextures; + + var realBlendMode : BloomScreenBlendMode = screenBlendMode; + if(doHdr) + realBlendMode = BloomScreenBlendMode.Add; + + var rtFormat = (doHdr) ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.Default; + var rtW2 = source.width/2; + var rtH2 = source.height/2; + var rtW4 = source.width/4; + var rtH4 = source.height/4; + + var widthOverHeight : float = (1.0f * source.width) / (1.0f * source.height); + var oneOverBaseSize : float = 1.0f / 512.0f; + + // downsample + var quarterRezColor : RenderTexture = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + var halfRezColorDown : RenderTexture = RenderTexture.GetTemporary (rtW2, rtH2, 0, rtFormat); + if(quality > BloomQuality.Cheap) { + Graphics.Blit (source, halfRezColorDown, screenBlend, 2); + var rtDown4 : RenderTexture = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + Graphics.Blit (halfRezColorDown, rtDown4, screenBlend, 2); + Graphics.Blit (rtDown4, quarterRezColor, screenBlend, 6); + RenderTexture.ReleaseTemporary(rtDown4); + } + else { + Graphics.Blit (source, halfRezColorDown); + Graphics.Blit (halfRezColorDown, quarterRezColor, screenBlend, 6); + } + RenderTexture.ReleaseTemporary (halfRezColorDown); + + // cut colors (threshholding) + var secondQuarterRezColor : RenderTexture = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + BrightFilter (bloomThreshhold * bloomThreshholdColor, quarterRezColor, secondQuarterRezColor); + + // blurring + + if (bloomBlurIterations < 1) bloomBlurIterations = 1; + else if (bloomBlurIterations > 10) bloomBlurIterations = 10; + + for (var iter : int = 0; iter < bloomBlurIterations; iter++ ) { + var spreadForPass : float = (1.0f + (iter * 0.25f)) * sepBlurSpread; + + // vertical blur + var blur4 : RenderTexture = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (0.0f, spreadForPass * oneOverBaseSize, 0.0f, 0.0f)); + Graphics.Blit (secondQuarterRezColor, blur4, blurAndFlaresMaterial, 4); + RenderTexture.ReleaseTemporary(secondQuarterRezColor); + secondQuarterRezColor = blur4; + + // horizontal blur + blur4 = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 ((spreadForPass / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (secondQuarterRezColor, blur4, blurAndFlaresMaterial, 4); + RenderTexture.ReleaseTemporary (secondQuarterRezColor); + secondQuarterRezColor = blur4; + + if (quality > BloomQuality.Cheap) { + if (iter == 0) + { + Graphics.SetRenderTarget(quarterRezColor); + GL.Clear(false, true, Color.black); // Clear to avoid RT restore + Graphics.Blit (secondQuarterRezColor, quarterRezColor); + } + else + { + quarterRezColor.MarkRestoreExpected(); // using max blending, RT restore expected + Graphics.Blit (secondQuarterRezColor, quarterRezColor, screenBlend, 10); + } + } + } + + if(quality > BloomQuality.Cheap) + { + Graphics.SetRenderTarget(secondQuarterRezColor); + GL.Clear(false, true, Color.black); // Clear to avoid RT restore + Graphics.Blit (quarterRezColor, secondQuarterRezColor, screenBlend, 6); + } + + // lens flares: ghosting, anamorphic or both (ghosted anamorphic flares) + + if (lensflareIntensity > Mathf.Epsilon) { + + var rtFlares4 : RenderTexture = RenderTexture.GetTemporary (rtW4, rtH4, 0, rtFormat); + + if (lensflareMode == 0) { + // ghosting only + + BrightFilter (lensflareThreshhold, secondQuarterRezColor, rtFlares4); + + if(quality > BloomQuality.Cheap) { + // smooth a little + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (0.0f, (1.5f) / (1.0f * quarterRezColor.height), 0.0f, 0.0f)); + Graphics.SetRenderTarget(quarterRezColor); + GL.Clear(false, true, Color.black); // Clear to avoid RT restore + Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 4); + + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 ((1.5f) / (1.0f * quarterRezColor.width), 0.0f, 0.0f, 0.0f)); + Graphics.SetRenderTarget(rtFlares4); + GL.Clear(false, true, Color.black); // Clear to avoid RT restore + Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 4); + } + + // no ugly edges! + Vignette (0.975f, rtFlares4, rtFlares4); + BlendFlares (rtFlares4, secondQuarterRezColor); + } + else { + + //Vignette (0.975f, rtFlares4, rtFlares4); + //DrawBorder(rtFlares4, screenBlend, 8); + + var flareXRot : float = 1.0f * Mathf.Cos(flareRotation); + var flareyRot : float = 1.0f * Mathf.Sin(flareRotation); + + var stretchWidth : float = (hollyStretchWidth * 1.0f / widthOverHeight) * oneOverBaseSize; + var stretchWidthY : float = hollyStretchWidth * oneOverBaseSize; + + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (flareXRot, flareyRot, 0.0, 0.0)); + blurAndFlaresMaterial.SetVector ("_Threshhold", Vector4 (lensflareThreshhold, 1.0f, 0.0f, 0.0f)); + blurAndFlaresMaterial.SetVector ("_TintColor", Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * flareColorA.a * lensflareIntensity); + blurAndFlaresMaterial.SetFloat ("_Saturation", lensFlareSaturation); + + // "pre and cut" + quarterRezColor.DiscardContents(); + Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 2); + // "post" + rtFlares4.DiscardContents(); + Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 3); + + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (flareXRot * stretchWidth, flareyRot * stretchWidth, 0.0, 0.0)); + // stretch 1st + blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth); + quarterRezColor.DiscardContents(); + Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 1); + // stretch 2nd + blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth * 2.0f); + rtFlares4.DiscardContents(); + Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 1); + // stretch 3rd + blurAndFlaresMaterial.SetFloat ("_StretchWidth", hollyStretchWidth * 4.0f); + quarterRezColor.DiscardContents(); + Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 1); + + // additional blur passes + for (iter = 0; iter < hollywoodFlareBlurIterations; iter++ ) { + stretchWidth = (hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize; + + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (stretchWidth * flareXRot, stretchWidth * flareyRot, 0.0, 0.0)); + rtFlares4.DiscardContents(); + Graphics.Blit (quarterRezColor, rtFlares4, blurAndFlaresMaterial, 4); + + blurAndFlaresMaterial.SetVector ("_Offsets", Vector4 (stretchWidth * flareXRot, stretchWidth * flareyRot, 0.0, 0.0)); + quarterRezColor.DiscardContents(); + Graphics.Blit (rtFlares4, quarterRezColor, blurAndFlaresMaterial, 4); + } + + if (lensflareMode == 1) + // anamorphic lens flares + AddTo (1.0, quarterRezColor, secondQuarterRezColor); + else { + + // "combined" lens flares + + Vignette (1.0, quarterRezColor, rtFlares4); + BlendFlares (rtFlares4, quarterRezColor); + AddTo (1.0, quarterRezColor, secondQuarterRezColor); + } + } + RenderTexture.ReleaseTemporary (rtFlares4); + } + + var blendPass : int = realBlendMode; + //if(Mathf.Abs(chromaticBloom) < Mathf.Epsilon) + // blendPass += 4; + + screenBlend.SetFloat ("_Intensity", bloomIntensity); + screenBlend.SetTexture ("_ColorBuffer", source); + + if(quality > BloomQuality.Cheap) { + var halfRezColorUp : RenderTexture = RenderTexture.GetTemporary (rtW2, rtH2, 0, rtFormat); + Graphics.Blit (secondQuarterRezColor, halfRezColorUp); + Graphics.Blit (halfRezColorUp, destination, screenBlend, blendPass); + RenderTexture.ReleaseTemporary (halfRezColorUp); + } + else + Graphics.Blit (secondQuarterRezColor, destination, screenBlend, blendPass); + + RenderTexture.ReleaseTemporary (quarterRezColor); + RenderTexture.ReleaseTemporary (secondQuarterRezColor); + } + + private function AddTo (intensity_ : float, from : RenderTexture, to : RenderTexture) { + screenBlend.SetFloat ("_Intensity", intensity_); + to.MarkRestoreExpected(); // additive blending, RT restore expected + Graphics.Blit (from, to, screenBlend, 9); + } + + private function BlendFlares (from : RenderTexture, to : RenderTexture) { + lensFlareMaterial.SetVector ("colorA", Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorB", Vector4 (flareColorB.r, flareColorB.g, flareColorB.b, flareColorB.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorC", Vector4 (flareColorC.r, flareColorC.g, flareColorC.b, flareColorC.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorD", Vector4 (flareColorD.r, flareColorD.g, flareColorD.b, flareColorD.a) * lensflareIntensity); + to.MarkRestoreExpected(); // additive blending, RT restore expected + Graphics.Blit (from, to, lensFlareMaterial); + } + + private function BrightFilter (thresh : float, from : RenderTexture, to : RenderTexture) { + brightPassFilterMaterial.SetVector ("_Threshhold", Vector4 (thresh, thresh, thresh, thresh)); + Graphics.Blit (from, to, brightPassFilterMaterial, 0); + } + + private function BrightFilter (threshColor : Color, from : RenderTexture, to : RenderTexture) { + brightPassFilterMaterial.SetVector ("_Threshhold", threshColor); + Graphics.Blit (from, to, brightPassFilterMaterial, 1); + } + + private function Vignette (amount : float, from : RenderTexture, to : RenderTexture) { + if(lensFlareVignetteMask) { + screenBlend.SetTexture ("_ColorBuffer", lensFlareVignetteMask); + to.MarkRestoreExpected(); // using blending, RT restore expected + Graphics.Blit (from == to ? null : from, to, screenBlend, from == to ? 7 : 3); + } + else if (from != to) + { + Graphics.SetRenderTarget (to); + GL.Clear(false, true, Color.black); // clear destination to avoid RT restore + Graphics.Blit (from, to); + } + } + +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js.meta new file mode 100644 index 0000000..df6ec31 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Bloom.js.meta @@ -0,0 +1,17 @@ +fileFormatVersion: 2 +guid: a773099f140e846f7835d27351846623 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, + type: 3} + - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} + - screenBlendShader: {fileID: 4800000, guid: 7856cbff0a0ca45c787d5431eb805bb0, type: 3} + - blurAndFlaresShader: {fileID: 4800000, guid: be6e39cf196f146d5be72fbefb18ed75, + type: 3} + - brightPassFilterShader: {fileID: 4800000, guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c, + type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js b/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js new file mode 100644 index 0000000..3e7ca31 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js @@ -0,0 +1,289 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Bloom and Glow/BloomAndFlares (3.5, Deprecated)") + +enum LensflareStyle34 { + Ghosting = 0, + Anamorphic = 1, + Combined = 2, +} + +enum TweakMode34 { + Basic = 0, + Complex = 1, +} + +enum HDRBloomMode { + Auto = 0, + On = 1, + Off = 2, +} + +enum BloomScreenBlendMode { + Screen = 0, + Add = 1, +} + +class BloomAndLensFlares extends PostEffectsBase { + public var tweakMode : TweakMode34 = 0; + public var screenBlendMode : BloomScreenBlendMode = BloomScreenBlendMode.Add; + + public var hdr : HDRBloomMode = HDRBloomMode.Auto; + private var doHdr : boolean = false; + public var sepBlurSpread : float = 1.5f; + public var useSrcAlphaAsMask : float = 0.5f; + + public var bloomIntensity : float = 1.0f; + public var bloomThreshhold : float = 0.5f; + public var bloomBlurIterations : int = 2; + + public var lensflares : boolean = false; + public var hollywoodFlareBlurIterations : int = 2; + public var lensflareMode : LensflareStyle34 = 1; + public var hollyStretchWidth : float = 3.5f; + public var lensflareIntensity : float = 1.0f; + public var lensflareThreshhold : float = 0.3f; + public var flareColorA : Color = Color (0.4f, 0.4f, 0.8f, 0.75f); + public var flareColorB : Color = Color (0.4f, 0.8f, 0.8f, 0.75f); + public var flareColorC : Color = Color (0.8f, 0.4f, 0.8f, 0.75f); + public var flareColorD : Color = Color (0.8f, 0.4f, 0.0f, 0.75f); + public var blurWidth : float = 1.0f; + public var lensFlareVignetteMask : Texture2D; + + public var lensFlareShader : Shader; + private var lensFlareMaterial : Material; + + public var vignetteShader : Shader; + private var vignetteMaterial : Material; + + public var separableBlurShader : Shader; + private var separableBlurMaterial : Material; + + public var addBrightStuffOneOneShader: Shader; + private var addBrightStuffBlendOneOneMaterial : Material; + + public var screenBlendShader : Shader; + private var screenBlend : Material; + + public var hollywoodFlaresShader: Shader; + private var hollywoodFlaresMaterial : Material; + + public var brightPassFilterShader : Shader; + private var brightPassFilterMaterial : Material; + + function CheckResources () : boolean { + CheckSupport (false); + + screenBlend = CheckShaderAndCreateMaterial (screenBlendShader, screenBlend); + lensFlareMaterial = CheckShaderAndCreateMaterial(lensFlareShader,lensFlareMaterial); + vignetteMaterial = CheckShaderAndCreateMaterial(vignetteShader,vignetteMaterial); + separableBlurMaterial = CheckShaderAndCreateMaterial(separableBlurShader,separableBlurMaterial); + addBrightStuffBlendOneOneMaterial = CheckShaderAndCreateMaterial(addBrightStuffOneOneShader,addBrightStuffBlendOneOneMaterial); + hollywoodFlaresMaterial = CheckShaderAndCreateMaterial (hollywoodFlaresShader, hollywoodFlaresMaterial); + brightPassFilterMaterial = CheckShaderAndCreateMaterial(brightPassFilterShader, brightPassFilterMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + // screen blend is not supported when HDR is enabled (will cap values) + + doHdr = false; + if(hdr == HDRBloomMode.Auto) + doHdr = source.format == RenderTextureFormat.ARGBHalf && GetComponent(Camera).hdr; + else { + doHdr = hdr == HDRBloomMode.On; + } + + doHdr = doHdr && supportHDRTextures; + + var realBlendMode : BloomScreenBlendMode = screenBlendMode; + if(doHdr) + realBlendMode = BloomScreenBlendMode.Add; + + var rtFormat = (doHdr) ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.Default; + var halfRezColor : RenderTexture = RenderTexture.GetTemporary (source.width / 2, source.height / 2, 0, rtFormat); + var quarterRezColor : RenderTexture = RenderTexture.GetTemporary (source.width / 4, source.height / 4, 0, rtFormat); + var secondQuarterRezColor : RenderTexture = RenderTexture.GetTemporary (source.width / 4, source.height / 4, 0, rtFormat); + var thirdQuarterRezColor : RenderTexture = RenderTexture.GetTemporary (source.width / 4, source.height / 4, 0, rtFormat); + + var widthOverHeight : float = (1.0f * source.width) / (1.0f * source.height); + var oneOverBaseSize : float = 1.0f / 512.0f; + + // downsample + + Graphics.Blit (source, halfRezColor, screenBlend, 2); // <- 2 is stable downsample + Graphics.Blit (halfRezColor, quarterRezColor, screenBlend, 2); // <- 2 is stable downsample + + RenderTexture.ReleaseTemporary (halfRezColor); + + // cut colors (threshholding) + + BrightFilter (bloomThreshhold, useSrcAlphaAsMask, quarterRezColor, secondQuarterRezColor); + quarterRezColor.DiscardContents(); + + // blurring + + if (bloomBlurIterations < 1) bloomBlurIterations = 1; + + for (var iter : int = 0; iter < bloomBlurIterations; iter++ ) { + var spreadForPass : float = (1.0f + (iter * 0.5f)) * sepBlurSpread; + separableBlurMaterial.SetVector ("offsets", Vector4 (0.0f, spreadForPass * oneOverBaseSize, 0.0f, 0.0f)); + + var src : RenderTexture = iter == 0 ? secondQuarterRezColor : quarterRezColor; + Graphics.Blit (src, thirdQuarterRezColor, separableBlurMaterial); + src.DiscardContents(); + + separableBlurMaterial.SetVector ("offsets", Vector4 ((spreadForPass / widthOverHeight) * oneOverBaseSize, 0.0f, 0.0f, 0.0f)); + Graphics.Blit (thirdQuarterRezColor, quarterRezColor, separableBlurMaterial); + thirdQuarterRezColor.DiscardContents(); + } + + // lens flares: ghosting, anamorphic or a combination + + if (lensflares) { + + if (lensflareMode == 0) { + + BrightFilter (lensflareThreshhold, 0.0f, quarterRezColor, thirdQuarterRezColor); + quarterRezColor.DiscardContents(); + + // smooth a little, this needs to be resolution dependent + /* + separableBlurMaterial.SetVector ("offsets", Vector4 (0.0f, (2.0f) / (1.0f * quarterRezColor.height), 0.0f, 0.0f)); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); + separableBlurMaterial.SetVector ("offsets", Vector4 ((2.0f) / (1.0f * quarterRezColor.width), 0.0f, 0.0f, 0.0f)); + Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); + */ + // no ugly edges! + + Vignette (0.975, thirdQuarterRezColor, secondQuarterRezColor); + thirdQuarterRezColor.DiscardContents(); + + BlendFlares (secondQuarterRezColor, quarterRezColor); + secondQuarterRezColor.DiscardContents(); + } + + // (b) hollywood/anamorphic flares? + + else { + + // thirdQuarter has the brightcut unblurred colors + // quarterRezColor is the blurred, brightcut buffer that will end up as bloom + + hollywoodFlaresMaterial.SetVector ("_Threshhold", Vector4 (lensflareThreshhold, 1.0f / (1.0f - lensflareThreshhold), 0.0f, 0.0f)); + hollywoodFlaresMaterial.SetVector ("tintColor", Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * flareColorA.a * lensflareIntensity); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 2); + thirdQuarterRezColor.DiscardContents(); + + Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, hollywoodFlaresMaterial, 3); + secondQuarterRezColor.DiscardContents(); + + hollywoodFlaresMaterial.SetVector ("offsets", Vector4 ((sepBlurSpread * 1.0f / widthOverHeight) * oneOverBaseSize, 0.0, 0.0, 0.0)); + hollywoodFlaresMaterial.SetFloat ("stretchWidth", hollyStretchWidth); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 1); + thirdQuarterRezColor.DiscardContents(); + + hollywoodFlaresMaterial.SetFloat ("stretchWidth", hollyStretchWidth * 2.0f); + Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, hollywoodFlaresMaterial, 1); + secondQuarterRezColor.DiscardContents(); + + hollywoodFlaresMaterial.SetFloat ("stretchWidth", hollyStretchWidth * 4.0f); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, hollywoodFlaresMaterial, 1); + thirdQuarterRezColor.DiscardContents(); + + if (lensflareMode == 1) { + for (var itera : int = 0; itera < hollywoodFlareBlurIterations; itera++ ) { + separableBlurMaterial.SetVector ("offsets", Vector4 ((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); + secondQuarterRezColor.DiscardContents(); + + separableBlurMaterial.SetVector ("offsets", Vector4 ((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); + thirdQuarterRezColor.DiscardContents(); + } + + AddTo (1.0, secondQuarterRezColor, quarterRezColor); + secondQuarterRezColor.DiscardContents(); + } + else { + + // (c) combined + + for (var ix : int = 0; ix < hollywoodFlareBlurIterations; ix++ ) { + separableBlurMaterial.SetVector ("offsets", Vector4 ((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (secondQuarterRezColor, thirdQuarterRezColor, separableBlurMaterial); + secondQuarterRezColor.DiscardContents(); + + separableBlurMaterial.SetVector ("offsets", Vector4 ((hollyStretchWidth * 2.0f / widthOverHeight) * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (thirdQuarterRezColor, secondQuarterRezColor, separableBlurMaterial); + thirdQuarterRezColor.DiscardContents(); + } + + Vignette (1.0, secondQuarterRezColor, thirdQuarterRezColor); + secondQuarterRezColor.DiscardContents(); + + BlendFlares (thirdQuarterRezColor, secondQuarterRezColor); + thirdQuarterRezColor.DiscardContents(); + + AddTo (1.0, secondQuarterRezColor, quarterRezColor); + secondQuarterRezColor.DiscardContents(); + } + } + } + + // screen blend bloom results to color buffer + + screenBlend.SetFloat ("_Intensity", bloomIntensity); + screenBlend.SetTexture ("_ColorBuffer", source); + Graphics.Blit (quarterRezColor, destination, screenBlend, realBlendMode); + + RenderTexture.ReleaseTemporary (quarterRezColor); + RenderTexture.ReleaseTemporary (secondQuarterRezColor); + RenderTexture.ReleaseTemporary (thirdQuarterRezColor); + } + + private function AddTo (intensity_ : float, from : RenderTexture, to : RenderTexture) { + addBrightStuffBlendOneOneMaterial.SetFloat ("_Intensity", intensity_); + Graphics.Blit (from, to, addBrightStuffBlendOneOneMaterial); + } + + private function BlendFlares (from : RenderTexture, to : RenderTexture) { + lensFlareMaterial.SetVector ("colorA", Vector4 (flareColorA.r, flareColorA.g, flareColorA.b, flareColorA.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorB", Vector4 (flareColorB.r, flareColorB.g, flareColorB.b, flareColorB.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorC", Vector4 (flareColorC.r, flareColorC.g, flareColorC.b, flareColorC.a) * lensflareIntensity); + lensFlareMaterial.SetVector ("colorD", Vector4 (flareColorD.r, flareColorD.g, flareColorD.b, flareColorD.a) * lensflareIntensity); + Graphics.Blit (from, to, lensFlareMaterial); + } + + private function BrightFilter (thresh : float, useAlphaAsMask : float, from : RenderTexture, to : RenderTexture) { + if(doHdr) + brightPassFilterMaterial.SetVector ("threshhold", Vector4 (thresh, 1.0f, 0.0f, 0.0f)); + else + brightPassFilterMaterial.SetVector ("threshhold", Vector4 (thresh, 1.0f / (1.0f-thresh), 0.0f, 0.0f)); + brightPassFilterMaterial.SetFloat ("useSrcAlphaAsMask", useAlphaAsMask); + Graphics.Blit (from, to, brightPassFilterMaterial); + } + + private function Vignette (amount : float, from : RenderTexture, to : RenderTexture) { + if(lensFlareVignetteMask) { + screenBlend.SetTexture ("_ColorBuffer", lensFlareVignetteMask); + Graphics.Blit (from, to, screenBlend, 3); + } + else { + vignetteMaterial.SetFloat ("vignetteIntensity", amount); + Graphics.Blit (from, to, vignetteMaterial); + } + } + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js.meta new file mode 100644 index 0000000..97267fe --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/BloomAndLensFlares.js.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d35a90bed98554f4d8b92c9cd3cfbafa +MonoImporter: + serializedVersion: 2 + defaultReferences: + - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, + type: 3} + - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} + - vignetteShader: {fileID: 4800000, guid: 562f620336e024ac99992ff05725a89a, type: 3} + - separableBlurShader: {fileID: 4800000, guid: a9df009a214e24a5ebbf271595f8d5b6, + type: 3} + - addBrightStuffOneOneShader: {fileID: 4800000, guid: f7898d203e9b94c0dbe2bf9dd5cb32c0, + type: 3} + - screenBlendShader: {fileID: 4800000, guid: 53b3960ee3d3d4a5caa8d5473d120187, type: 3} + - hollywoodFlaresShader: {fileID: 4800000, guid: e2baf3cae8edc4daf94c9adc2154be00, + type: 3} + - brightPassFilterShader: {fileID: 4800000, guid: 186c4c0d31e314f049595dcbaf4ca129, + type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js b/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js new file mode 100644 index 0000000..da2b518 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js @@ -0,0 +1,89 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Blur/Blur (Optimized)") + +class Blur extends PostEffectsBase { + + @Range(0, 2) + public var downsample : int = 1; + + public enum BlurType { + StandardGauss = 0, + SgxGauss = 1, + } + + @Range(0.0f, 10.0f) + public var blurSize : float = 3.0f; + + @Range(1, 4) + public var blurIterations : int = 2; + + public var blurType = BlurType.StandardGauss; + + public var blurShader : Shader; + private var blurMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (false); + + blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnDisable() { + if(blurMaterial) + DestroyImmediate (blurMaterial); + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources() == false) { + Graphics.Blit (source, destination); + return; + } + + var widthMod : float = 1.0f / (1.0f * (1<> downsample; + var rtH : int = source.height >> downsample; + + // downsample + var rt : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + + rt.filterMode = FilterMode.Bilinear; + Graphics.Blit (source, rt, blurMaterial, 0); + + var passOffs = blurType == BlurType.StandardGauss ? 0 : 2; + + for(var i : int = 0; i < blurIterations; i++) { + var iterationOffs : float = (i*1.0f); + blurMaterial.SetVector ("_Parameter", Vector4 (blurSize * widthMod + iterationOffs, -blurSize * widthMod - iterationOffs, 0.0f, 0.0f)); + + // vertical blur + var rt2 : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + rt2.filterMode = FilterMode.Bilinear; + Graphics.Blit (rt, rt2, blurMaterial, 1 + passOffs); + RenderTexture.ReleaseTemporary (rt); + rt = rt2; + + // horizontal blur + rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + rt2.filterMode = FilterMode.Bilinear; + Graphics.Blit (rt, rt2, blurMaterial, 2 + passOffs); + RenderTexture.ReleaseTemporary (rt); + rt = rt2; + } + + Graphics.Blit (rt, destination); + + RenderTexture.ReleaseTemporary (rt); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js.meta new file mode 100644 index 0000000..86ec935 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Blur.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2d7914440ac9e4b22a60e4303888e90c +MonoImporter: + serializedVersion: 2 + defaultReferences: + - blurShader: {fileID: 4800000, guid: f9d5fa183cd6b45eeb1491f74863cd91, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs new file mode 100644 index 0000000..c359f5e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs @@ -0,0 +1,105 @@ +using UnityEngine; +using System.Collections; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Blur/Blur")] +public class BlurEffect : MonoBehaviour +{ + /// Blur iterations - larger number means more blur. + public int iterations = 3; + + /// Blur spread for each iteration. Lower values + /// give better looking blur, but require more iterations to + /// get large blurs. Value is usually between 0.5 and 1.0. + public float blurSpread = 0.6f; + + + // -------------------------------------------------------- + // The blur iteration shader. + // Basically it just takes 4 texture samples and averages them. + // By applying it repeatedly and spreading out sample locations + // we get a Gaussian blur approximation. + + public Shader blurShader = null; + + //private static string blurMatString = + + static Material m_Material = null; + protected Material material { + get { + if (m_Material == null) { + m_Material = new Material(blurShader); + m_Material.hideFlags = HideFlags.DontSave; + } + return m_Material; + } + } + + protected void OnDisable() { + if( m_Material ) { + DestroyImmediate( m_Material ); + } + } + + // -------------------------------------------------------- + + protected void Start() + { + // Disable if we don't support image effects + if (!SystemInfo.supportsImageEffects) { + enabled = false; + return; + } + // Disable if the shader can't run on the users graphics card + if (!blurShader || !material.shader.isSupported) { + enabled = false; + return; + } + } + + // Performs one blur iteration. + public void FourTapCone (RenderTexture source, RenderTexture dest, int iteration) + { + float off = 0.5f + iteration*blurSpread; + Graphics.BlitMultiTap (source, dest, material, + new Vector2(-off, -off), + new Vector2(-off, off), + new Vector2( off, off), + new Vector2( off, -off) + ); + } + + // Downsamples the texture to a quarter resolution. + private void DownSample4x (RenderTexture source, RenderTexture dest) + { + float off = 1.0f; + Graphics.BlitMultiTap (source, dest, material, + new Vector2(-off, -off), + new Vector2(-off, off), + new Vector2( off, off), + new Vector2( off, -off) + ); + } + + // Called by the camera to apply the image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + int rtW = source.width/4; + int rtH = source.height/4; + RenderTexture buffer = RenderTexture.GetTemporary(rtW, rtH, 0); + + // Copy source to the 4x4 smaller texture. + DownSample4x (source, buffer); + + // Blur the small texture + for(int i = 0; i < iterations; i++) + { + RenderTexture buffer2 = RenderTexture.GetTemporary(rtW, rtH, 0); + FourTapCone (buffer, buffer2, i); + RenderTexture.ReleaseTemporary(buffer); + buffer = buffer2; + } + Graphics.Blit(buffer, destination); + + RenderTexture.ReleaseTemporary(buffer); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs.meta new file mode 100644 index 0000000..1818d9d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/BlurEffect.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 34382083ad114a07d000fbfb8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - blurShader: {fileID: 4800000, guid: 57e6deea7c2924e22a5138e2b70bb4dc, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js b/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js new file mode 100644 index 0000000..c7d8612 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js @@ -0,0 +1,391 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Camera/Camera Motion Blur") + +public class CameraMotionBlur extends PostEffectsBase +{ + // make sure to match this to MAX_RADIUS in shader ('k' in paper) + static var MAX_RADIUS : int = 10.0f; + + public enum MotionBlurFilter { + CameraMotion = 0, // global screen blur based on cam motion + LocalBlur = 1, // cheap blur, no dilation or scattering + Reconstruction = 2, // advanced filter (simulates scattering) as in plausible motion blur paper + ReconstructionDX11 = 3, // advanced filter (simulates scattering) as in plausible motion blur paper + ReconstructionDisc = 4, // advanced filter using scaled poisson disc sampling + } + + // settings + public var filterType : MotionBlurFilter = MotionBlurFilter.Reconstruction; + public var preview : boolean = false; // show how blur would look like in action ... + public var previewScale : Vector3 = Vector3.one; // ... given this movement vector + + // params + public var movementScale : float = 0.0f; + public var rotationScale : float = 1.0f; + public var maxVelocity : float = 8.0f; // maximum velocity in pixels + public var minVelocity : float = 0.1f; // minimum velocity in pixels + public var velocityScale : float = 0.375f; // global velocity scale + public var softZDistance : float = 0.005f; // for z overlap check softness (reconstruction filter only) + public var velocityDownsample : int = 1; // low resolution velocity buffer? (optimization) + public var excludeLayers : LayerMask = 0; + //public var dynamicLayers : LayerMask = 0; + private var tmpCam : GameObject = null; + + // resources + public var shader : Shader; + public var dx11MotionBlurShader : Shader; + public var replacementClear : Shader; + //public var replacementDynamics : Shader; + private var motionBlurMaterial : Material = null; + private var dx11MotionBlurMaterial : Material = null; + + public var noiseTexture : Texture2D = null; + public var jitter : float = 0.05f; + + // (internal) debug + public var showVelocity : boolean = false; + public var showVelocityScale : float = 1.0f; + + // camera transforms + private var currentViewProjMat : Matrix4x4; + private var prevViewProjMat : Matrix4x4; + private var prevFrameCount : int; + private var wasActive : boolean; + // shortcuts to calculate global blur direction when using 'CameraMotion' + private var prevFrameForward : Vector3 = Vector3.forward; + private var prevFrameRight : Vector3 = Vector3.right; + private var prevFrameUp : Vector3 = Vector3.up; + private var prevFramePos : Vector3 = Vector3.zero; + + private function CalculateViewProjection() { + var viewMat : Matrix4x4 = GetComponent(Camera).worldToCameraMatrix; + var projMat : Matrix4x4 = GL.GetGPUProjectionMatrix (GetComponent(Camera).projectionMatrix, true); + currentViewProjMat = projMat * viewMat; + } + + function Start () { + CheckResources (); + + wasActive = gameObject.activeInHierarchy; + CalculateViewProjection (); + Remember (); + wasActive = false; // hack to fake position/rotation update and prevent bad blurs + } + + function OnEnable () { + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + } + + function OnDisable () { + if (null != motionBlurMaterial) { + DestroyImmediate (motionBlurMaterial); + motionBlurMaterial = null; + } + if (null != dx11MotionBlurMaterial) { + DestroyImmediate (dx11MotionBlurMaterial); + dx11MotionBlurMaterial = null; + } + if (null != tmpCam) { + DestroyImmediate (tmpCam); + tmpCam = null; + } + } + + function CheckResources () : boolean { + CheckSupport (true, true); // depth & hdr needed + motionBlurMaterial = CheckShaderAndCreateMaterial (shader, motionBlurMaterial); + + if (supportDX11 && filterType == MotionBlurFilter.ReconstructionDX11) { + dx11MotionBlurMaterial = CheckShaderAndCreateMaterial (dx11MotionBlurShader, dx11MotionBlurMaterial); + } + + if (!isSupported) + ReportAutoDisable (); + + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (false == CheckResources ()) { + Graphics.Blit (source, destination); + return; + } + + if (filterType == MotionBlurFilter.CameraMotion) + StartFrame (); + + // use if possible new RG format ... fallback to half otherwise + var rtFormat = SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.RGHalf) ? RenderTextureFormat.RGHalf : RenderTextureFormat.ARGBHalf; + + // get temp textures + var velBuffer : RenderTexture = RenderTexture.GetTemporary (divRoundUp (source.width, velocityDownsample), divRoundUp (source.height, velocityDownsample), 0, rtFormat); + var tileWidth : int = 1; + var tileHeight : int = 1; + maxVelocity = Mathf.Max (2.0f, maxVelocity); + + var _maxVelocity : float = maxVelocity; // calculate 'k' + // note: 's' is hardcoded in shaders except for DX11 path + + // auto DX11 fallback! + var fallbackFromDX11 : boolean = false; + if (filterType == MotionBlurFilter.ReconstructionDX11 && dx11MotionBlurMaterial == null) { + fallbackFromDX11 = true; + } + + if (filterType == MotionBlurFilter.Reconstruction || fallbackFromDX11 || filterType == MotionBlurFilter.ReconstructionDisc) { + maxVelocity = Mathf.Min (maxVelocity, MAX_RADIUS); + tileWidth = divRoundUp (velBuffer.width, maxVelocity); + tileHeight = divRoundUp (velBuffer.height, maxVelocity); + _maxVelocity = velBuffer.width/tileWidth; + } + else { + tileWidth = divRoundUp (velBuffer.width, maxVelocity); + tileHeight = divRoundUp (velBuffer.height, maxVelocity); + _maxVelocity = velBuffer.width/tileWidth; + } + + var tileMax : RenderTexture = RenderTexture.GetTemporary (tileWidth, tileHeight, 0, rtFormat); + var neighbourMax : RenderTexture = RenderTexture.GetTemporary (tileWidth, tileHeight, 0, rtFormat); + velBuffer.filterMode = FilterMode.Point; + tileMax.filterMode = FilterMode.Point; + neighbourMax.filterMode = FilterMode.Point; + if(noiseTexture) noiseTexture.filterMode = FilterMode.Point; + source.wrapMode = TextureWrapMode.Clamp; + velBuffer.wrapMode = TextureWrapMode.Clamp; + neighbourMax.wrapMode = TextureWrapMode.Clamp; + tileMax.wrapMode = TextureWrapMode.Clamp; + + // calc correct viewprj matrix + CalculateViewProjection (); + + // just started up? + if (gameObject.activeInHierarchy && !wasActive) { + Remember (); + } + wasActive = gameObject.activeInHierarchy; + + // matrices + var invViewPrj : Matrix4x4 = Matrix4x4.Inverse (currentViewProjMat); + motionBlurMaterial.SetMatrix ("_InvViewProj", invViewPrj); + motionBlurMaterial.SetMatrix ("_PrevViewProj", prevViewProjMat); + motionBlurMaterial.SetMatrix ("_ToPrevViewProjCombined", prevViewProjMat * invViewPrj); + + motionBlurMaterial.SetFloat ("_MaxVelocity", _maxVelocity); + motionBlurMaterial.SetFloat ("_MaxRadiusOrKInPaper", _maxVelocity); + motionBlurMaterial.SetFloat ("_MinVelocity", minVelocity); + motionBlurMaterial.SetFloat ("_VelocityScale", velocityScale); + motionBlurMaterial.SetFloat ("_Jitter", jitter); + + // texture samplers + motionBlurMaterial.SetTexture ("_NoiseTex", noiseTexture); + motionBlurMaterial.SetTexture ("_VelTex", velBuffer); + motionBlurMaterial.SetTexture ("_NeighbourMaxTex", neighbourMax); + motionBlurMaterial.SetTexture ("_TileTexDebug", tileMax); + + if (preview) { + // generate an artifical 'previous' matrix to simulate blur look + var viewMat : Matrix4x4 = GetComponent(Camera).worldToCameraMatrix; + var offset : Matrix4x4 = Matrix4x4.identity; + offset.SetTRS(previewScale * 0.3333f, Quaternion.identity, Vector3.one); // using only translation + var projMat : Matrix4x4 = GL.GetGPUProjectionMatrix (GetComponent(Camera).projectionMatrix, true); + prevViewProjMat = projMat * offset * viewMat; + motionBlurMaterial.SetMatrix ("_PrevViewProj", prevViewProjMat); + motionBlurMaterial.SetMatrix ("_ToPrevViewProjCombined", prevViewProjMat * invViewPrj); + } + + if (filterType == MotionBlurFilter.CameraMotion) + { + // build blur vector to be used in shader to create a global blur direction + var blurVector : Vector4 = Vector4.zero; + + var lookUpDown : float = Vector3.Dot (transform.up, Vector3.up); + var distanceVector : Vector3 = prevFramePos-transform.position; + + var distMag : float = distanceVector.magnitude; + + var farHeur : float = 1.0f; + + // pitch (vertical) + farHeur = (Vector3.Angle (transform.up, prevFrameUp) / GetComponent(Camera).fieldOfView) * (source.width * 0.75f); + blurVector.x = rotationScale * farHeur;//Mathf.Clamp01((1.0f-Vector3.Dot(transform.up, prevFrameUp))); + + // yaw #1 (horizontal, faded by pitch) + farHeur = (Vector3.Angle (transform.forward, prevFrameForward) / GetComponent(Camera).fieldOfView) * (source.width * 0.75f); + blurVector.y = rotationScale * lookUpDown * farHeur;//Mathf.Clamp01((1.0f-Vector3.Dot(transform.forward, prevFrameForward))); + + // yaw #2 (when looking down, faded by 1-pitch) + farHeur = (Vector3.Angle (transform.forward, prevFrameForward) / GetComponent(Camera).fieldOfView) * (source.width * 0.75f); + blurVector.z = rotationScale * (1.0f- lookUpDown) * farHeur;//Mathf.Clamp01((1.0f-Vector3.Dot(transform.forward, prevFrameForward))); + + if (distMag > Mathf.Epsilon && movementScale > Mathf.Epsilon) { + // forward (probably most important) + blurVector.w = movementScale * (Vector3.Dot (transform.forward, distanceVector) ) * (source.width * 0.5f); + // jump (maybe scale down further) + blurVector.x += movementScale * (Vector3.Dot (transform.up, distanceVector) ) * (source.width * 0.5f); + // strafe (maybe scale down further) + blurVector.y += movementScale * (Vector3.Dot (transform.right, distanceVector) ) * (source.width * 0.5f); + } + + if (preview) // crude approximation + motionBlurMaterial.SetVector ("_BlurDirectionPacked", Vector4 (previewScale.y, previewScale.x, 0.0f, previewScale.z) * 0.5f * GetComponent(Camera).fieldOfView); + else + motionBlurMaterial.SetVector ("_BlurDirectionPacked", blurVector); + } + else { + // generate velocity buffer + Graphics.Blit (source, velBuffer, motionBlurMaterial, 0); + + // patch up velocity buffer: + + // exclude certain layers (e.g. skinned objects as we cant really support that atm) + + var cam : Camera = null; + if (excludeLayers.value)// || dynamicLayers.value) + cam = GetTmpCam (); + + if (cam && excludeLayers.value != 0 && replacementClear && replacementClear.isSupported) { + cam.targetTexture = velBuffer; + cam.cullingMask = excludeLayers; + cam.RenderWithShader (replacementClear, ""); + } + + // dynamic layers (e.g. rigid bodies) + // no worky in 4.0, but let's fix for 4.x + /* + if (cam && dynamicLayers.value != 0 && replacementDynamics && replacementDynamics.isSupported) { + + Shader.SetGlobalFloat ("_MaxVelocity", maxVelocity); + Shader.SetGlobalFloat ("_VelocityScale", velocityScale); + Shader.SetGlobalVector ("_VelBufferSize", Vector4 (velBuffer.width, velBuffer.height, 0, 0)); + Shader.SetGlobalMatrix ("_PrevViewProj", prevViewProjMat); + Shader.SetGlobalMatrix ("_ViewProj", currentViewProjMat); + + cam.targetTexture = velBuffer; + cam.cullingMask = dynamicLayers; + cam.RenderWithShader (replacementDynamics, ""); + } + */ + + } + + if (!preview && Time.frameCount != prevFrameCount) { + // remember current transformation data for next frame + prevFrameCount = Time.frameCount; + Remember (); + } + + source.filterMode = FilterMode.Bilinear; + + // debug vel buffer: + if (showVelocity) { + // generate tile max and neighbour max + //Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); + //Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); + motionBlurMaterial.SetFloat ("_DisplayVelocityScale", showVelocityScale); + Graphics.Blit (velBuffer, destination, motionBlurMaterial, 1); + } + else { + if (filterType == MotionBlurFilter.ReconstructionDX11 && !fallbackFromDX11) { + // need to reset some parameters for dx11 shader + dx11MotionBlurMaterial.SetFloat ("_MinVelocity", minVelocity); + dx11MotionBlurMaterial.SetFloat ("_VelocityScale", velocityScale); + dx11MotionBlurMaterial.SetFloat ("_Jitter", jitter); + + // texture samplers + dx11MotionBlurMaterial.SetTexture ("_NoiseTex", noiseTexture); + dx11MotionBlurMaterial.SetTexture ("_VelTex", velBuffer); + dx11MotionBlurMaterial.SetTexture ("_NeighbourMaxTex", neighbourMax); + + dx11MotionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); + dx11MotionBlurMaterial.SetFloat ("_MaxRadiusOrKInPaper", _maxVelocity); + + // generate tile max and neighbour max + Graphics.Blit (velBuffer, tileMax, dx11MotionBlurMaterial, 0); + Graphics.Blit (tileMax, neighbourMax, dx11MotionBlurMaterial, 1); + + // final blur + Graphics.Blit (source, destination, dx11MotionBlurMaterial, 2); + } + else if (filterType == MotionBlurFilter.Reconstruction || fallbackFromDX11) { + // 'reconstructing' properly integrated color + motionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); + + // generate tile max and neighbour max + Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); + Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); + + // final blur + Graphics.Blit (source, destination, motionBlurMaterial, 4); + } + else if (filterType == MotionBlurFilter.CameraMotion) { + // orange box style motion blur + Graphics.Blit (source, destination, motionBlurMaterial, 6); + } + else if (filterType == MotionBlurFilter.ReconstructionDisc) { + // dof style motion blur defocuing and ellipse around the princical blur direction + // 'reconstructing' properly integrated color + motionBlurMaterial.SetFloat ("_SoftZDistance", Mathf.Max(0.00025f, softZDistance) ); + + // generate tile max and neighbour max + Graphics.Blit (velBuffer, tileMax, motionBlurMaterial, 2); + Graphics.Blit (tileMax, neighbourMax, motionBlurMaterial, 3); + + Graphics.Blit (source, destination, motionBlurMaterial, 7); + } + else { + // simple & fast blur (low quality): just blurring along velocity + Graphics.Blit (source, destination, motionBlurMaterial, 5); + } + } + + // cleanup + RenderTexture.ReleaseTemporary (velBuffer); + RenderTexture.ReleaseTemporary (tileMax); + RenderTexture.ReleaseTemporary (neighbourMax); + } + + function Remember () { + prevViewProjMat = currentViewProjMat; + prevFrameForward = transform.forward; + prevFrameRight = transform.right; + prevFrameUp = transform.up; + prevFramePos = transform.position; + } + + function GetTmpCam () : Camera { + if (tmpCam == null) { + var name : String = "_" + GetComponent(Camera).name + "_MotionBlurTmpCam"; + var go : GameObject = GameObject.Find (name); + if (null == go) // couldn't find, recreate + tmpCam = new GameObject (name, typeof (Camera)); + else + tmpCam = go; + } + + tmpCam.hideFlags = HideFlags.DontSave; + tmpCam.transform.position = GetComponent(Camera).transform.position; + tmpCam.transform.rotation = GetComponent(Camera).transform.rotation; + tmpCam.transform.localScale = GetComponent(Camera).transform.localScale; + tmpCam.GetComponent(Camera).CopyFrom (GetComponent(Camera)); + + tmpCam.GetComponent(Camera).enabled = false; + tmpCam.GetComponent(Camera).depthTextureMode = DepthTextureMode.None; + tmpCam.GetComponent(Camera).clearFlags = CameraClearFlags.Nothing; + + return tmpCam.GetComponent(Camera); + } + + function StartFrame () { + // take only x% of positional changes into account (camera motion) + // TODO: possibly do the same for rotational part + prevFramePos = Vector3.Slerp(prevFramePos, transform.position, 0.75f); + } + + function divRoundUp (x : int, d : int) : int { + return (x + d - 1) / d; + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js.meta new file mode 100644 index 0000000..7ad85e5 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/CameraMotionBlur.js.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: f7db9ec1392f34265817a55853e6ab07 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 85a88efa8c871af4a9d17c64791b6f4f, type: 3} + - dx11MotionBlurShader: {fileID: 4800000, guid: f1b13d7a80660504a858ea24cfa418c6, + type: 3} + - replacementClear: {fileID: 4800000, guid: 7699c5fbfa27745a1abe111ab7bf9785, type: 3} + - noiseTexture: {fileID: 2800000, guid: 31f5a8611c4ed1245b18456206e798dc, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js new file mode 100644 index 0000000..ae0a740 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js @@ -0,0 +1,163 @@ + +#pragma strict +@script ExecuteInEditMode +@script AddComponentMenu ("Image Effects/Color Adjustments/Color Correction (Curves, Saturation)") + +enum ColorCorrectionMode { + Simple = 0, + Advanced = 1 +} + +class ColorCorrectionCurves extends PostEffectsBase +{ + public var redChannel : AnimationCurve; + public var greenChannel : AnimationCurve; + public var blueChannel : AnimationCurve; + + public var useDepthCorrection : boolean = false; + + public var zCurve : AnimationCurve; + public var depthRedChannel : AnimationCurve; + public var depthGreenChannel : AnimationCurve; + public var depthBlueChannel : AnimationCurve; + + private var ccMaterial : Material; + private var ccDepthMaterial : Material; + private var selectiveCcMaterial : Material; + + private var rgbChannelTex : Texture2D; + private var rgbDepthChannelTex : Texture2D; + private var zCurveTex : Texture2D; + + public var saturation : float = 1.0f; + + public var selectiveCc : boolean = false; + + public var selectiveFromColor : Color = Color.white; + public var selectiveToColor : Color = Color.white; + + public var mode : ColorCorrectionMode; + + public var updateTextures : boolean = true; + + public var colorCorrectionCurvesShader : Shader = null; + public var simpleColorCorrectionCurvesShader : Shader = null; + public var colorCorrectionSelectiveShader : Shader = null; + + private var updateTexturesOnStartup : boolean = true; + + function Start () { + super (); + updateTexturesOnStartup = true; + } + + function Awake () { } + + function CheckResources () : boolean { + CheckSupport (mode == ColorCorrectionMode.Advanced); + + ccMaterial = CheckShaderAndCreateMaterial (simpleColorCorrectionCurvesShader, ccMaterial); + ccDepthMaterial = CheckShaderAndCreateMaterial (colorCorrectionCurvesShader, ccDepthMaterial); + selectiveCcMaterial = CheckShaderAndCreateMaterial (colorCorrectionSelectiveShader, selectiveCcMaterial); + + if (!rgbChannelTex) + rgbChannelTex = new Texture2D (256, 4, TextureFormat.ARGB32, false, true); + if (!rgbDepthChannelTex) + rgbDepthChannelTex = new Texture2D (256, 4, TextureFormat.ARGB32, false, true); + if (!zCurveTex) + zCurveTex = new Texture2D (256, 1, TextureFormat.ARGB32, false, true); + + rgbChannelTex.hideFlags = HideFlags.DontSave; + rgbDepthChannelTex.hideFlags = HideFlags.DontSave; + zCurveTex.hideFlags = HideFlags.DontSave; + + rgbChannelTex.wrapMode = TextureWrapMode.Clamp; + rgbDepthChannelTex.wrapMode = TextureWrapMode.Clamp; + zCurveTex.wrapMode = TextureWrapMode.Clamp; + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + public function UpdateParameters () + { + CheckResources(); // textures might not be created if we're tweaking UI while disabled + + if (redChannel && greenChannel && blueChannel) { + for (var i : float = 0.0f; i <= 1.0f; i += 1.0f / 255.0f) { + var rCh : float = Mathf.Clamp (redChannel.Evaluate(i), 0.0f, 1.0f); + var gCh : float = Mathf.Clamp (greenChannel.Evaluate(i), 0.0f, 1.0f); + var bCh : float = Mathf.Clamp (blueChannel.Evaluate(i), 0.0f, 1.0f); + + rgbChannelTex.SetPixel (Mathf.Floor(i*255.0f), 0, Color(rCh,rCh,rCh) ); + rgbChannelTex.SetPixel (Mathf.Floor(i*255.0f), 1, Color(gCh,gCh,gCh) ); + rgbChannelTex.SetPixel (Mathf.Floor(i*255.0f), 2, Color(bCh,bCh,bCh) ); + + var zC : float = Mathf.Clamp (zCurve.Evaluate(i), 0.0,1.0); + + zCurveTex.SetPixel (Mathf.Floor(i*255.0), 0, Color(zC,zC,zC) ); + + rCh = Mathf.Clamp (depthRedChannel.Evaluate(i), 0.0f,1.0f); + gCh = Mathf.Clamp (depthGreenChannel.Evaluate(i), 0.0f,1.0f); + bCh = Mathf.Clamp (depthBlueChannel.Evaluate(i), 0.0f,1.0f); + + rgbDepthChannelTex.SetPixel (Mathf.Floor(i*255.0f), 0, Color(rCh,rCh,rCh) ); + rgbDepthChannelTex.SetPixel (Mathf.Floor(i*255.0f), 1, Color(gCh,gCh,gCh) ); + rgbDepthChannelTex.SetPixel (Mathf.Floor(i*255.0f), 2, Color(bCh,bCh,bCh) ); + } + + rgbChannelTex.Apply (); + rgbDepthChannelTex.Apply (); + zCurveTex.Apply (); + } + } + + function UpdateTextures () { + UpdateParameters (); + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + if (updateTexturesOnStartup) { + UpdateParameters (); + updateTexturesOnStartup = false; + } + + if (useDepthCorrection) + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + + var renderTarget2Use : RenderTexture = destination; + + if (selectiveCc) { + renderTarget2Use = RenderTexture.GetTemporary (source.width, source.height); + } + + if (useDepthCorrection) { + ccDepthMaterial.SetTexture ("_RgbTex", rgbChannelTex); + ccDepthMaterial.SetTexture ("_ZCurve", zCurveTex); + ccDepthMaterial.SetTexture ("_RgbDepthTex", rgbDepthChannelTex); + ccDepthMaterial.SetFloat ("_Saturation", saturation); + + Graphics.Blit (source, renderTarget2Use, ccDepthMaterial); + } + else { + ccMaterial.SetTexture ("_RgbTex", rgbChannelTex); + ccMaterial.SetFloat ("_Saturation", saturation); + + Graphics.Blit (source, renderTarget2Use, ccMaterial); + } + + if (selectiveCc) { + selectiveCcMaterial.SetColor ("selColor", selectiveFromColor); + selectiveCcMaterial.SetColor ("targetColor", selectiveToColor); + Graphics.Blit (renderTarget2Use, destination, selectiveCcMaterial); + + RenderTexture.ReleaseTemporary (renderTarget2Use); + } + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js.meta new file mode 100644 index 0000000..6c4c182 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionCurves.js.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 2 +guid: 83b39678ff6aa4fec8d135d231ba9cde +MonoImporter: + serializedVersion: 2 + defaultReferences: + - colorCorrectionCurvesShader: {fileID: 4800000, guid: 62bcade1028c24ca1a39760ed84b9487, + type: 3} + - simpleColorCorrectionCurvesShader: {fileID: 4800000, guid: 438ddd58d82c84d9eb1fdc56111702e1, + type: 3} + - colorCorrectionSelectiveShader: {fileID: 4800000, guid: e515e0f94cefc4c0db54b45cba621544, + type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs new file mode 100644 index 0000000..1db371d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using System.Collections; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Color Adjustments/Color Correction (Ramp)")] +public class ColorCorrectionEffect : ImageEffectBase { + public Texture textureRamp; + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + material.SetTexture ("_RampTex", textureRamp); + Graphics.Blit (source, destination, material); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs.meta new file mode 100644 index 0000000..90ec40c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea59781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 67f8781cad112c75d0008dfa8d76c639, type: 3} + - textureRamp: {fileID: 2800000, guid: d440902fad11e807d00044888d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js new file mode 100644 index 0000000..4ef8496 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js @@ -0,0 +1,126 @@ + +#pragma strict +@script ExecuteInEditMode +@script AddComponentMenu ("Image Effects/Color Adjustments/Color Correction (3D Lookup Texture)") + +public class ColorCorrectionLut extends PostEffectsBase +{ + public var shader : Shader; + private var material : Material; + + // serialize this instead of having another 2d texture ref'ed + public var converted3DLut : Texture3D = null; + public var basedOnTempTex : String = ""; + + function CheckResources () : boolean { + CheckSupport (false); + + material = CheckShaderAndCreateMaterial (shader, material); + + if(!isSupported || !SystemInfo.supports3DTextures) + ReportAutoDisable (); + return isSupported; + } + + function OnDisable () { + if (material) { + DestroyImmediate (material); + material = null; + } + } + + function OnDestroy () { + if (converted3DLut) + DestroyImmediate (converted3DLut); + converted3DLut = null; + } + + public function SetIdentityLut () { + var dim : int = 16; + var newC : Color[] = new Color[dim*dim*dim]; + var oneOverDim : float = 1.0f / (1.0f * dim - 1.0f); + + for(var i : int = 0; i < dim; i++) { + for(var j : int = 0; j < dim; j++) { + for(var k : int = 0; k < dim; k++) { + newC[i + (j*dim) + (k*dim*dim)] = new Color((i*1.0f)*oneOverDim, (j*1.0f)*oneOverDim, (k*1.0f)*oneOverDim, 1.0f); + } + } + } + + if (converted3DLut) + DestroyImmediate (converted3DLut); + converted3DLut = new Texture3D (dim, dim, dim, TextureFormat.ARGB32, false); + converted3DLut.SetPixels (newC); + converted3DLut.Apply (); + basedOnTempTex = ""; + } + + public function ValidDimensions (tex2d : Texture2D) : boolean { + if (!tex2d) return false; + var h : int = tex2d.height; + if (h != Mathf.FloorToInt(Mathf.Sqrt(tex2d.width))) { + return false; + } + return true; + } + + public function Convert (temp2DTex : Texture2D, path : String) { + + // conversion fun: the given 2D texture needs to be of the format + // w * h, wheras h is the 'depth' (or 3d dimension 'dim') and w = dim * dim + + if (temp2DTex) { + var dim : int = temp2DTex.width * temp2DTex.height; + dim = temp2DTex.height; + + if (!ValidDimensions(temp2DTex)) { + Debug.LogWarning ("The given 2D texture " + temp2DTex.name + " cannot be used as a 3D LUT."); + basedOnTempTex = ""; + return; + } + + var c : Color[] = temp2DTex.GetPixels(); + var newC : Color[] = new Color[c.Length]; + + for(var i : int = 0; i < dim; i++) { + for(var j : int = 0; j < dim; j++) { + for(var k : int = 0; k < dim; k++) { + var j_ : int = dim-j-1; + newC[i + (j*dim) + (k*dim*dim)] = c[k*dim+i+j_*dim*dim]; + } + } + } + + if (converted3DLut) + DestroyImmediate (converted3DLut); + converted3DLut = new Texture3D (dim, dim, dim, TextureFormat.ARGB32, false); + converted3DLut.SetPixels (newC); + converted3DLut.Apply (); + basedOnTempTex = path; + } + else { + // error, something went terribly wrong + Debug.LogError ("Couldn't color correct with 3D LUT texture. Image Effect will be disabled."); + } + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources () == false || !SystemInfo.supports3DTextures) { + Graphics.Blit (source, destination); + return; + } + + if (converted3DLut == null) { + SetIdentityLut (); + } + + var lutSize : int = converted3DLut.width; + converted3DLut.wrapMode = TextureWrapMode.Clamp; + material.SetFloat("_Scale", (lutSize - 1) / (1.0f*lutSize)); + material.SetFloat("_Offset", 1.0f / (2.0f * lutSize)); + material.SetTexture("_ClutTex", converted3DLut); + + Graphics.Blit (source, destination, material, QualitySettings.activeColorSpace == ColorSpace.Linear ? 1 : 0); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js.meta new file mode 100644 index 0000000..320ad43 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionLut.js.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1409ce56b1c8422e849019fc420df42 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: b61f0d8d8244b4b28aa66b0c8cb46a8d, type: 3} + - clutTex: {fileID: 2800000, guid: a4b474cd484494a4aaa4bbf928219d09, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js new file mode 100644 index 0000000..0147112 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js @@ -0,0 +1,70 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent(Camera) +@script AddComponentMenu("Image Effects/Color Adjustments/Contrast Enhance (Unsharp Mask)") + +class ContrastEnhance extends PostEffectsBase { + public var intensity : float = 0.5; + public var threshhold : float = 0.0; + + private var separableBlurMaterial : Material; + private var contrastCompositeMaterial : Material; + + public var blurSpread : float = 1.0; + + public var separableBlurShader : Shader = null; + public var contrastCompositeShader : Shader = null; + + function CheckResources () : boolean { + CheckSupport (false); + + contrastCompositeMaterial = CheckShaderAndCreateMaterial (contrastCompositeShader, contrastCompositeMaterial); + separableBlurMaterial = CheckShaderAndCreateMaterial (separableBlurShader, separableBlurMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + var rtW : int = source.width; + var rtH : int = source.height; + + var color2 : RenderTexture = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); + + // downsample + + Graphics.Blit (source, color2); + var color4a : RenderTexture = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); + Graphics.Blit (color2, color4a); + RenderTexture.ReleaseTemporary (color2); + + // blur + + separableBlurMaterial.SetVector ("offsets", Vector4 (0.0, (blurSpread * 1.0) / color4a.height, 0.0, 0.0)); + var color4b : RenderTexture = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); + Graphics.Blit (color4a, color4b, separableBlurMaterial); + RenderTexture.ReleaseTemporary (color4a); + + separableBlurMaterial.SetVector ("offsets", Vector4 ((blurSpread * 1.0) / color4a.width, 0.0, 0.0, 0.0)); + color4a = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); + Graphics.Blit (color4b, color4a, separableBlurMaterial); + RenderTexture.ReleaseTemporary (color4b); + + // composite + + contrastCompositeMaterial.SetTexture ("_MainTexBlurred", color4a); + contrastCompositeMaterial.SetFloat ("intensity", intensity); + contrastCompositeMaterial.SetFloat ("threshhold", threshhold); + Graphics.Blit (source, destination, contrastCompositeMaterial); + + RenderTexture.ReleaseTemporary (color4a); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js.meta new file mode 100644 index 0000000..df16f33 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastEnhance.js.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: e653d08d21ce9453591b1dc2100fdfcd +MonoImporter: + serializedVersion: 2 + defaultReferences: + - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, + type: 3} + - contrastCompositeShader: {fileID: 4800000, guid: 273404942eede4ea1883ca1fb2942507, + type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs new file mode 100644 index 0000000..000a445 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs @@ -0,0 +1,194 @@ +using UnityEngine; +using System.Collections; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Color Adjustments/Contrast Stretch")] +public class ContrastStretchEffect : MonoBehaviour +{ + /// Adaptation speed - percents per frame, if playing at 30FPS. + /// Default is 0.02 (2% each 1/30s). + public float adaptationSpeed = 0.02f; + + /// If our scene is really dark (or really bright), we might not want to + /// stretch its contrast to the full range. + /// limitMinimum=0, limitMaximum=1 is the same as not applying the effect at all. + /// limitMinimum=1, limitMaximum=0 is always stretching colors to full range. + + /// The limit on the minimum luminance (0...1) - we won't go above this. + public float limitMinimum = 0.2f; + + /// The limit on the maximum luminance (0...1) - we won't go below this. + public float limitMaximum = 0.6f; + + + // To maintain adaptation levels over time, we need two 1x1 render textures + // and ping-pong between them. + private RenderTexture[] adaptRenderTex = new RenderTexture[2]; + private int curAdaptIndex = 0; + + + // Computes scene luminance (grayscale) image + public Shader shaderLum; + private Material m_materialLum; + protected Material materialLum { + get { + if( m_materialLum == null ) { + m_materialLum = new Material(shaderLum); + m_materialLum.hideFlags = HideFlags.HideAndDontSave; + } + return m_materialLum; + } + } + + // Reduces size of the image by 2x2, while computing maximum/minimum values. + // By repeatedly applying this shader, we reduce the initial luminance image + // to 1x1 image with minimum/maximum luminances found. + public Shader shaderReduce; + private Material m_materialReduce; + protected Material materialReduce { + get { + if( m_materialReduce == null ) { + m_materialReduce = new Material(shaderReduce); + m_materialReduce.hideFlags = HideFlags.HideAndDontSave; + } + return m_materialReduce; + } + } + + // Adaptation shader - gradually "adapts" minimum/maximum luminances, + // based on currently adapted 1x1 image and the actual 1x1 image of the current scene. + public Shader shaderAdapt; + private Material m_materialAdapt; + protected Material materialAdapt { + get { + if( m_materialAdapt == null ) { + m_materialAdapt = new Material(shaderAdapt); + m_materialAdapt.hideFlags = HideFlags.HideAndDontSave; + } + return m_materialAdapt; + } + } + + // Final pass - stretches the color values of the original scene, based on currently + // adpated minimum/maximum values. + public Shader shaderApply; + private Material m_materialApply; + protected Material materialApply { + get { + if( m_materialApply == null ) { + m_materialApply = new Material(shaderApply); + m_materialApply.hideFlags = HideFlags.HideAndDontSave; + } + return m_materialApply; + } + } + + void Start() + { + // Disable if we don't support image effects + if (!SystemInfo.supportsImageEffects) { + enabled = false; + return; + } + + if (!shaderAdapt.isSupported || !shaderApply.isSupported || !shaderLum.isSupported || !shaderReduce.isSupported) { + enabled = false; + return; + } + } + + void OnEnable() + { + for( int i = 0; i < 2; ++i ) + { + if( !adaptRenderTex[i] ) { + adaptRenderTex[i] = new RenderTexture(1, 1, 0); + adaptRenderTex[i].hideFlags = HideFlags.HideAndDontSave; + } + } + } + + void OnDisable() + { + for( int i = 0; i < 2; ++i ) + { + DestroyImmediate( adaptRenderTex[i] ); + adaptRenderTex[i] = null; + } + if( m_materialLum ) + DestroyImmediate( m_materialLum ); + if( m_materialReduce ) + DestroyImmediate( m_materialReduce ); + if( m_materialAdapt ) + DestroyImmediate( m_materialAdapt ); + if( m_materialApply ) + DestroyImmediate( m_materialApply ); + } + + + /// Apply the filter + void OnRenderImage (RenderTexture source, RenderTexture destination) + { + // Blit to smaller RT and convert to luminance on the way + const int TEMP_RATIO = 1; // 4x4 smaller + RenderTexture rtTempSrc = RenderTexture.GetTemporary(source.width/TEMP_RATIO, source.height/TEMP_RATIO); + Graphics.Blit (source, rtTempSrc, materialLum); + + // Repeatedly reduce this image in size, computing min/max luminance values + // In the end we'll have 1x1 image with min/max luminances found. + const int FINAL_SIZE = 1; + //const int FINAL_SIZE = 1; + while( rtTempSrc.width > FINAL_SIZE || rtTempSrc.height > FINAL_SIZE ) + { + const int REDUCE_RATIO = 2; // our shader does 2x2 reduction + int destW = rtTempSrc.width / REDUCE_RATIO; + if( destW < FINAL_SIZE ) destW = FINAL_SIZE; + int destH = rtTempSrc.height / REDUCE_RATIO; + if( destH < FINAL_SIZE ) destH = FINAL_SIZE; + RenderTexture rtTempDst = RenderTexture.GetTemporary(destW,destH); + Graphics.Blit (rtTempSrc, rtTempDst, materialReduce); + + // Release old src temporary, and make new temporary the source + RenderTexture.ReleaseTemporary( rtTempSrc ); + rtTempSrc = rtTempDst; + } + + // Update viewer's adaptation level + CalculateAdaptation( rtTempSrc ); + + // Apply contrast strech to the original scene, using currently adapted parameters + materialApply.SetTexture("_AdaptTex", adaptRenderTex[curAdaptIndex] ); + Graphics.Blit (source, destination, materialApply); + + RenderTexture.ReleaseTemporary( rtTempSrc ); + } + + + /// Helper function to do gradual adaptation to min/max luminances + private void CalculateAdaptation( Texture curTexture ) + { + int prevAdaptIndex = curAdaptIndex; + curAdaptIndex = (curAdaptIndex+1) % 2; + + // Adaptation speed is expressed in percents/frame, based on 30FPS. + // Calculate the adaptation lerp, based on current FPS. + float adaptLerp = 1.0f - Mathf.Pow( 1.0f - adaptationSpeed, 30.0f * Time.deltaTime ); + const float kMinAdaptLerp = 0.01f; + adaptLerp = Mathf.Clamp( adaptLerp, kMinAdaptLerp, 1 ); + + materialAdapt.SetTexture("_CurTex", curTexture ); + materialAdapt.SetVector("_AdaptParams", new Vector4( + adaptLerp, + limitMinimum, + limitMaximum, + 0.0f + )); + // clear destination RT so its contents don't need to be restored + Graphics.SetRenderTarget(adaptRenderTex[curAdaptIndex]); + GL.Clear(false, true, Color.black); + Graphics.Blit ( + adaptRenderTex[prevAdaptIndex], + adaptRenderTex[curAdaptIndex], + materialAdapt); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs.meta new file mode 100644 index 0000000..626388c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ContrastStretchEffect.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ec92b071d2d424aecb3e46f28eb63174 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shaderLum: {fileID: 4800000, guid: befbb4b9c320b4b18a08ef7afb93b6c9, type: 3} + - shaderReduce: {fileID: 4800000, guid: 57b33a14b6d5347c5a85c36f6cb3b280, type: 3} + - shaderAdapt: {fileID: 4800000, guid: 257bc83cbeb544540bd0e558aa9b1383, type: 3} + - shaderApply: {fileID: 4800000, guid: f4901f25d4e1542589348bbb89563d8e, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js b/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js new file mode 100644 index 0000000..b3b8523 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js @@ -0,0 +1,74 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Edge Detection/Crease Shading") + +class Crease extends PostEffectsBase { + public var intensity : float = 0.5; + public var softness : int = 1; + public var spread : float = 1.0; + + public var blurShader : Shader; + private var blurMaterial : Material = null; + + public var depthFetchShader : Shader; + private var depthFetchMaterial : Material = null; + + public var creaseApplyShader : Shader; + private var creaseApplyMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (true); + + blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); + depthFetchMaterial = CheckShaderAndCreateMaterial (depthFetchShader, depthFetchMaterial); + creaseApplyMaterial = CheckShaderAndCreateMaterial (creaseApplyShader, creaseApplyMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + var rtW : int = source.width; + var rtH : int = source.height; + + var widthOverHeight : float = (1.0f * rtW) / (1.0f * rtH); + var oneOverBaseSize : float = 1.0f / 512.0f; + + var hrTex : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0); + var lrTex1 : RenderTexture = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); + + Graphics.Blit (source,hrTex, depthFetchMaterial); + Graphics.Blit (hrTex, lrTex1); + + for(var i : int = 0; i < softness; i++) { + var lrTex2 : RenderTexture = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); + blurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (lrTex1, lrTex2, blurMaterial); + RenderTexture.ReleaseTemporary (lrTex1); + lrTex1 = lrTex2; + + lrTex2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); + blurMaterial.SetVector ("offsets", Vector4 (spread * oneOverBaseSize / widthOverHeight, 0.0, 0.0, 0.0)); + Graphics.Blit (lrTex1, lrTex2, blurMaterial); + RenderTexture.ReleaseTemporary (lrTex1); + lrTex1 = lrTex2; + } + + creaseApplyMaterial.SetTexture ("_HrDepthTex", hrTex); + creaseApplyMaterial.SetTexture ("_LrDepthTex", lrTex1); + creaseApplyMaterial.SetFloat ("intensity", intensity); + Graphics.Blit (source,destination, creaseApplyMaterial); + + RenderTexture.ReleaseTemporary (hrTex); + RenderTexture.ReleaseTemporary (lrTex1); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js.meta new file mode 100644 index 0000000..6402748 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Crease.js.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0a8e0413e0444491eaddd12550af679e +MonoImporter: + serializedVersion: 2 + defaultReferences: + - blurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, type: 3} + - depthFetchShader: {fileID: 4800000, guid: 14768d3865b1342e3a861fbe19ba2db2, type: 3} + - creaseApplyShader: {fileID: 4800000, guid: b59984d82af624bd3b0c777f038276f2, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js new file mode 100644 index 0000000..a31e5fe --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js @@ -0,0 +1,415 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Camera/Depth of Field (deprecated)") + +enum Dof34QualitySetting { + OnlyBackground = 1, + BackgroundAndForeground = 2, +} + +enum DofResolution { + High = 2, + Medium = 3, + Low = 4, +} + +enum DofBlurriness { + Low = 1, + High = 2, + VeryHigh = 4, +} + +enum BokehDestination { + Background = 0x1, + Foreground = 0x2, + BackgroundAndForeground = 0x3, +} + +class DepthOfField34 extends PostEffectsBase { + + static private var SMOOTH_DOWNSAMPLE_PASS : int = 6; + static private var BOKEH_EXTRA_BLUR : float = 2.0f; + + public var quality : Dof34QualitySetting = Dof34QualitySetting.OnlyBackground; + public var resolution : DofResolution = DofResolution.Low; + public var simpleTweakMode : boolean = true; + + public var focalPoint : float = 1.0f; + public var smoothness : float = 0.5f; + + public var focalZDistance : float = 0.0f; + public var focalZStartCurve : float = 1.0f; + public var focalZEndCurve : float = 1.0f; + + private var focalStartCurve : float = 2.0f; + private var focalEndCurve : float = 2.0f; + private var focalDistance01 : float = 0.1f; + + public var objectFocus : Transform = null; + public var focalSize : float = 0.0f; + + public var bluriness : DofBlurriness = DofBlurriness.High; + public var maxBlurSpread : float = 1.75f; + + public var foregroundBlurExtrude : float = 1.15f; + + public var dofBlurShader : Shader; + private var dofBlurMaterial : Material = null; + + public var dofShader : Shader; + private var dofMaterial : Material = null; + + public var visualize : boolean = false; + public var bokehDestination : BokehDestination = BokehDestination.Background; + + private var widthOverHeight : float = 1.25f; + private var oneOverBaseSize : float = 1.0f / 512.0f; + + public var bokeh : boolean = false; + public var bokehSupport : boolean = true; + public var bokehShader : Shader; + public var bokehTexture : Texture2D; + public var bokehScale : float = 2.4f; + public var bokehIntensity : float = 0.15f; + public var bokehThreshholdContrast : float = 0.1f; + public var bokehThreshholdLuminance : float = 0.55f; + public var bokehDownsample : int = 1; + private var bokehMaterial : Material; + + function CreateMaterials () { + dofBlurMaterial = CheckShaderAndCreateMaterial (dofBlurShader, dofBlurMaterial); + dofMaterial = CheckShaderAndCreateMaterial (dofShader,dofMaterial); + bokehSupport = bokehShader.isSupported; + + if(bokeh && bokehSupport && bokehShader) + bokehMaterial = CheckShaderAndCreateMaterial (bokehShader, bokehMaterial); + } + + function CheckResources () : boolean { + CheckSupport (true); + + dofBlurMaterial = CheckShaderAndCreateMaterial (dofBlurShader, dofBlurMaterial); + dofMaterial = CheckShaderAndCreateMaterial (dofShader,dofMaterial); + bokehSupport = bokehShader.isSupported; + + if(bokeh && bokehSupport && bokehShader) + bokehMaterial = CheckShaderAndCreateMaterial (bokehShader, bokehMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnDisable () { + Quads.Cleanup (); + } + + function OnEnable() { + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + } + + function FocalDistance01 (worldDist : float) : float { + return GetComponent(Camera).WorldToViewportPoint((worldDist-GetComponent(Camera).nearClipPlane) * GetComponent(Camera).transform.forward + GetComponent(Camera).transform.position).z / (GetComponent(Camera).farClipPlane-GetComponent(Camera).nearClipPlane); + } + + function GetDividerBasedOnQuality () { + var divider : int = 1; + if (resolution == DofResolution.Medium) + divider = 2; + else if (resolution == DofResolution.Low) + divider = 2; + return divider; + } + + function GetLowResolutionDividerBasedOnQuality (baseDivider : int) { + var lowTexDivider : int = baseDivider; + if (resolution == DofResolution.High) + lowTexDivider *= 2; + if (resolution == DofResolution.Low) + lowTexDivider *= 2; + return lowTexDivider; + } + + private var foregroundTexture : RenderTexture = null; + private var mediumRezWorkTexture : RenderTexture = null; + private var finalDefocus : RenderTexture = null; + private var lowRezWorkTexture : RenderTexture = null; + private var bokehSource : RenderTexture = null; + private var bokehSource2 : RenderTexture = null; + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + if (smoothness < 0.1f) + smoothness = 0.1f; + + // update needed focal & rt size parameter + + bokeh = bokeh && bokehSupport; + var bokehBlurAmplifier : float = bokeh ? BOKEH_EXTRA_BLUR : 1.0f; + + var blurForeground : boolean = quality > Dof34QualitySetting.OnlyBackground; + var focal01Size : float = focalSize / (GetComponent(Camera).farClipPlane - GetComponent(Camera).nearClipPlane);; + + if (simpleTweakMode) { + focalDistance01 = objectFocus ? (GetComponent(Camera).WorldToViewportPoint (objectFocus.position)).z / (GetComponent(Camera).farClipPlane) : FocalDistance01 (focalPoint); + focalStartCurve = focalDistance01 * smoothness; + focalEndCurve = focalStartCurve; + blurForeground = blurForeground && (focalPoint > (GetComponent(Camera).nearClipPlane + Mathf.Epsilon)); + } + else { + if(objectFocus) { + var vpPoint = GetComponent(Camera).WorldToViewportPoint (objectFocus.position); + vpPoint.z = (vpPoint.z) / (GetComponent(Camera).farClipPlane); + focalDistance01 = vpPoint.z; + } + else + focalDistance01 = FocalDistance01 (focalZDistance); + + focalStartCurve = focalZStartCurve; + focalEndCurve = focalZEndCurve; + blurForeground = blurForeground && (focalPoint > (GetComponent(Camera).nearClipPlane + Mathf.Epsilon)); + } + + widthOverHeight = (1.0f * source.width) / (1.0f * source.height); + oneOverBaseSize = 1.0f / 512.0f; + + dofMaterial.SetFloat ("_ForegroundBlurExtrude", foregroundBlurExtrude); + dofMaterial.SetVector ("_CurveParams", Vector4 (simpleTweakMode ? 1.0f / focalStartCurve : focalStartCurve, simpleTweakMode ? 1.0f / focalEndCurve : focalEndCurve, focal01Size * 0.5, focalDistance01)); + dofMaterial.SetVector ("_InvRenderTargetSize", Vector4 (1.0 / (1.0 * source.width), 1.0 / (1.0 * source.height),0.0,0.0)); + + var divider : int = GetDividerBasedOnQuality (); + var lowTexDivider : int = GetLowResolutionDividerBasedOnQuality (divider); + + AllocateTextures (blurForeground, source, divider, lowTexDivider); + + // WRITE COC to alpha channel + // source is only being bound to detect y texcoord flip + Graphics.Blit (source, source, dofMaterial, 3); + + // better DOWNSAMPLE (could actually be weighted for higher quality) + Downsample (source, mediumRezWorkTexture); + + // BLUR A LITTLE first, which has two purposes + // 1.) reduce jitter, noise, aliasing + // 2.) produce the little-blur buffer used in composition later + Blur (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 4, maxBlurSpread); + + if (bokeh && (bokehDestination & BokehDestination.Background)) { + dofMaterial.SetVector ("_Threshhold", Vector4(bokehThreshholdContrast, bokehThreshholdLuminance, 0.95f, 0.0f)); + + // add and mark the parts that should end up as bokeh shapes + Graphics.Blit (mediumRezWorkTexture, bokehSource2, dofMaterial, 11); + + // remove those parts (maybe even a little tittle bittle more) from the regurlarly blurred buffer + //Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture, dofMaterial, 10); + Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture);//, dofMaterial, 10); + + // maybe you want to reblur the small blur ... but not really needed. + //Blur (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 4, maxBlurSpread); + + // bigger BLUR + Blur (lowRezWorkTexture, lowRezWorkTexture, bluriness, 0, maxBlurSpread * bokehBlurAmplifier); + } + else { + // bigger BLUR + Downsample (mediumRezWorkTexture, lowRezWorkTexture); + Blur (lowRezWorkTexture, lowRezWorkTexture, bluriness, 0, maxBlurSpread); + } + + dofBlurMaterial.SetTexture ("_TapLow", lowRezWorkTexture); + dofBlurMaterial.SetTexture ("_TapMedium", mediumRezWorkTexture); + Graphics.Blit (null, finalDefocus, dofBlurMaterial, 3); + + // we are only adding bokeh now if the background is the only part we have to deal with + if (bokeh && (bokehDestination & BokehDestination.Background)) + AddBokeh (bokehSource2, bokehSource, finalDefocus); + + dofMaterial.SetTexture ("_TapLowBackground", finalDefocus); + dofMaterial.SetTexture ("_TapMedium", mediumRezWorkTexture); // needed for debugging/visualization + + // FINAL DEFOCUS (background) + Graphics.Blit (source, blurForeground ? foregroundTexture : destination, dofMaterial, visualize ? 2 : 0); + + // FINAL DEFOCUS (foreground) + if (blurForeground) { + // WRITE COC to alpha channel + Graphics.Blit (foregroundTexture, source, dofMaterial, 5); + + // DOWNSAMPLE (unweighted) + Downsample (source, mediumRezWorkTexture); + + // BLUR A LITTLE first, which has two purposes + // 1.) reduce jitter, noise, aliasing + // 2.) produce the little-blur buffer used in composition later + BlurFg (mediumRezWorkTexture, mediumRezWorkTexture, DofBlurriness.Low, 2, maxBlurSpread); + + if (bokeh && (bokehDestination & BokehDestination.Foreground)) { + dofMaterial.SetVector ("_Threshhold", Vector4(bokehThreshholdContrast * 0.5f, bokehThreshholdLuminance, 0.0f, 0.0f)); + + // add and mark the parts that should end up as bokeh shapes + Graphics.Blit (mediumRezWorkTexture, bokehSource2, dofMaterial, 11); + + // remove the parts (maybe even a little tittle bittle more) that will end up in bokeh space + //Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture, dofMaterial, 10); + Graphics.Blit (mediumRezWorkTexture, lowRezWorkTexture);//, dofMaterial, 10); + + // big BLUR + BlurFg (lowRezWorkTexture, lowRezWorkTexture, bluriness, 1, maxBlurSpread * bokehBlurAmplifier); + } + else { + // big BLUR + BlurFg (mediumRezWorkTexture, lowRezWorkTexture, bluriness, 1, maxBlurSpread); + } + + // simple upsample once + Graphics.Blit (lowRezWorkTexture, finalDefocus); + + dofMaterial.SetTexture ("_TapLowForeground", finalDefocus); + Graphics.Blit (source, destination, dofMaterial, visualize ? 1 : 4); + + if (bokeh && (bokehDestination & BokehDestination.Foreground)) + AddBokeh (bokehSource2, bokehSource, destination); + } + + ReleaseTextures (); + } + + function Blur (from : RenderTexture, to : RenderTexture, iterations : DofBlurriness, blurPass: int, spread : float) { + var tmp : RenderTexture = RenderTexture.GetTemporary (to.width, to.height); + if (iterations > 1) { + BlurHex (from, to, blurPass, spread, tmp); + if (iterations > 2) { + dofBlurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + } + else { + dofBlurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + RenderTexture.ReleaseTemporary (tmp); + } + + function BlurFg (from : RenderTexture, to : RenderTexture, iterations : DofBlurriness, blurPass: int, spread : float) { + // we want a nice, big coc, hence we need to tap once from this (higher resolution) texture + dofBlurMaterial.SetTexture ("_TapHigh", from); + + var tmp : RenderTexture = RenderTexture.GetTemporary (to.width, to.height); + if (iterations > 1) { + BlurHex (from, to, blurPass, spread, tmp); + if (iterations > 2) { + dofBlurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + } + else { + dofBlurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + RenderTexture.ReleaseTemporary (tmp); + } + + function BlurHex (from : RenderTexture, to : RenderTexture, blurPass: int, spread : float, tmp : RenderTexture) { + dofBlurMaterial.SetVector ("offsets", Vector4 (0.0, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (from, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, 0.0, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (to, tmp, dofBlurMaterial, blurPass); + dofBlurMaterial.SetVector ("offsets", Vector4 (spread / widthOverHeight * oneOverBaseSize, -spread * oneOverBaseSize, 0.0, 0.0)); + Graphics.Blit (tmp, to, dofBlurMaterial, blurPass); + } + + function Downsample (from : RenderTexture, to : RenderTexture) { + dofMaterial.SetVector ("_InvRenderTargetSize", Vector4 (1.0f / (1.0f * to.width), 1.0f / (1.0f * to.height), 0.0f, 0.0f)); + Graphics.Blit (from, to, dofMaterial, SMOOTH_DOWNSAMPLE_PASS); + } + + function AddBokeh (bokehInfo : RenderTexture, tempTex : RenderTexture, finalTarget : RenderTexture) { + if (bokehMaterial) { + var meshes : Mesh[] = Quads.GetMeshes (tempTex.width, tempTex.height); // quads: exchanging more triangles with less overdraw + + RenderTexture.active = tempTex; + GL.Clear (false, true, Color (0.0f, 0.0f, 0.0f, 0.0f)); + + GL.PushMatrix (); + GL.LoadIdentity (); + + // point filter mode is important, otherwise we get bokeh shape & size artefacts + bokehInfo.filterMode = FilterMode.Point; + + var arW : float = (bokehInfo.width * 1.0f) / (bokehInfo.height * 1.0f); + var sc : float = 2.0f / (1.0f * bokehInfo.width); + sc += bokehScale * maxBlurSpread * BOKEH_EXTRA_BLUR * oneOverBaseSize; + + bokehMaterial.SetTexture ("_Source", bokehInfo); + bokehMaterial.SetTexture ("_MainTex", bokehTexture); + bokehMaterial.SetVector ("_ArScale", Vector4 (sc, sc * arW, 0.5f, 0.5f * arW)); + bokehMaterial.SetFloat ("_Intensity", bokehIntensity); + bokehMaterial.SetPass (0); + + for (var m : Mesh in meshes) + if (m) Graphics.DrawMeshNow (m, Matrix4x4.identity); + + GL.PopMatrix (); + + Graphics.Blit (tempTex, finalTarget, dofMaterial, 8); + + // important to set back as we sample from this later on + bokehInfo.filterMode = FilterMode.Bilinear; + } + } + + + function ReleaseTextures () { + if (foregroundTexture) RenderTexture.ReleaseTemporary (foregroundTexture); + if (finalDefocus) RenderTexture.ReleaseTemporary (finalDefocus); + if (mediumRezWorkTexture) RenderTexture.ReleaseTemporary (mediumRezWorkTexture); + if (lowRezWorkTexture) RenderTexture.ReleaseTemporary (lowRezWorkTexture); + if (bokehSource) RenderTexture.ReleaseTemporary (bokehSource); + if (bokehSource2) RenderTexture.ReleaseTemporary (bokehSource2); + } + + function AllocateTextures (blurForeground : boolean, source : RenderTexture, divider : int, lowTexDivider : int) { + foregroundTexture = null; + if (blurForeground) + foregroundTexture = RenderTexture.GetTemporary (source.width, source.height, 0); + mediumRezWorkTexture = RenderTexture.GetTemporary (source.width / divider, source.height / divider, 0); + finalDefocus = RenderTexture.GetTemporary (source.width / divider, source.height / divider, 0); + lowRezWorkTexture = RenderTexture.GetTemporary (source.width / lowTexDivider, source.height / lowTexDivider, 0); + bokehSource = null; + bokehSource2 = null; + if (bokeh) { + bokehSource = RenderTexture.GetTemporary (source.width / (lowTexDivider * bokehDownsample), source.height / (lowTexDivider * bokehDownsample), 0, RenderTextureFormat.ARGBHalf); + bokehSource2 = RenderTexture.GetTemporary (source.width / (lowTexDivider * bokehDownsample), source.height / (lowTexDivider * bokehDownsample), 0, RenderTextureFormat.ARGBHalf); + bokehSource.filterMode = FilterMode.Bilinear; + bokehSource2.filterMode = FilterMode.Bilinear; + RenderTexture.active = bokehSource2; + GL.Clear (false, true, Color(0.0f, 0.0f, 0.0f, 0.0f)); + } + + // to make sure: always use bilinear filter setting + + source.filterMode = FilterMode.Bilinear; + finalDefocus.filterMode = FilterMode.Bilinear; + mediumRezWorkTexture.filterMode = FilterMode.Bilinear; + lowRezWorkTexture.filterMode = FilterMode.Bilinear; + if (foregroundTexture) + foregroundTexture.filterMode = FilterMode.Bilinear; + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js.meta new file mode 100644 index 0000000..eb8c3a4 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfField34.js.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 237a7a10492cc4ae6a3adcc6419f4961 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - objectFocus: {instanceID: 0} + - dofBlurShader: {fileID: 4800000, guid: bb4af680337344a4abad65a4e8873c50, type: 3} + - dofShader: {fileID: 4800000, guid: 987fb0677d01f43ce8a9dbf12271e668, type: 3} + - bokehShader: {fileID: 4800000, guid: 57cdacf9b217546aaa18edf39a6151c0, type: 3} + - bokehTexture: {fileID: 2800000, guid: fc00ec05a89da4ff695a4273715cd5ce, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js new file mode 100644 index 0000000..770479e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js @@ -0,0 +1,384 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Camera/Depth of Field (Lens Blur, Scatter, DX11)") + +class DepthOfFieldScatter extends PostEffectsBase +{ + public var visualizeFocus : boolean = false; + public var focalLength : float = 10.0f; + public var focalSize : float = 0.05f; + public var aperture : float = 11.5f; + public var focalTransform : Transform = null; + public var maxBlurSize : float = 2.0f; + public var highResolution : boolean = false; + + public enum BlurType { + DiscBlur = 0, + DX11 = 1, + } + + public enum BlurSampleCount { + Low = 0, + Medium = 1, + High = 2, + } + + public var blurType : BlurType = BlurType.DiscBlur; + public var blurSampleCount : BlurSampleCount = BlurSampleCount.High; + + public var nearBlur : boolean = false; + public var foregroundOverlap : float = 1.0f; + + public var dofHdrShader : Shader; + private var dofHdrMaterial : Material = null; + + public var dx11BokehShader : Shader; + private var dx11bokehMaterial : Material; + + public var dx11BokehThreshhold : float = 0.5f; + public var dx11SpawnHeuristic : float = 0.0875f; + public var dx11BokehTexture : Texture2D = null; + public var dx11BokehScale : float = 1.2f; + public var dx11BokehIntensity : float = 2.5f; + + private var focalDistance01 : float = 10.0f; + private var cbDrawArgs : ComputeBuffer; + private var cbPoints : ComputeBuffer; + private var internalBlurWidth : float = 1.0f; + + function CheckResources () : boolean { + CheckSupport (true); // only requires depth, not HDR + + dofHdrMaterial = CheckShaderAndCreateMaterial (dofHdrShader, dofHdrMaterial); + if(supportDX11 && blurType == BlurType.DX11) { + dx11bokehMaterial = CheckShaderAndCreateMaterial(dx11BokehShader, dx11bokehMaterial); + CreateComputeResources (); + } + + if(!isSupported) + ReportAutoDisable (); + + return isSupported; + } + + function OnEnable () { + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + } + + function OnDisable() + { + ReleaseComputeResources (); + + if(dofHdrMaterial) DestroyImmediate(dofHdrMaterial); + dofHdrMaterial = null; + if(dx11bokehMaterial) DestroyImmediate(dx11bokehMaterial); + dx11bokehMaterial = null; + } + + function ReleaseComputeResources () + { + if(cbDrawArgs) cbDrawArgs.Release(); + cbDrawArgs = null; + if(cbPoints) cbPoints.Release(); + cbPoints = null; + } + + function CreateComputeResources () + { + if (cbDrawArgs == null) + { + cbDrawArgs = new ComputeBuffer (1, 16, ComputeBufferType.DrawIndirect); + var args = new int[4]; + args[0] = 0; args[1] = 1; args[2] = 0; args[3] = 0; + cbDrawArgs.SetData (args); + } + if (cbPoints == null) + { + cbPoints = new ComputeBuffer (90000, 12+16, ComputeBufferType.Append); + } + } + + function FocalDistance01 (worldDist : float) : float { + return GetComponent(Camera).WorldToViewportPoint((worldDist-GetComponent(Camera).nearClipPlane) * GetComponent(Camera).transform.forward + GetComponent(Camera).transform.position).z / (GetComponent(Camera).farClipPlane-GetComponent(Camera).nearClipPlane); + } + + private function WriteCoc (fromTo : RenderTexture, fgDilate : boolean) { + dofHdrMaterial.SetTexture("_FgOverlap", null); + + if (nearBlur && fgDilate) { + + var rtW : int = fromTo.width/2; + var rtH : int = fromTo.height/2; + + // capture fg coc + var temp2 : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); + Graphics.Blit (fromTo, temp2, dofHdrMaterial, 4); + + // special blur + var fgAdjustment : float = internalBlurWidth * foregroundOverlap; + + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, fgAdjustment , 0.0f, fgAdjustment)); + var temp1 : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); + Graphics.Blit (temp2, temp1, dofHdrMaterial, 2); + RenderTexture.ReleaseTemporary(temp2); + + dofHdrMaterial.SetVector ("_Offsets", Vector4 (fgAdjustment, 0.0f, 0.0f, fgAdjustment)); + temp2 = RenderTexture.GetTemporary (rtW, rtH, 0, fromTo.format); + Graphics.Blit (temp1, temp2, dofHdrMaterial, 2); + RenderTexture.ReleaseTemporary(temp1); + + // "merge up" with background COC + dofHdrMaterial.SetTexture("_FgOverlap", temp2); + fromTo.MarkRestoreExpected(); // only touching alpha channel, RT restore expected + Graphics.Blit (fromTo, fromTo, dofHdrMaterial, 13); + RenderTexture.ReleaseTemporary(temp2); + } + else { + // capture full coc in alpha channel (fromTo is not read, but bound to detect screen flip) + Graphics.Blit (fromTo, fromTo, dofHdrMaterial, 0); + } + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(!CheckResources ()) { + Graphics.Blit (source, destination); + return; + } + + // clamp & prepare values so they make sense + + if (aperture < 0.0f) aperture = 0.0f; + if (maxBlurSize < 0.1f) maxBlurSize = 0.1f; + focalSize = Mathf.Clamp(focalSize, 0.0f, 2.0f); + internalBlurWidth = Mathf.Max(maxBlurSize, 0.0f); + + // focal & coc calculations + + focalDistance01 = (focalTransform) ? (GetComponent(Camera).WorldToViewportPoint (focalTransform.position)).z / (GetComponent(Camera).farClipPlane) : FocalDistance01 (focalLength); + dofHdrMaterial.SetVector ("_CurveParams", Vector4 (1.0f, focalSize, aperture/10.0f, focalDistance01)); + + // possible render texture helpers + + var rtLow : RenderTexture = null; + var rtLow2 : RenderTexture = null; + var rtSuperLow1 : RenderTexture = null; + var rtSuperLow2 : RenderTexture = null; + var fgBlurDist : float = internalBlurWidth * foregroundOverlap; + + if(visualizeFocus) + { + + // + // 2. + // visualize coc + // + // + + WriteCoc (source, true); + Graphics.Blit (source, destination, dofHdrMaterial, 16); + } + else if ((blurType == BlurType.DX11) && dx11bokehMaterial) + { + + // + // 1. + // optimized dx11 bokeh scatter + // + // + + + if(highResolution) { + + internalBlurWidth = internalBlurWidth < 0.1f ? 0.1f : internalBlurWidth; + fgBlurDist = internalBlurWidth * foregroundOverlap; + + rtLow = RenderTexture.GetTemporary (source.width, source.height, 0, source.format); + + var dest2 = RenderTexture.GetTemporary (source.width, source.height, 0, source.format); + + // capture COC + WriteCoc (source, false); + + // blur a bit so we can do a frequency check + rtSuperLow1 = RenderTexture.GetTemporary(source.width>>1, source.height>>1, 0, source.format); + rtSuperLow2 = RenderTexture.GetTemporary(source.width>>1, source.height>>1, 0, source.format); + + Graphics.Blit(source, rtSuperLow1, dofHdrMaterial, 15); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, 1.5f , 0.0f, 1.5f)); + Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 19); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (1.5f, 0.0f, 0.0f, 1.5f)); + Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 19); + + // capture fg coc + if(nearBlur) + Graphics.Blit (source, rtSuperLow2, dofHdrMaterial, 4); + + dx11bokehMaterial.SetTexture ("_BlurredColor", rtSuperLow1); + dx11bokehMaterial.SetFloat ("_SpawnHeuristic", dx11SpawnHeuristic); + dx11bokehMaterial.SetVector ("_BokehParams", Vector4(dx11BokehScale, dx11BokehIntensity, Mathf.Clamp(dx11BokehThreshhold, 0.005f, 4.0f), internalBlurWidth)); + dx11bokehMaterial.SetTexture ("_FgCocMask", nearBlur ? rtSuperLow2 : null); + + // collect bokeh candidates and replace with a darker pixel + Graphics.SetRandomWriteTarget (1, cbPoints); + Graphics.Blit (source, rtLow, dx11bokehMaterial, 0); + Graphics.ClearRandomWriteTargets (); + + // fg coc blur happens here (after collect!) + if(nearBlur) { + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, fgBlurDist , 0.0f, fgBlurDist)); + Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 2); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (fgBlurDist, 0.0f, 0.0f, fgBlurDist)); + Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 2); + + // merge fg coc with bg coc + Graphics.Blit (rtSuperLow2, rtLow, dofHdrMaterial, 3); + } + + // NEW: LAY OUT ALPHA on destination target so we get nicer outlines for the high rez version + Graphics.Blit (rtLow, dest2, dofHdrMaterial, 20); + + // box blur (easier to merge with bokeh buffer) + dofHdrMaterial.SetVector ("_Offsets", Vector4 (internalBlurWidth, 0.0f , 0.0f, internalBlurWidth)); + Graphics.Blit (rtLow, source, dofHdrMaterial, 5); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, internalBlurWidth, 0.0f, internalBlurWidth)); + Graphics.Blit (source, dest2, dofHdrMaterial, 21); + + // apply bokeh candidates + Graphics.SetRenderTarget (dest2); + ComputeBuffer.CopyCount (cbPoints, cbDrawArgs, 0); + dx11bokehMaterial.SetBuffer ("pointBuffer", cbPoints); + dx11bokehMaterial.SetTexture ("_MainTex", dx11BokehTexture); + dx11bokehMaterial.SetVector ("_Screen", Vector3(1.0f/(1.0f*source.width), 1.0f/(1.0f*source.height), internalBlurWidth)); + dx11bokehMaterial.SetPass (2); + + Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0); + + Graphics.Blit (dest2, destination); // hackaround for DX11 high resolution flipfun (OPTIMIZEME) + + RenderTexture.ReleaseTemporary(dest2); + RenderTexture.ReleaseTemporary(rtSuperLow1); + RenderTexture.ReleaseTemporary(rtSuperLow2); + } + else { + rtLow = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); + rtLow2 = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); + + fgBlurDist = internalBlurWidth * foregroundOverlap; + + // capture COC & color in low resolution + WriteCoc (source, false); + source.filterMode = FilterMode.Bilinear; + Graphics.Blit (source, rtLow, dofHdrMaterial, 6); + + // blur a bit so we can do a frequency check + rtSuperLow1 = RenderTexture.GetTemporary(rtLow.width>>1, rtLow.height>>1, 0, rtLow.format); + rtSuperLow2 = RenderTexture.GetTemporary(rtLow.width>>1, rtLow.height>>1, 0, rtLow.format); + + Graphics.Blit(rtLow, rtSuperLow1, dofHdrMaterial, 15); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, 1.5f , 0.0f, 1.5f)); + Graphics.Blit (rtSuperLow1, rtSuperLow2, dofHdrMaterial, 19); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (1.5f, 0.0f, 0.0f, 1.5f)); + Graphics.Blit (rtSuperLow2, rtSuperLow1, dofHdrMaterial, 19); + + var rtLow3 : RenderTexture = null; + + if(nearBlur) { + // capture fg coc + rtLow3 = RenderTexture.GetTemporary (source.width>>1, source.height>>1, 0, source.format); + Graphics.Blit (source, rtLow3, dofHdrMaterial, 4); + } + + dx11bokehMaterial.SetTexture ("_BlurredColor", rtSuperLow1); + dx11bokehMaterial.SetFloat ("_SpawnHeuristic", dx11SpawnHeuristic); + dx11bokehMaterial.SetVector ("_BokehParams", Vector4(dx11BokehScale, dx11BokehIntensity, Mathf.Clamp(dx11BokehThreshhold, 0.005f, 4.0f), internalBlurWidth)); + dx11bokehMaterial.SetTexture ("_FgCocMask", rtLow3); + + // collect bokeh candidates and replace with a darker pixel + Graphics.SetRandomWriteTarget (1, cbPoints); + Graphics.Blit (rtLow, rtLow2, dx11bokehMaterial, 0); + Graphics.ClearRandomWriteTargets (); + + RenderTexture.ReleaseTemporary(rtSuperLow1); + RenderTexture.ReleaseTemporary(rtSuperLow2); + + // fg coc blur happens here (after collect!) + if(nearBlur) { + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, fgBlurDist , 0.0f, fgBlurDist)); + Graphics.Blit (rtLow3, rtLow, dofHdrMaterial, 2); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (fgBlurDist, 0.0f, 0.0f, fgBlurDist)); + Graphics.Blit (rtLow, rtLow3, dofHdrMaterial, 2); + + // merge fg coc with bg coc + Graphics.Blit (rtLow3, rtLow2, dofHdrMaterial, 3); + } + + // box blur (easier to merge with bokeh buffer) + dofHdrMaterial.SetVector ("_Offsets", Vector4 (internalBlurWidth, 0.0f , 0.0f, internalBlurWidth)); + Graphics.Blit (rtLow2, rtLow, dofHdrMaterial, 5); + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, internalBlurWidth, 0.0f, internalBlurWidth)); + Graphics.Blit (rtLow, rtLow2, dofHdrMaterial, 5); + + // apply bokeh candidates + Graphics.SetRenderTarget (rtLow2); + ComputeBuffer.CopyCount (cbPoints, cbDrawArgs, 0); + dx11bokehMaterial.SetBuffer ("pointBuffer", cbPoints); + dx11bokehMaterial.SetTexture ("_MainTex", dx11BokehTexture); + dx11bokehMaterial.SetVector ("_Screen", Vector3(1.0f/(1.0f*rtLow2.width), 1.0f/(1.0f*rtLow2.height), internalBlurWidth)); + dx11bokehMaterial.SetPass (1); + Graphics.DrawProceduralIndirect (MeshTopology.Points, cbDrawArgs, 0); + + // upsample & combine + dofHdrMaterial.SetTexture ("_LowRez", rtLow2); + dofHdrMaterial.SetTexture ("_FgOverlap", rtLow3); + dofHdrMaterial.SetVector ("_Offsets", ((1.0f*source.width)/(1.0f*rtLow2.width)) * internalBlurWidth * Vector4.one); + Graphics.Blit (source, destination, dofHdrMaterial, 9); + + if(rtLow3) RenderTexture.ReleaseTemporary(rtLow3); + } + } + else + { + + // + // 2. + // poisson disc style blur in low resolution + // + // + + source.filterMode = FilterMode.Bilinear; + + if(highResolution) internalBlurWidth *= 2.0f; + + WriteCoc (source, true); + + rtLow = RenderTexture.GetTemporary (source.width >> 1, source.height >> 1, 0, source.format); + rtLow2 = RenderTexture.GetTemporary (source.width >> 1, source.height >> 1, 0, source.format); + + var blurPass : int = (blurSampleCount == BlurSampleCount.High || blurSampleCount == BlurSampleCount.Medium) ? 17 : 11; + + if(highResolution) { + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, internalBlurWidth, 0.025f, internalBlurWidth)); + Graphics.Blit (source, destination, dofHdrMaterial, blurPass); + } + else { + dofHdrMaterial.SetVector ("_Offsets", Vector4 (0.0f, internalBlurWidth, 0.1f, internalBlurWidth)); + + // blur + Graphics.Blit (source, rtLow, dofHdrMaterial, 6); + Graphics.Blit (rtLow, rtLow2, dofHdrMaterial, blurPass); + + // cheaper blur in high resolution, upsample and combine + dofHdrMaterial.SetTexture("_LowRez", rtLow2); + dofHdrMaterial.SetTexture("_FgOverlap", null); + dofHdrMaterial.SetVector ("_Offsets", Vector4.one * ((1.0f*source.width)/(1.0f*rtLow2.width)) * internalBlurWidth); + Graphics.Blit (source, destination, dofHdrMaterial, blurSampleCount == BlurSampleCount.High ? 18 : 12); + } + } + + if(rtLow) RenderTexture.ReleaseTemporary(rtLow); + if(rtLow2) RenderTexture.ReleaseTemporary(rtLow2); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js.meta new file mode 100644 index 0000000..f52c218 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/DepthOfFieldScatter.js.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: f202adaee27c646fa9d90739bb84aa42 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - focalTransform: {instanceID: 0} + - dofHdrShader: {fileID: 4800000, guid: acd613035ff3e455e8abf23fdc8c8c24, type: 3} + - dx11BokehShader: {fileID: 4800000, guid: d8e82664aa8686642a424c88ab10164a, type: 3} + - dx11BokehTexture: {fileID: 2800000, guid: a4cdca73d61814d33ac1587f6c163bca, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js b/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js new file mode 100644 index 0000000..bda1b1c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js @@ -0,0 +1,78 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Edge Detection/Edge Detection") + +enum EdgeDetectMode { + TriangleDepthNormals = 0, + RobertsCrossDepthNormals = 1, + SobelDepth = 2, + SobelDepthThin = 3, + TriangleLuminance = 4, +} + +class EdgeDetectEffectNormals extends PostEffectsBase { + + public var mode : EdgeDetectMode = EdgeDetectMode.SobelDepthThin; + public var sensitivityDepth : float = 1.0f; + public var sensitivityNormals : float = 1.0f; + public var lumThreshhold : float = 0.2f; + public var edgeExp : float = 1.0f; + public var sampleDist : float = 1.0f; + public var edgesOnly : float = 0.0f; + public var edgesOnlyBgColor : Color = Color.white; + + public var edgeDetectShader : Shader; + private var edgeDetectMaterial : Material = null; + private var oldMode : EdgeDetectMode = EdgeDetectMode.SobelDepthThin; + + function CheckResources () : boolean { + CheckSupport (true); + + edgeDetectMaterial = CheckShaderAndCreateMaterial (edgeDetectShader,edgeDetectMaterial); + if (mode != oldMode) + SetCameraFlag (); + + oldMode = mode; + + if (!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function Start () { + oldMode = mode; + } + + function SetCameraFlag () { + if (mode == EdgeDetectMode.SobelDepth || mode == EdgeDetectMode.SobelDepthThin) + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + else if (mode == EdgeDetectMode.TriangleDepthNormals || mode == EdgeDetectMode.RobertsCrossDepthNormals) + GetComponent(Camera).depthTextureMode |= DepthTextureMode.DepthNormals; + } + + function OnEnable() { + SetCameraFlag(); + } + + @ImageEffectOpaque + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (CheckResources () == false) { + Graphics.Blit (source, destination); + return; + } + + var sensitivity : Vector2 = Vector2 (sensitivityDepth, sensitivityNormals); + edgeDetectMaterial.SetVector ("_Sensitivity", Vector4 (sensitivity.x, sensitivity.y, 1.0, sensitivity.y)); + edgeDetectMaterial.SetFloat ("_BgFade", edgesOnly); + edgeDetectMaterial.SetFloat ("_SampleDistance", sampleDist); + edgeDetectMaterial.SetVector ("_BgColor", edgesOnlyBgColor); + edgeDetectMaterial.SetFloat ("_Exponent", edgeExp); + edgeDetectMaterial.SetFloat ("_Threshold", lumThreshhold); + + Graphics.Blit (source, destination, edgeDetectMaterial, mode); + } +} + diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js.meta new file mode 100644 index 0000000..afbc6a6 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/EdgeDetectEffectNormals.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 57378565f2adf4d3fbe949ebe1453f09 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - edgeDetectShader: {fileID: 4800000, guid: 0d1644bdf064147baa97f235fc5b4903, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js b/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js new file mode 100644 index 0000000..0977ac4 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js @@ -0,0 +1,98 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Bloom and Glow/Bloom (Optimized)") + +class FastBloom extends PostEffectsBase { + + public enum Resolution { + Low = 0, + High = 1, + } + + public enum BlurType { + Standard = 0, + Sgx = 1, + } + + @Range(0.0f, 1.5f) + public var threshhold : float = 0.25f; + @Range(0.0f, 2.5f) + public var intensity : float = 0.75f; + + @Range(0.25f, 5.5f) + public var blurSize : float = 1.0f; + + var resolution : Resolution = Resolution.Low; + @Range(1, 4) + public var blurIterations : int = 1; + + public var blurType = BlurType.Standard; + + public var fastBloomShader : Shader; + private var fastBloomMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (false); + + fastBloomMaterial = CheckShaderAndCreateMaterial (fastBloomShader, fastBloomMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnDisable() { + if(fastBloomMaterial) + DestroyImmediate (fastBloomMaterial); + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources() == false) { + Graphics.Blit (source, destination); + return; + } + + var divider : int = resolution == Resolution.Low ? 4 : 2; + var widthMod : float = resolution == Resolution.Low ? 0.5f : 1.0f; + + fastBloomMaterial.SetVector ("_Parameter", Vector4 (blurSize * widthMod, 0.0f, threshhold, intensity)); + source.filterMode = FilterMode.Bilinear; + + var rtW = source.width/divider; + var rtH = source.height/divider; + + // downsample + var rt : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + rt.filterMode = FilterMode.Bilinear; + Graphics.Blit (source, rt, fastBloomMaterial, 1); + + var passOffs = blurType == BlurType.Standard ? 0 : 2; + + for(var i : int = 0; i < blurIterations; i++) { + fastBloomMaterial.SetVector ("_Parameter", Vector4 (blurSize * widthMod + (i*1.0f), 0.0f, threshhold, intensity)); + + // vertical blur + var rt2 : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + rt2.filterMode = FilterMode.Bilinear; + Graphics.Blit (rt, rt2, fastBloomMaterial, 2 + passOffs); + RenderTexture.ReleaseTemporary (rt); + rt = rt2; + + // horizontal blur + rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + rt2.filterMode = FilterMode.Bilinear; + Graphics.Blit (rt, rt2, fastBloomMaterial, 3 + passOffs); + RenderTexture.ReleaseTemporary (rt); + rt = rt2; + } + + fastBloomMaterial.SetTexture ("_Bloom", rt); + + Graphics.Blit (source, destination, fastBloomMaterial, 0); + + RenderTexture.ReleaseTemporary (rt); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js.meta new file mode 100644 index 0000000..514035d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/FastBloom.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97b4768c3683045e4bfdb2e78272970c +MonoImporter: + serializedVersion: 2 + defaultReferences: + - fastBloomShader: {fileID: 4800000, guid: 68a00c837b82e4c6d92e7da765dc5f1d, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js b/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js new file mode 100644 index 0000000..4742613 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js @@ -0,0 +1,37 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Displacement/Fisheye") + +class Fisheye extends PostEffectsBase { + public var strengthX : float = 0.05f; + public var strengthY : float = 0.05f; + + public var fishEyeShader : Shader = null; + private var fisheyeMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (false); + fisheyeMaterial = CheckShaderAndCreateMaterial(fishEyeShader,fisheyeMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + var oneOverBaseSize : float = 80.0f / 512.0f; // to keep values more like in the old version of fisheye + + var ar : float = (source.width * 1.0f) / (source.height * 1.0f); + + fisheyeMaterial.SetVector ("intensity", Vector4 (strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize, strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize)); + Graphics.Blit (source, destination, fisheyeMaterial); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js.meta new file mode 100644 index 0000000..858164d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Fisheye.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7d5488e098d8f4eb492591bb089fe793 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - fishEyeShader: {fileID: 4800000, guid: 874ceab4425f64bccb1d14032f4452b1, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js b/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js new file mode 100644 index 0000000..4ee8abd --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js @@ -0,0 +1,140 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Rendering/Global Fog") + +class GlobalFog extends PostEffectsBase { + + private var CAMERA_NEAR : float = 0.5f; + private var CAMERA_FAR : float = 50.0f; + private var CAMERA_FOV : float = 60.0f; + private var CAMERA_ASPECT_RATIO : float = 1.333333f; + + public var distanceFog : boolean = true; + public var heightFog : boolean = true; + public var height : float = 1.0f; + @Range(0.001f,10.0f) + public var heightDensity : float = 2.0f; + public var startDistance : float = 0.0f; + + public var fogShader : Shader; + private var fogMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (true); + + fogMaterial = CheckShaderAndCreateMaterial (fogShader, fogMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + @ImageEffectOpaque + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (CheckResources()==false || (!distanceFog && !heightFog)) + { + Graphics.Blit (source, destination); + return; + } + + CAMERA_NEAR = GetComponent(Camera).nearClipPlane; + CAMERA_FAR = GetComponent(Camera).farClipPlane; + CAMERA_FOV = GetComponent(Camera).fieldOfView; + CAMERA_ASPECT_RATIO = GetComponent(Camera).aspect; + + var frustumCorners : Matrix4x4 = Matrix4x4.identity; + var vec : Vector4; + var corner : Vector3; + + var fovWHalf : float = CAMERA_FOV * 0.5f; + + var toRight : Vector3 = GetComponent(Camera).transform.right * CAMERA_NEAR * Mathf.Tan (fovWHalf * Mathf.Deg2Rad) * CAMERA_ASPECT_RATIO; + var toTop : Vector3 = GetComponent(Camera).transform.up * CAMERA_NEAR * Mathf.Tan (fovWHalf * Mathf.Deg2Rad); + + var topLeft : Vector3 = (GetComponent(Camera).transform.forward * CAMERA_NEAR - toRight + toTop); + var CAMERA_SCALE : float = topLeft.magnitude * CAMERA_FAR/CAMERA_NEAR; + + topLeft.Normalize(); + topLeft *= CAMERA_SCALE; + + var topRight : Vector3 = (GetComponent(Camera).transform.forward * CAMERA_NEAR + toRight + toTop); + topRight.Normalize(); + topRight *= CAMERA_SCALE; + + var bottomRight : Vector3 = (GetComponent(Camera).transform.forward * CAMERA_NEAR + toRight - toTop); + bottomRight.Normalize(); + bottomRight *= CAMERA_SCALE; + + var bottomLeft : Vector3 = (GetComponent(Camera).transform.forward * CAMERA_NEAR - toRight - toTop); + bottomLeft.Normalize(); + bottomLeft *= CAMERA_SCALE; + + frustumCorners.SetRow (0, topLeft); + frustumCorners.SetRow (1, topRight); + frustumCorners.SetRow (2, bottomRight); + frustumCorners.SetRow (3, bottomLeft); + + var camPos = GetComponent(Camera).transform.position; + var FdotC : float = camPos.y-height; + var paramK : float = (FdotC <= 0.0f ? 1.0f : 0.0f); + fogMaterial.SetMatrix ("_FrustumCornersWS", frustumCorners); + fogMaterial.SetVector ("_CameraWS", camPos); + fogMaterial.SetVector ("_HeightParams", Vector4 (height, FdotC, paramK, heightDensity*0.5f)); + fogMaterial.SetVector ("_DistanceParams", Vector4 (-Mathf.Max(startDistance,0.0f), 0, 0, 0)); + + var sceneMode = RenderSettings.fogMode; + var sceneDensity = RenderSettings.fogDensity; + var sceneStart = RenderSettings.fogStartDistance; + var sceneEnd = RenderSettings.fogEndDistance; + var sceneParams : Vector4; + var linear : boolean = (sceneMode == UnityEngine.FogMode.Linear); + var diff : float = linear ? sceneEnd - sceneStart : 0.0f; + var invDiff : float = Mathf.Abs(diff) > 0.0001f ? 1.0f / diff : 0.0f; + sceneParams.x = sceneDensity * 1.2011224087f; // density / sqrt(ln(2)), used by Exp2 fog mode + sceneParams.y = sceneDensity * 1.4426950408f; // density / ln(2), used by Exp fog mode + sceneParams.z = linear ? -invDiff : 0.0f; + sceneParams.w = linear ? sceneEnd * invDiff : 0.0f; + fogMaterial.SetVector ("_SceneFogParams", sceneParams); + fogMaterial.SetInt ("_SceneFogMode", sceneMode); + + var pass : int = 0; + if (distanceFog && heightFog) + pass = 0; // distance + height + else if (distanceFog) + pass = 1; // distance only + else + pass = 2; // height only + CustomGraphicsBlit (source, destination, fogMaterial, pass); + } + + static function CustomGraphicsBlit (source : RenderTexture, dest : RenderTexture, fxMaterial : Material, passNr : int) { + RenderTexture.active = dest; + + fxMaterial.SetTexture ("_MainTex", source); + + GL.PushMatrix (); + GL.LoadOrtho (); + + fxMaterial.SetPass (passNr); + + GL.Begin (GL.QUADS); + + GL.MultiTexCoord2 (0, 0.0f, 0.0f); + GL.Vertex3 (0.0f, 0.0f, 3.0f); // BL + + GL.MultiTexCoord2 (0, 1.0f, 0.0f); + GL.Vertex3 (1.0f, 0.0f, 2.0f); // BR + + GL.MultiTexCoord2 (0, 1.0f, 1.0f); + GL.Vertex3 (1.0f, 1.0f, 1.0f); // TR + + GL.MultiTexCoord2 (0, 0.0f, 1.0f); + GL.Vertex3 (0.0f, 1.0f, 0.0); // TL + + GL.End (); + GL.PopMatrix (); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js.meta new file mode 100644 index 0000000..a7af5e8 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GlobalFog.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 34c3946ab5378473cb34bedd1c8194ba +MonoImporter: + serializedVersion: 2 + defaultReferences: + - fogShader: {fileID: 4800000, guid: 70d8568987ac0499f952b54c7c13e265, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs new file mode 100644 index 0000000..1657ca9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs @@ -0,0 +1,184 @@ +using UnityEngine; + +// Glow uses the alpha channel as a source of "extra brightness". +// All builtin Unity shaders output baseTexture.alpha * color.alpha, plus +// specularHighlight * specColor.alpha into that. +// Usually you'd want either to make base textures to have zero alpha; or +// set the color to have zero alpha (by default alpha is 0.5). + +[ExecuteInEditMode] +[RequireComponent (typeof(Camera))] +[AddComponentMenu("Image Effects/Bloom and Glow/Glow (Deprecated)")] +public class GlowEffect : MonoBehaviour +{ + /// The brightness of the glow. Values larger than one give extra "boost". + public float glowIntensity = 1.5f; + + /// Blur iterations - larger number means more blur. + public int blurIterations = 3; + + /// Blur spread for each iteration. Lower values + /// give better looking blur, but require more iterations to + /// get large blurs. Value is usually between 0.5 and 1.0. + public float blurSpread = 0.7f; + + /// Tint glow with this color. Alpha adds additional glow everywhere. + public Color glowTint = new Color(1,1,1,0); + + + // -------------------------------------------------------- + // The final composition shader: + // adds (glow color * glow alpha * amount) to the original image. + // In the combiner glow amount can be only in 0..1 range; we apply extra + // amount during the blurring phase. + + public Shader compositeShader; + Material m_CompositeMaterial = null; + protected Material compositeMaterial { + get { + if (m_CompositeMaterial == null) { + m_CompositeMaterial = new Material(compositeShader); + m_CompositeMaterial.hideFlags = HideFlags.HideAndDontSave; + } + return m_CompositeMaterial; + } + } + + + // -------------------------------------------------------- + // The blur iteration shader. + // Basically it just takes 4 texture samples and averages them. + // By applying it repeatedly and spreading out sample locations + // we get a Gaussian blur approximation. + // The alpha value in _Color would normally be 0.25 (to average 4 samples), + // however if we have glow amount larger than 1 then we increase this. + + public Shader blurShader; + Material m_BlurMaterial = null; + protected Material blurMaterial { + get { + if (m_BlurMaterial == null) { + m_BlurMaterial = new Material(blurShader); + m_BlurMaterial.hideFlags = HideFlags.HideAndDontSave; + } + return m_BlurMaterial; + } + } + + + // -------------------------------------------------------- + // The image downsample shaders for each brightness mode. + // It is in external assets as it's quite complex and uses Cg. + public Shader downsampleShader; + Material m_DownsampleMaterial = null; + protected Material downsampleMaterial { + get { + if (m_DownsampleMaterial == null) { + m_DownsampleMaterial = new Material( downsampleShader ); + m_DownsampleMaterial.hideFlags = HideFlags.HideAndDontSave; + } + return m_DownsampleMaterial; + } + } + + + // -------------------------------------------------------- + // finally, the actual code + + protected void OnDisable() + { + if( m_CompositeMaterial ) { + DestroyImmediate( m_CompositeMaterial ); + } + if( m_BlurMaterial ) { + DestroyImmediate( m_BlurMaterial ); + } + if( m_DownsampleMaterial ) + DestroyImmediate( m_DownsampleMaterial ); + } + + protected void Start() + { + // Disable if we don't support image effects + if (!SystemInfo.supportsImageEffects) + { + enabled = false; + return; + } + + // Disable the effect if no downsample shader is setup + if( downsampleShader == null ) + { + Debug.Log ("No downsample shader assigned! Disabling glow."); + enabled = false; + } + // Disable if any of the shaders can't run on the users graphics card + else + { + if( !blurMaterial.shader.isSupported ) + enabled = false; + if( !compositeMaterial.shader.isSupported ) + enabled = false; + if( !downsampleMaterial.shader.isSupported ) + enabled = false; + } + } + + // Performs one blur iteration. + public void FourTapCone (RenderTexture source, RenderTexture dest, int iteration) + { + float off = 0.5f + iteration*blurSpread; + Graphics.BlitMultiTap (source, dest, blurMaterial, + new Vector2( off, off), + new Vector2(-off, off), + new Vector2( off,-off), + new Vector2(-off,-off) + ); + } + + // Downsamples the texture to a quarter resolution. + private void DownSample4x (RenderTexture source, RenderTexture dest) + { + downsampleMaterial.color = new Color( glowTint.r, glowTint.g, glowTint.b, glowTint.a/4.0f ); + Graphics.Blit (source, dest, downsampleMaterial); + } + + // Called by the camera to apply the image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) + { + // Clamp parameters to sane values + glowIntensity = Mathf.Clamp( glowIntensity, 0.0f, 10.0f ); + blurIterations = Mathf.Clamp( blurIterations, 0, 30 ); + blurSpread = Mathf.Clamp( blurSpread, 0.5f, 1.0f ); + + int rtW = source.width/4; + int rtH = source.height/4; + RenderTexture buffer = RenderTexture.GetTemporary(rtW, rtH, 0); + + // Copy source to the 4x4 smaller texture. + DownSample4x (source, buffer); + + // Blur the small texture + float extraBlurBoost = Mathf.Clamp01( (glowIntensity - 1.0f) / 4.0f ); + blurMaterial.color = new Color( 1F, 1F, 1F, 0.25f + extraBlurBoost ); + + for(int i = 0; i < blurIterations; i++) + { + RenderTexture buffer2 = RenderTexture.GetTemporary(rtW, rtH, 0); + FourTapCone (buffer, buffer2, i); + RenderTexture.ReleaseTemporary(buffer); + buffer = buffer2; + } + Graphics.Blit(source,destination); + + BlitGlow(buffer, destination); + + RenderTexture.ReleaseTemporary(buffer); + } + + public void BlitGlow( RenderTexture source, RenderTexture dest ) + { + compositeMaterial.color = new Color(1F, 1F, 1F, Mathf.Clamp01(glowIntensity)); + Graphics.Blit (source, dest, compositeMaterial); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs.meta new file mode 100644 index 0000000..220ef67 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GlowEffect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0d1352984e3c6465088f6cc7c4ce6e22 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - compositeShader: {fileID: 4800000, guid: 96ca71e39c7b6fb4f9bec2c5bf331349, type: 3} + - blurShader: {fileID: 4800000, guid: fb52973118cf00648825ced2fcca240c, type: 3} + - downsampleShader: {fileID: 4800000, guid: b14b79b8936134d3f8238f0c2d40d634, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs new file mode 100644 index 0000000..2977208 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Color Adjustments/Grayscale")] +public class GrayscaleEffect : ImageEffectBase { + public Texture textureRamp; + public float rampOffset; + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + material.SetTexture("_RampTex", textureRamp); + material.SetFloat("_RampOffset", rampOffset); + Graphics.Blit (source, destination, material); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs.meta new file mode 100644 index 0000000..a31f0c0 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/GrayscaleEffect.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 243a781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: daf9781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim b/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim new file mode 100644 index 0000000..2065b88 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim.meta new file mode 100644 index 0000000..4e02ca7 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Idle.anim.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 14091a4df447a464ba214bdea67d6443 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs new file mode 100644 index 0000000..f356767 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs @@ -0,0 +1,40 @@ +using UnityEngine; + +[RequireComponent (typeof(Camera))] +[AddComponentMenu("")] +public class ImageEffectBase : MonoBehaviour { + /// Provides a shader property that is set in the inspector + /// and a material instantiated from the shader + public Shader shader; + private Material m_Material; + + protected virtual void Start () + { + // Disable if we don't support image effects + if (!SystemInfo.supportsImageEffects) { + enabled = false; + return; + } + + // Disable the image effect if the shader can't + // run on the users graphics card + if (!shader || !shader.isSupported) + enabled = false; + } + + protected Material material { + get { + if (m_Material == null) { + m_Material = new Material (shader); + m_Material.hideFlags = HideFlags.HideAndDontSave; + } + return m_Material; + } + } + + protected virtual void OnDisable() { + if( m_Material ) { + DestroyImmediate( m_Material ); + } + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs.meta new file mode 100644 index 0000000..4a06a63 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffectBase.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f6469eb0ad1119d6d00011d98d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs new file mode 100644 index 0000000..3b1e17a --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs @@ -0,0 +1,37 @@ +using UnityEngine; +//using System; + +/// A Utility class for performing various image based rendering tasks. +[AddComponentMenu("")] +public class ImageEffects +{ + public static void RenderDistortion(Material material, RenderTexture source, RenderTexture destination, float angle, Vector2 center, Vector2 radius) + { + bool invertY = source.texelSize.y < 0.0f; + if (invertY) + { + center.y = 1.0f - center.y; + angle = -angle; + } + + Matrix4x4 rotationMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, angle), Vector3.one); + + material.SetMatrix("_RotationMatrix", rotationMatrix); + material.SetVector("_CenterRadius", new Vector4(center.x, center.y, radius.x, radius.y)); + material.SetFloat("_Angle", angle * Mathf.Deg2Rad); + + Graphics.Blit(source, destination, material); + } + + [System.Obsolete("Use Graphics.Blit(source,dest) instead")] + public static void Blit(RenderTexture source, RenderTexture dest) + { + Graphics.Blit(source, dest); + } + + [System.Obsolete("Use Graphics.Blit(source, destination, material) instead")] + public static void BlitWithMaterial(Material material, RenderTexture source, RenderTexture dest) + { + Graphics.Blit(source, dest, material); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs.meta new file mode 100644 index 0000000..36910d9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ImageEffects.cs.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 89a037199d11087f1100e2b844295342 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - blitCopyShader: {fileID: 4800000, guid: 3338b5ea2f3cb594698fae65cf060346, type: 3} + - blitMultiplyShader: {fileID: 4800000, guid: 7034c801b78acab448cdcf845f7c352d, + type: 3} + - blitMultiply2XShader: {fileID: 4800000, guid: cde82987e0a884c4788c65f7b54390e8, + type: 3} + - blitAddShader: {fileID: 4800000, guid: c7515f214a63bdb42b6ae6335a00a8a4, type: 3} + - blitAddSmoothShader: {fileID: 4800000, guid: 7741a77a7c455d0418bc429bd508dc87, + type: 3} + - blitBlendShader: {fileID: 4800000, guid: f1cf7e9c98754c4429ff0f7cc1d9dd7b, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs b/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs new file mode 100644 index 0000000..32fabc8 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs @@ -0,0 +1,72 @@ +using UnityEngine; + +// This class implements simple ghosting type Motion Blur. +// If Extra Blur is selected, the scene will allways be a little blurred, +// as it is scaled to a smaller resolution. +// The effect works by accumulating the previous frames in an accumulation +// texture. +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Blur/Motion Blur (Color Accumulation)")] +[RequireComponent(typeof(Camera))] + +public class MotionBlur : ImageEffectBase +{ + public float blurAmount = 0.8f; + public bool extraBlur = false; + + private RenderTexture accumTexture; + + override protected void Start() + { + if(!SystemInfo.supportsRenderTextures) + { + enabled = false; + return; + } + base.Start(); + } + + override protected void OnDisable() + { + base.OnDisable(); + DestroyImmediate(accumTexture); + } + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) + { + // Create the accumulation texture + if (accumTexture == null || accumTexture.width != source.width || accumTexture.height != source.height) + { + DestroyImmediate(accumTexture); + accumTexture = new RenderTexture(source.width, source.height, 0); + accumTexture.hideFlags = HideFlags.HideAndDontSave; + Graphics.Blit( source, accumTexture ); + } + + // If Extra Blur is selected, downscale the texture to 4x4 smaller resolution. + if (extraBlur) + { + RenderTexture blurbuffer = RenderTexture.GetTemporary(source.width/4, source.height/4, 0); + accumTexture.MarkRestoreExpected(); + Graphics.Blit(accumTexture, blurbuffer); + Graphics.Blit(blurbuffer,accumTexture); + RenderTexture.ReleaseTemporary(blurbuffer); + } + + // Clamp the motion blur variable, so it can never leave permanent trails in the image + blurAmount = Mathf.Clamp( blurAmount, 0.0f, 0.92f ); + + // Setup the texture and floating point values in the shader + material.SetTexture("_MainTex", accumTexture); + material.SetFloat("_AccumOrig", 1.0F-blurAmount); + + // We are accumulating motion over frames without clear/discard + // by design, so silence any performance warnings from Unity + accumTexture.MarkRestoreExpected(); + + // Render the image using the motion blur shader + Graphics.Blit (source, accumTexture, material); + Graphics.Blit (accumTexture, destination); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs.meta new file mode 100644 index 0000000..acc6f57 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/MotionBlur.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 478a2083ad114a07d000fbfb8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: e9ba2083ad114a07d000fbfb8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js new file mode 100644 index 0000000..b21af4b --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js @@ -0,0 +1,168 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Noise/Noise And Grain (Filmic)") + +class NoiseAndGrain extends PostEffectsBase { + + public var intensityMultiplier : float = 0.25f; + + public var generalIntensity : float = 0.5f; + public var blackIntensity : float = 1.0f; + public var whiteIntensity : float = 1.0f; + public var midGrey : float = 0.2f; + + public var dx11Grain : boolean = false; + public var softness : float = 0.0f; + public var monochrome : boolean = false; + + public var intensities : Vector3 = Vector3(1.0f, 1.0f, 1.0f); + public var tiling : Vector3 = Vector3(64.0f, 64.0f, 64.0f); + public var monochromeTiling : float = 64.0f; + + public var filterMode : FilterMode = FilterMode.Bilinear; + + public var noiseTexture : Texture2D; + + public var noiseShader : Shader; + private var noiseMaterial : Material = null; + + public var dx11NoiseShader : Shader; + private var dx11NoiseMaterial : Material = null; + + private static var TILE_AMOUNT : float = 64.0f; + + function CheckResources () : boolean { + CheckSupport (false); + + noiseMaterial = CheckShaderAndCreateMaterial (noiseShader, noiseMaterial); + + if(dx11Grain && supportDX11) { + #if UNITY_EDITOR + dx11NoiseShader = Shader.Find("Hidden/NoiseAndGrainDX11"); + #endif + dx11NoiseMaterial = CheckShaderAndCreateMaterial (dx11NoiseShader, dx11NoiseMaterial); + } + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false || (null==noiseTexture)) { + Graphics.Blit (source, destination); + if(null==noiseTexture){ + Debug.LogWarning("Noise & Grain effect failing as noise texture is not assigned. please assign.", transform); + } + return; + } + + softness = Mathf.Clamp(softness, 0.0f, 0.99f); + + if(dx11Grain && supportDX11) { + // We have a fancy, procedural noise pattern in this version, so no texture needed + + dx11NoiseMaterial.SetFloat("_DX11NoiseTime", Time.frameCount); + dx11NoiseMaterial.SetTexture ("_NoiseTex", noiseTexture); + dx11NoiseMaterial.SetVector ("_NoisePerChannel", monochrome ? Vector3.one : intensities); + dx11NoiseMaterial.SetVector ("_MidGrey", Vector3(midGrey, 1.0f/(1.0-midGrey), -1.0f/midGrey)); + dx11NoiseMaterial.SetVector ("_NoiseAmount", Vector3(generalIntensity, blackIntensity, whiteIntensity) * intensityMultiplier); + + if(softness > Mathf.Epsilon) + { + var rt : RenderTexture = RenderTexture.GetTemporary(source.width * (1.0f-softness), source.height * (1.0f-softness)); + DrawNoiseQuadGrid (source, rt, dx11NoiseMaterial, noiseTexture, monochrome ? 3 : 2); + dx11NoiseMaterial.SetTexture("_NoiseTex", rt); + Graphics.Blit(source, destination, dx11NoiseMaterial, 4); + RenderTexture.ReleaseTemporary(rt); + } + else + DrawNoiseQuadGrid (source, destination, dx11NoiseMaterial, noiseTexture, (monochrome ? 1 : 0)); + } + else { + // normal noise (DX9 style) + + if (noiseTexture) { + noiseTexture.wrapMode = TextureWrapMode.Repeat; + noiseTexture.filterMode = filterMode; + } + + noiseMaterial.SetTexture ("_NoiseTex", noiseTexture); + noiseMaterial.SetVector ("_NoisePerChannel", monochrome ? Vector3.one : intensities); + noiseMaterial.SetVector ("_NoiseTilingPerChannel", monochrome ? Vector3.one * monochromeTiling : tiling); + noiseMaterial.SetVector ("_MidGrey", Vector3(midGrey, 1.0f/(1.0-midGrey), -1.0f/midGrey)); + noiseMaterial.SetVector ("_NoiseAmount", Vector3(generalIntensity, blackIntensity, whiteIntensity) * intensityMultiplier); + + if(softness > Mathf.Epsilon) + { + var rt2 : RenderTexture = RenderTexture.GetTemporary(source.width * (1.0f-softness), source.height * (1.0f-softness)); + DrawNoiseQuadGrid (source, rt2, noiseMaterial, noiseTexture, 2); + noiseMaterial.SetTexture("_NoiseTex", rt2); + Graphics.Blit(source, destination, noiseMaterial, 1); + RenderTexture.ReleaseTemporary(rt2); + } + else + DrawNoiseQuadGrid (source, destination, noiseMaterial, noiseTexture, 0); + } + } + + static function DrawNoiseQuadGrid (source : RenderTexture, dest : RenderTexture, fxMaterial : Material, noise : Texture2D, passNr : int) { + RenderTexture.active = dest; + + var noiseSize : float = (noise.width * 1.0f); + var subDs : float = (1.0f * source.width) / TILE_AMOUNT; + + fxMaterial.SetTexture ("_MainTex", source); + + GL.PushMatrix (); + GL.LoadOrtho (); + + var aspectCorrection : float = (1.0f * source.width) / (1.0f * source.height); + var stepSizeX : float = 1.0f / subDs; + var stepSizeY : float = stepSizeX * aspectCorrection; + var texTile : float = noiseSize / (noise.width * 1.0f); + + fxMaterial.SetPass (passNr); + + GL.Begin (GL.QUADS); + + for (var x1 : float = 0.0; x1 < 1.0; x1 += stepSizeX) { + for (var y1 : float = 0.0; y1 < 1.0; y1 += stepSizeY) { + + var tcXStart : float = Random.Range (0.0f, 1.0f); + var tcYStart : float = Random.Range (0.0f, 1.0f); + + //var v3 : Vector3 = Random.insideUnitSphere; + //var c : Color = new Color(v3.x, v3.y, v3.z); + + tcXStart = Mathf.Floor(tcXStart*noiseSize) / noiseSize; + tcYStart = Mathf.Floor(tcYStart*noiseSize) / noiseSize; + + var texTileMod : float = 1.0f / noiseSize; + + GL.MultiTexCoord2 (0, tcXStart, tcYStart); + GL.MultiTexCoord2 (1, 0.0f, 0.0f); + //GL.Color( c ); + GL.Vertex3 (x1, y1, 0.1); + GL.MultiTexCoord2 (0, tcXStart + texTile * texTileMod, tcYStart); + GL.MultiTexCoord2 (1, 1.0f, 0.0f); + //GL.Color( c ); + GL.Vertex3 (x1 + stepSizeX, y1, 0.1); + GL.MultiTexCoord2 (0, tcXStart + texTile * texTileMod, tcYStart + texTile * texTileMod); + GL.MultiTexCoord2 (1, 1.0f, 1.0f); + //GL.Color( c ); + GL.Vertex3 (x1 + stepSizeX, y1 + stepSizeY, 0.1); + GL.MultiTexCoord2 (0, tcXStart, tcYStart + texTile * texTileMod); + GL.MultiTexCoord2 (1, 0.0f, 1.0f); + //GL.Color( c ); + GL.Vertex3 (x1, y1 + stepSizeY, 0.1); + } + } + + GL.End (); + GL.PopMatrix (); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js.meta new file mode 100644 index 0000000..c19ccf9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseAndGrain.js.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0da8daaf1d21e474bafa968f8f6c9f1e +MonoImporter: + serializedVersion: 2 + defaultReferences: + - noiseTexture: {fileID: 2800000, guid: 7a632f967e8ad42f5bd275898151ab6a, type: 3} + - noiseShader: {fileID: 4800000, guid: b0249d8c935344451aa4de6db76f0688, type: 3} + - dx11NoiseShader: {fileID: 4800000, guid: 8b30686bb4322ab42ad5eb50a0210b58, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs new file mode 100644 index 0000000..fe4ec9d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs @@ -0,0 +1,130 @@ +using UnityEngine; + +[ExecuteInEditMode] +[RequireComponent (typeof(Camera))] +[AddComponentMenu("Image Effects/Noise/Noise and Scratches")] +public class NoiseEffect : MonoBehaviour +{ + /// Monochrome noise just adds grain. Non-monochrome noise + /// more resembles VCR as it adds noise in YUV color space, + /// thus introducing magenta/green colors. + public bool monochrome = true; + private bool rgbFallback = false; + + // Noise grain takes random intensity from Min to Max. + public float grainIntensityMin = 0.1f; + public float grainIntensityMax = 0.2f; + + /// The size of the noise grains (1 = one pixel). + public float grainSize = 2.0f; + + // Scratches take random intensity from Min to Max. + public float scratchIntensityMin = 0.05f; + public float scratchIntensityMax = 0.25f; + + /// Scratches jump to another locations at this times per second. + public float scratchFPS = 10.0f; + /// While scratches are in the same location, they jitter a bit. + public float scratchJitter = 0.01f; + + public Texture grainTexture; + public Texture scratchTexture; + public Shader shaderRGB; + public Shader shaderYUV; + private Material m_MaterialRGB; + private Material m_MaterialYUV; + + private float scratchTimeLeft = 0.0f; + private float scratchX, scratchY; + + protected void Start () + { + // Disable if we don't support image effects + if (!SystemInfo.supportsImageEffects) { + enabled = false; + return; + } + + if( shaderRGB == null || shaderYUV == null ) + { + Debug.Log( "Noise shaders are not set up! Disabling noise effect." ); + enabled = false; + } + else + { + if( !shaderRGB.isSupported ) // disable effect if RGB shader is not supported + enabled = false; + else if( !shaderYUV.isSupported ) // fallback to RGB if YUV is not supported + rgbFallback = true; + } + } + + protected Material material { + get { + if( m_MaterialRGB == null ) { + m_MaterialRGB = new Material( shaderRGB ); + m_MaterialRGB.hideFlags = HideFlags.HideAndDontSave; + } + if( m_MaterialYUV == null && !rgbFallback ) { + m_MaterialYUV = new Material( shaderYUV ); + m_MaterialYUV.hideFlags = HideFlags.HideAndDontSave; + } + return (!rgbFallback && !monochrome) ? m_MaterialYUV : m_MaterialRGB; + } + } + + protected void OnDisable() { + if( m_MaterialRGB ) + DestroyImmediate( m_MaterialRGB ); + if( m_MaterialYUV ) + DestroyImmediate( m_MaterialYUV ); + } + + private void SanitizeParameters() + { + grainIntensityMin = Mathf.Clamp( grainIntensityMin, 0.0f, 5.0f ); + grainIntensityMax = Mathf.Clamp( grainIntensityMax, 0.0f, 5.0f ); + scratchIntensityMin = Mathf.Clamp( scratchIntensityMin, 0.0f, 5.0f ); + scratchIntensityMax = Mathf.Clamp( scratchIntensityMax, 0.0f, 5.0f ); + scratchFPS = Mathf.Clamp( scratchFPS, 1, 30 ); + scratchJitter = Mathf.Clamp( scratchJitter, 0.0f, 1.0f ); + grainSize = Mathf.Clamp( grainSize, 0.1f, 50.0f ); + } + + // Called by the camera to apply the image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) + { + SanitizeParameters(); + + if( scratchTimeLeft <= 0.0f ) + { + scratchTimeLeft = Random.value * 2 / scratchFPS; // we have sanitized it earlier, won't be zero + scratchX = Random.value; + scratchY = Random.value; + } + scratchTimeLeft -= Time.deltaTime; + + Material mat = material; + + mat.SetTexture("_GrainTex", grainTexture); + mat.SetTexture("_ScratchTex", scratchTexture); + float grainScale = 1.0f / grainSize; // we have sanitized it earlier, won't be zero + mat.SetVector("_GrainOffsetScale", new Vector4( + Random.value, + Random.value, + (float)Screen.width / (float)grainTexture.width * grainScale, + (float)Screen.height / (float)grainTexture.height * grainScale + )); + mat.SetVector("_ScratchOffsetScale", new Vector4( + scratchX + Random.value*scratchJitter, + scratchY + Random.value*scratchJitter, + (float)Screen.width / (float) scratchTexture.width, + (float)Screen.height / (float) scratchTexture.height + )); + mat.SetVector("_Intensity", new Vector4( + Random.Range(grainIntensityMin, grainIntensityMax), + Random.Range(scratchIntensityMin, scratchIntensityMax), + 0, 0 )); + Graphics.Blit (source, destination, mat); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs.meta new file mode 100644 index 0000000..2aa2818 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/NoiseEffect.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: a88a26a276b4e47619ce2c5adad33fab +MonoImporter: + serializedVersion: 2 + defaultReferences: + - grainTexture: {fileID: 2800000, guid: ffa9c02760c2b4e8eb9814ec06c4b05b, type: 3} + - scratchTexture: {fileID: 2800000, guid: 6205c27cc031f4e66b8ea90d1bfaa158, type: 3} + - shaderRGB: {fileID: 4800000, guid: 5d7f4c401ae8946bcb0d6ff68a9e7466, type: 3} + - shaderYUV: {fileID: 4800000, guid: 0e447868506ba49f0a73235b8a8b647a, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js new file mode 100644 index 0000000..e7cfd20 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js @@ -0,0 +1,209 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) + +class PostEffectsBase extends MonoBehaviour { + protected var supportHDRTextures : boolean = true; + protected var supportDX11 : boolean = false; + protected var isSupported : boolean = true; + + function CheckShaderAndCreateMaterial (s : Shader, m2Create : Material) : Material { + if (!s) { + Debug.Log("Missing shader in " + this.ToString ()); + enabled = false; + return null; + } + + if (s.isSupported && m2Create && m2Create.shader == s) + return m2Create; + + if (!s.isSupported) { + NotSupported (); + Debug.Log("The shader " + s.ToString() + " on effect "+this.ToString()+" is not supported on this platform!"); + return null; + } + else { + m2Create = new Material (s); + m2Create.hideFlags = HideFlags.DontSave; + if (m2Create) + return m2Create; + else return null; + } + } + + function CreateMaterial (s : Shader, m2Create : Material) : Material { + if (!s) { + Debug.Log ("Missing shader in " + this.ToString ()); + return null; + } + + if (m2Create && (m2Create.shader == s) && (s.isSupported)) + return m2Create; + + if (!s.isSupported) { + return null; + } + else { + m2Create = new Material (s); + m2Create.hideFlags = HideFlags.DontSave; + if (m2Create) + return m2Create; + else return null; + } + } + + function OnEnable() { + isSupported = true; + } + + function CheckSupport () : boolean { + return CheckSupport (false); + } + + function CheckResources () : boolean { + Debug.LogWarning ("CheckResources () for " + this.ToString() + " should be overwritten."); + return isSupported; + } + + function Start () { + CheckResources (); + } + + function CheckSupport (needDepth : boolean) : boolean { + isSupported = true; + supportHDRTextures = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf); + supportDX11 = SystemInfo.graphicsShaderLevel >= 50 && SystemInfo.supportsComputeShaders; + + if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures) { + NotSupported (); + return false; + } + + if(needDepth && !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) { + NotSupported (); + return false; + } + + if(needDepth) + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + + return true; + } + + function CheckSupport (needDepth : boolean, needHdr : boolean) : boolean { + if(!CheckSupport(needDepth)) + return false; + + if(needHdr && !supportHDRTextures) { + NotSupported (); + return false; + } + + return true; + } + + function Dx11Support() : boolean { + return supportDX11; + } + + function ReportAutoDisable () { + Debug.LogWarning ("The image effect " + this.ToString() + " has been disabled as it's not supported on the current platform."); + } + + // deprecated but needed for old effects to survive upgrading + function CheckShader (s : Shader) : boolean { + Debug.Log("The shader " + s.ToString () + " on effect "+ this.ToString () + " is not part of the Unity 3.2+ effects suite anymore. For best performance and quality, please ensure you are using the latest Standard Assets Image Effects (Pro only) package."); + if (!s.isSupported) { + NotSupported (); + return false; + } + else { + return false; + } + } + + function NotSupported () { + enabled = false; + isSupported = false; + return; + } + + function DrawBorder (dest : RenderTexture, material : Material ) { + var x1 : float; + var x2 : float; + var y1 : float; + var y2 : float; + + RenderTexture.active = dest; + var invertY : boolean = true; // source.texelSize.y < 0.0f; + // Set up the simple Matrix + GL.PushMatrix(); + GL.LoadOrtho(); + + for (var i : int = 0; i < material.passCount; i++) + { + material.SetPass(i); + + var y1_ : float; var y2_ : float; + if (invertY) + { + y1_ = 1.0; y2_ = 0.0; + } + else + { + y1_ = 0.0; y2_ = 1.0; + } + + // left + x1 = 0.0; + x2 = 0.0 + 1.0/(dest.width*1.0); + y1 = 0.0; + y2 = 1.0; + GL.Begin(GL.QUADS); + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // right + x1 = 1.0 - 1.0/(dest.width*1.0); + x2 = 1.0; + y1 = 0.0; + y2 = 1.0; + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // top + x1 = 0.0; + x2 = 1.0; + y1 = 0.0; + y2 = 0.0 + 1.0/(dest.height*1.0); + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // bottom + x1 = 0.0; + x2 = 1.0; + y1 = 1.0 - 1.0/(dest.height*1.0); + y2 = 1.0; + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + GL.End(); + } + + GL.PopMatrix(); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js.meta new file mode 100644 index 0000000..0e61bce --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsBase.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d9e12470535464538a29207930915629 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js new file mode 100644 index 0000000..e93cfe6 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js @@ -0,0 +1,188 @@ + +@script ExecuteInEditMode +@script RequireComponent (Camera) + +class PostEffectsHelper extends MonoBehaviour +{ + function Start () { + + } + + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + Debug.Log("OnRenderImage in Helper called ..."); + } + + static function DrawLowLevelPlaneAlignedWithCamera( + dist : float, + source : RenderTexture, dest : RenderTexture, + material : Material, + cameraForProjectionMatrix : Camera ) + { + // Make the destination texture the target for all rendering + RenderTexture.active = dest; + // Assign the source texture to a property from a shader + material.SetTexture("_MainTex", source); + var invertY : boolean = true; // source.texelSize.y < 0.0f; + // Set up the simple Matrix + GL.PushMatrix(); + GL.LoadIdentity(); + GL.LoadProjectionMatrix(cameraForProjectionMatrix.projectionMatrix); + + var fovYHalfRad : float = cameraForProjectionMatrix.fieldOfView * 0.5 * Mathf.Deg2Rad; + var cotangent : float = Mathf.Cos(fovYHalfRad) / Mathf.Sin(fovYHalfRad); + var asp : float = cameraForProjectionMatrix.aspect; + + var x1 : float = asp/-cotangent; + var x2 : float = asp/cotangent; + var y1 : float = 1.0/-cotangent; + var y2 : float = 1.0/cotangent; + + var sc : float = 1.0; // magic constant (for now) + + x1 *= dist * sc; + x2 *= dist * sc; + y1 *= dist * sc; + y2 *= dist * sc; + + var z1 : float = -dist; + + for (var i : int = 0; i < material.passCount; i++) + { + material.SetPass(i); + + GL.Begin(GL.QUADS); + var y1_ : float; var y2_ : float; + if (invertY) + { + y1_ = 1.0; y2_ = 0.0; + } + else + { + y1_ = 0.0; y2_ = 1.0; + } + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, z1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, z1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, z1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, z1); + GL.End(); + } + + GL.PopMatrix(); + } + + static function DrawBorder ( + dest : RenderTexture, + material : Material ) + { + var x1 : float; + var x2 : float; + var y1 : float; + var y2 : float; + + RenderTexture.active = dest; + var invertY : boolean = true; // source.texelSize.y < 0.0f; + // Set up the simple Matrix + GL.PushMatrix(); + GL.LoadOrtho(); + + for (var i : int = 0; i < material.passCount; i++) + { + material.SetPass(i); + + var y1_ : float; var y2_ : float; + if (invertY) + { + y1_ = 1.0; y2_ = 0.0; + } + else + { + y1_ = 0.0; y2_ = 1.0; + } + + // left + x1 = 0.0; + x2 = 0.0 + 1.0/(dest.width*1.0); + y1 = 0.0; + y2 = 1.0; + GL.Begin(GL.QUADS); + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // right + x1 = 1.0 - 1.0/(dest.width*1.0); + x2 = 1.0; + y1 = 0.0; + y2 = 1.0; + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // top + x1 = 0.0; + x2 = 1.0; + y1 = 0.0; + y2 = 0.0 + 1.0/(dest.height*1.0); + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + // bottom + x1 = 0.0; + x2 = 1.0; + y1 = 1.0 - 1.0/(dest.height*1.0); + y2 = 1.0; + + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + + GL.End(); + } + + GL.PopMatrix(); + } + + static function DrawLowLevelQuad( x1 : float, x2 : float, y1 : float, y2 : float, source : RenderTexture, dest : RenderTexture, material : Material ) + { + // Make the destination texture the target for all rendering + RenderTexture.active = dest; + // Assign the source texture to a property from a shader + material.SetTexture("_MainTex", source); + var invertY : boolean = true; // source.texelSize.y < 0.0f; + // Set up the simple Matrix + GL.PushMatrix(); + GL.LoadOrtho(); + + for (var i : int = 0; i < material.passCount; i++) + { + material.SetPass(i); + + GL.Begin(GL.QUADS); + var y1_ : float; var y2_ : float; + if (invertY) + { + y1_ = 1.0; y2_ = 0.0; + } + else + { + y1_ = 0.0; y2_ = 1.0; + } + GL.TexCoord2(0.0, y1_); GL.Vertex3(x1, y1, 0.1); + GL.TexCoord2(1.0, y1_); GL.Vertex3(x2, y1, 0.1); + GL.TexCoord2(1.0, y2_); GL.Vertex3(x2, y2, 0.1); + GL.TexCoord2(0.0, y2_); GL.Vertex3(x1, y2, 0.1); + GL.End(); + } + + GL.PopMatrix(); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js.meta new file mode 100644 index 0000000..201d798 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/PostEffectsHelper.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5a8c1b59f27344754b41795198b8f341 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js b/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js new file mode 100644 index 0000000..8e0ac69 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js @@ -0,0 +1,115 @@ + +// same as Triangles but creates quads instead which generally +// saves fillrate at the expense for more triangles to issue + +#pragma strict + +static var meshes : Mesh[]; +static var currentQuads : int = 0; + +static function HasMeshes () : boolean { + if (!meshes) + return false; + for (var m : Mesh in meshes) + if (null == m) + return false; + + return true; +} + +static function Cleanup () { + if (!meshes) + return; + + for (var m : Mesh in meshes) { + if (null != m) { + DestroyImmediate (m); + m = null; + } + } + meshes = null; +} + +static function GetMeshes (totalWidth : int, totalHeight : int) : Mesh[] +{ + if (HasMeshes () && (currentQuads == (totalWidth * totalHeight))) { + return meshes; + } + + var maxQuads : int = 65000 / 6; + var totalQuads : int = totalWidth * totalHeight; + currentQuads = totalQuads; + + var meshCount : int = Mathf.CeilToInt ((1.0f * totalQuads) / (1.0f * maxQuads)); + + meshes = new Mesh [meshCount]; + + var i : int = 0; + var index : int = 0; + for (i = 0; i < totalQuads; i += maxQuads) { + var quads : int = Mathf.FloorToInt (Mathf.Clamp ((totalQuads-i), 0, maxQuads)); + + meshes[index] = GetMesh (quads, i, totalWidth, totalHeight); + index++; + } + + return meshes; +} + +static function GetMesh (triCount : int, triOffset : int, totalWidth : int, totalHeight : int) : Mesh +{ + var mesh = new Mesh (); + mesh.hideFlags = HideFlags.DontSave; + + var verts : Vector3[] = new Vector3[triCount*4]; + var uvs : Vector2[] = new Vector2[triCount*4]; + var uvs2 : Vector2[] = new Vector2[triCount*4]; + var tris : int[] = new int[triCount*6]; + + var size : float = 0.0075f; + + for (var i : int = 0; i < triCount; i++) + { + var i4 : int = i * 4; + var i6 : int = i * 6; + + var vertexWithOffset : int = triOffset + i; + + var x : float = Mathf.Floor(vertexWithOffset % totalWidth) / totalWidth; + var y : float = Mathf.Floor(vertexWithOffset / totalWidth) / totalHeight; + + var position : Vector3 = Vector3 (x*2-1,y*2-1, 1.0); + + verts[i4 + 0] = position; + verts[i4 + 1] = position; + verts[i4 + 2] = position; + verts[i4 + 3] = position; + + uvs[i4 + 0] = Vector2 (0.0f, 0.0f); + uvs[i4 + 1] = Vector2 (1.0f, 0.0f); + uvs[i4 + 2] = Vector2 (0.0f, 1.0f); + uvs[i4 + 3] = Vector2 (1.0f, 1.0f); + + uvs2[i4 + 0] = Vector2 (x, y); + uvs2[i4 + 1] = Vector2 (x, y); + uvs2[i4 + 2] = Vector2 (x, y); + uvs2[i4 + 3] = Vector2 (x, y); + + tris[i6 + 0] = i4 + 0; + tris[i6 + 1] = i4 + 1; + tris[i6 + 2] = i4 + 2; + + tris[i6 + 3] = i4 + 1; + tris[i6 + 4] = i4 + 2; + tris[i6 + 5] = i4 + 3; + + } + + mesh.vertices = verts; + mesh.triangles = tris; + mesh.uv = uvs; + mesh.uv2 = uvs2; + + return mesh; +} + diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js.meta new file mode 100644 index 0000000..fe4eb22 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Quads.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f2648273e111b48e881504326f709df7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs new file mode 100644 index 0000000..585375c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs @@ -0,0 +1,194 @@ +using UnityEngine; + +[ExecuteInEditMode] +[RequireComponent (typeof(Camera))] +[AddComponentMenu("Image Effects/Rendering/Screen Space Ambient Occlusion")] +public class SSAOEffect : MonoBehaviour +{ + public enum SSAOSamples { + Low = 0, + Medium = 1, + High = 2, + } + + public float m_Radius = 0.4f; + public SSAOSamples m_SampleCount = SSAOSamples.Medium; + public float m_OcclusionIntensity = 1.5f; + public int m_Blur = 2; + public int m_Downsampling = 2; + public float m_OcclusionAttenuation = 1.0f; + public float m_MinZ = 0.01f; + + public Shader m_SSAOShader; + private Material m_SSAOMaterial; + + public Texture2D m_RandomTexture; + + private bool m_Supported; + + private static Material CreateMaterial (Shader shader) + { + if (!shader) + return null; + Material m = new Material (shader); + m.hideFlags = HideFlags.HideAndDontSave; + return m; + } + private static void DestroyMaterial (Material mat) + { + if (mat) + { + DestroyImmediate (mat); + mat = null; + } + } + + + void OnDisable() + { + DestroyMaterial (m_SSAOMaterial); + } + + void Start() + { + if (!SystemInfo.supportsImageEffects || !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) + { + m_Supported = false; + enabled = false; + return; + } + + CreateMaterials (); + if (!m_SSAOMaterial || m_SSAOMaterial.passCount != 5) + { + m_Supported = false; + enabled = false; + return; + } + + //CreateRandomTable (26, 0.2f); + + m_Supported = true; + } + + void OnEnable () { + GetComponent().depthTextureMode |= DepthTextureMode.DepthNormals; + } + + private void CreateMaterials () + { + if (!m_SSAOMaterial && m_SSAOShader.isSupported) + { + m_SSAOMaterial = CreateMaterial (m_SSAOShader); + m_SSAOMaterial.SetTexture ("_RandomTexture", m_RandomTexture); + } + } + + [ImageEffectOpaque] + void OnRenderImage (RenderTexture source, RenderTexture destination) + { + if (!m_Supported || !m_SSAOShader.isSupported) { + enabled = false; + return; + } + CreateMaterials (); + + m_Downsampling = Mathf.Clamp (m_Downsampling, 1, 6); + m_Radius = Mathf.Clamp (m_Radius, 0.05f, 1.0f); + m_MinZ = Mathf.Clamp (m_MinZ, 0.00001f, 0.5f); + m_OcclusionIntensity = Mathf.Clamp (m_OcclusionIntensity, 0.5f, 4.0f); + m_OcclusionAttenuation = Mathf.Clamp (m_OcclusionAttenuation, 0.2f, 2.0f); + m_Blur = Mathf.Clamp (m_Blur, 0, 4); + + // Render SSAO term into a smaller texture + RenderTexture rtAO = RenderTexture.GetTemporary (source.width / m_Downsampling, source.height / m_Downsampling, 0); + float fovY = GetComponent().fieldOfView; + float far = GetComponent().farClipPlane; + float y = Mathf.Tan (fovY * Mathf.Deg2Rad * 0.5f) * far; + float x = y * GetComponent().aspect; + m_SSAOMaterial.SetVector ("_FarCorner", new Vector3(x,y,far)); + int noiseWidth, noiseHeight; + if (m_RandomTexture) { + noiseWidth = m_RandomTexture.width; + noiseHeight = m_RandomTexture.height; + } else { + noiseWidth = 1; noiseHeight = 1; + } + m_SSAOMaterial.SetVector ("_NoiseScale", new Vector3 ((float)rtAO.width / noiseWidth, (float)rtAO.height / noiseHeight, 0.0f)); + m_SSAOMaterial.SetVector ("_Params", new Vector4( + m_Radius, + m_MinZ, + 1.0f / m_OcclusionAttenuation, + m_OcclusionIntensity)); + + bool doBlur = m_Blur > 0; + Graphics.Blit (doBlur ? null : source, rtAO, m_SSAOMaterial, (int)m_SampleCount); + + if (doBlur) + { + // Blur SSAO horizontally + RenderTexture rtBlurX = RenderTexture.GetTemporary (source.width, source.height, 0); + m_SSAOMaterial.SetVector ("_TexelOffsetScale", + new Vector4 ((float)m_Blur / source.width, 0,0,0)); + m_SSAOMaterial.SetTexture ("_SSAO", rtAO); + Graphics.Blit (null, rtBlurX, m_SSAOMaterial, 3); + RenderTexture.ReleaseTemporary (rtAO); // original rtAO not needed anymore + + // Blur SSAO vertically + RenderTexture rtBlurY = RenderTexture.GetTemporary (source.width, source.height, 0); + m_SSAOMaterial.SetVector ("_TexelOffsetScale", + new Vector4 (0, (float)m_Blur/source.height, 0,0)); + m_SSAOMaterial.SetTexture ("_SSAO", rtBlurX); + Graphics.Blit (source, rtBlurY, m_SSAOMaterial, 3); + RenderTexture.ReleaseTemporary (rtBlurX); // blurX RT not needed anymore + + rtAO = rtBlurY; // AO is the blurred one now + } + + // Modulate scene rendering with SSAO + m_SSAOMaterial.SetTexture ("_SSAO", rtAO); + Graphics.Blit (source, destination, m_SSAOMaterial, 4); + + RenderTexture.ReleaseTemporary (rtAO); + } + + /* + private void CreateRandomTable (int count, float minLength) + { + Random.seed = 1337; + Vector3[] samples = new Vector3[count]; + // initial samples + for (int i = 0; i < count; ++i) + samples[i] = Random.onUnitSphere; + // energy minimization: push samples away from others + int iterations = 100; + while (iterations-- > 0) { + for (int i = 0; i < count; ++i) { + Vector3 vec = samples[i]; + Vector3 res = Vector3.zero; + // minimize with other samples + for (int j = 0; j < count; ++j) { + Vector3 force = vec - samples[j]; + float fac = Vector3.Dot (force, force); + if (fac > 0.00001f) + res += force * (1.0f / fac); + } + samples[i] = (samples[i] + res * 0.5f).normalized; + } + } + // now scale samples between minLength and 1.0 + for (int i = 0; i < count; ++i) { + samples[i] = samples[i] * Random.Range (minLength, 1.0f); + } + + string table = string.Format ("#define SAMPLE_COUNT {0}\n", count); + table += "const float3 RAND_SAMPLES[SAMPLE_COUNT] = {\n"; + for (int i = 0; i < count; ++i) { + Vector3 v = samples[i]; + table += string.Format("\tfloat3({0},{1},{2}),\n", v.x, v.y, v.z); + } + table += "};\n"; + Debug.Log (table); + } + */ +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs.meta new file mode 100644 index 0000000..d96e6f1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SSAOEffect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0923359e9e352a4b9b11c7b7161ad67 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - m_SSAOShader: {fileID: 4800000, guid: 43ca18288c424f645aaa1e9e07f04c50, type: 3} + - m_RandomTexture: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js b/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js new file mode 100644 index 0000000..d3f5ed9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js @@ -0,0 +1,62 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Other/Screen Overlay") + +class ScreenOverlay extends PostEffectsBase { + + enum OverlayBlendMode { + Additive = 0, + ScreenBlend = 1, + Multiply = 2, + Overlay = 3, + AlphaBlend = 4, + } + + public var blendMode : OverlayBlendMode = OverlayBlendMode.Overlay; + public var intensity : float = 1.0f; + public var texture : Texture2D; + + public var overlayShader : Shader; + private var overlayMaterial : Material = null; + + function CheckResources () : boolean { + CheckSupport (false); + + overlayMaterial = CheckShaderAndCreateMaterial (overlayShader, overlayMaterial); + + if (!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (CheckResources() == false) { + Graphics.Blit (source, destination); + return; + } + + var UV_Transform : Vector4 = Vector4(1, 0, 0, 1); + + #if UNITY_WP8 + // WP8 has no OS support for rotating screen with device orientation, + // so we do those transformations ourselves. + if (Screen.orientation == ScreenOrientation.LandscapeLeft) { + UV_Transform = Vector4(0, -1, 1, 0); + } + if (Screen.orientation == ScreenOrientation.LandscapeRight) { + UV_Transform = Vector4(0, 1, -1, 0); + } + if (Screen.orientation == ScreenOrientation.PortraitUpsideDown) { + UV_Transform = Vector4(-1, 0, 0, -1); + } + #endif + + overlayMaterial.SetVector("_UV_Transform", UV_Transform); + overlayMaterial.SetFloat ("_Intensity", intensity); + overlayMaterial.SetTexture ("_Overlay", texture); + Graphics.Blit (source, destination, overlayMaterial, blendMode); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js.meta new file mode 100644 index 0000000..75e3b34 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/ScreenOverlay.js.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9b41ef81e8d74f3a814d061ec18b3a7 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - texture: {instanceID: 0} + - overlayShader: {fileID: 4800000, guid: 8c81db0e527d24acc9bcec04e87781bd, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs new file mode 100644 index 0000000..7f9e911 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs @@ -0,0 +1,11 @@ +using UnityEngine; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Color Adjustments/Sepia Tone")] +public class SepiaToneEffect : ImageEffectBase { + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + Graphics.Blit (source, destination, material); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs.meta new file mode 100644 index 0000000..4317343 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SepiaToneEffect.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a07a781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: b6aa781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js b/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js new file mode 100644 index 0000000..e54889d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js @@ -0,0 +1,141 @@ + + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Rendering/Sun Shafts") + +enum SunShaftsResolution { + Low = 0, + Normal = 1, + High = 2, +} + +enum ShaftsScreenBlendMode { + Screen = 0, + Add = 1, +} + +class SunShafts extends PostEffectsBase +{ + public var resolution : SunShaftsResolution = SunShaftsResolution.Normal; + public var screenBlendMode : ShaftsScreenBlendMode = ShaftsScreenBlendMode.Screen; + + public var sunTransform : Transform; + public var radialBlurIterations : int = 2; + public var sunColor : Color = Color.white; + public var sunThreshold : Color = Color(0.87,0.74,0.65); + public var sunShaftBlurRadius : float = 2.5f; + public var sunShaftIntensity : float = 1.15; + + public var maxRadius : float = 0.75f; + + public var useDepthTexture : boolean = true; + + public var sunShaftsShader : Shader; + private var sunShaftsMaterial : Material; + + public var simpleClearShader : Shader; + private var simpleClearMaterial : Material; + + function CheckResources () : boolean { + CheckSupport (useDepthTexture); + + sunShaftsMaterial = CheckShaderAndCreateMaterial (sunShaftsShader, sunShaftsMaterial); + simpleClearMaterial = CheckShaderAndCreateMaterial (simpleClearShader, simpleClearMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources()==false) { + Graphics.Blit (source, destination); + return; + } + + // we actually need to check this every frame + if(useDepthTexture) + GetComponent(Camera).depthTextureMode |= DepthTextureMode.Depth; + + var divider : int = 4; + if (resolution == SunShaftsResolution.Normal) + divider = 2; + else if (resolution == SunShaftsResolution.High) + divider = 1; + + var v : Vector3 = Vector3.one * 0.5; + if (sunTransform) + v = GetComponent(Camera).WorldToViewportPoint (sunTransform.position); + else + v = Vector3(0.5, 0.5, 0.0); + + var rtW : int = source.width / divider; + var rtH : int = source.height / divider; + + var lrColorB : RenderTexture; + var lrDepthBuffer : RenderTexture = RenderTexture.GetTemporary (rtW, rtH, 0); + + // mask out everything except the skybox + // we have 2 methods, one of which requires depth buffer support, the other one is just comparing images + + sunShaftsMaterial.SetVector ("_BlurRadius4", Vector4 (1.0, 1.0, 0.0, 0.0) * sunShaftBlurRadius ); + sunShaftsMaterial.SetVector ("_SunPosition", Vector4 (v.x, v.y, v.z, maxRadius)); + sunShaftsMaterial.SetVector ("_SunThreshold", sunThreshold); + + if (!useDepthTexture) { + var format = GetComponent(Camera).hdr ? RenderTextureFormat.DefaultHDR: RenderTextureFormat.Default; + var tmpBuffer : RenderTexture = RenderTexture.GetTemporary (source.width, source.height, 0, format); + RenderTexture.active = tmpBuffer; + GL.ClearWithSkybox (false, GetComponent(Camera)); + + sunShaftsMaterial.SetTexture ("_Skybox", tmpBuffer); + Graphics.Blit (source, lrDepthBuffer, sunShaftsMaterial, 3); + RenderTexture.ReleaseTemporary (tmpBuffer); + } + else { + Graphics.Blit (source, lrDepthBuffer, sunShaftsMaterial, 2); + } + + // paint a small black small border to get rid of clamping problems + DrawBorder (lrDepthBuffer, simpleClearMaterial); + + // radial blur: + + radialBlurIterations = Mathf.Clamp (radialBlurIterations, 1, 4); + + var ofs : float = sunShaftBlurRadius * (1.0f / 768.0f); + + sunShaftsMaterial.SetVector ("_BlurRadius4", Vector4 (ofs, ofs, 0.0f, 0.0f)); + sunShaftsMaterial.SetVector ("_SunPosition", Vector4 (v.x, v.y, v.z, maxRadius)); + + for (var it2 : int = 0; it2 < radialBlurIterations; it2++ ) { + // each iteration takes 2 * 6 samples + // we update _BlurRadius each time to cheaply get a very smooth look + + lrColorB = RenderTexture.GetTemporary (rtW, rtH, 0); + Graphics.Blit (lrDepthBuffer, lrColorB, sunShaftsMaterial, 1); + RenderTexture.ReleaseTemporary (lrDepthBuffer); + ofs = sunShaftBlurRadius * (((it2 * 2.0f + 1.0f) * 6.0f)) / 768.0f; + sunShaftsMaterial.SetVector ("_BlurRadius4", Vector4 (ofs, ofs, 0.0f, 0.0f) ); + + lrDepthBuffer = RenderTexture.GetTemporary (rtW, rtH, 0); + Graphics.Blit (lrColorB, lrDepthBuffer, sunShaftsMaterial, 1); + RenderTexture.ReleaseTemporary (lrColorB); + ofs = sunShaftBlurRadius * (((it2 * 2.0f + 2.0f) * 6.0f)) / 768.0f; + sunShaftsMaterial.SetVector ("_BlurRadius4", Vector4 (ofs, ofs, 0.0f, 0.0f) ); + } + + // put together: + + if (v.z >= 0.0) + sunShaftsMaterial.SetVector ("_SunColor", Vector4 (sunColor.r, sunColor.g, sunColor.b, sunColor.a) * sunShaftIntensity); + else + sunShaftsMaterial.SetVector ("_SunColor", Vector4.zero); // no backprojection ! + sunShaftsMaterial.SetTexture ("_ColorBuffer", lrDepthBuffer); + Graphics.Blit (source, destination, sunShaftsMaterial, (screenBlendMode == ShaftsScreenBlendMode.Screen) ? 0 : 4); + + RenderTexture.ReleaseTemporary (lrDepthBuffer); + } + +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js.meta new file mode 100644 index 0000000..0a3965d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/SunShafts.js.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 1dad87ba4f1e04d6eb7f287e1f2e08fe +MonoImporter: + serializedVersion: 2 + defaultReferences: + - sunTransform: {instanceID: 0} + - prepareBlurShader: {fileID: 4800000, guid: 9ad381ed8492840ab9f165df743e4826, type: 3} + - radialBlurShader: {fileID: 4800000, guid: f58445347fe2e4b8396487ed2bfa02ad, type: 3} + - sunShaftsShader: {fileID: 4800000, guid: d3b1c8c1036784176946f5cfbfb7fe4c, type: 3} + - simpleClearShader: {fileID: 4800000, guid: f688f89ed5eb847c5b19c934a0f1e772, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js b/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js new file mode 100644 index 0000000..152f722 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js @@ -0,0 +1,74 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Camera/Tilt Shift (Lens Blur)") + +class TiltShiftHdr extends PostEffectsBase { + public enum TiltShiftMode + { + TiltShiftMode, + IrisMode, + } + public enum TiltShiftQuality + { + Preview, + Normal, + High, + } + + public var mode : TiltShiftMode = TiltShiftMode.TiltShiftMode; + public var quality : TiltShiftQuality = TiltShiftQuality.Normal; + + @Range(0.0f, 15.0f) + public var blurArea : float = 1.0f; + + @Range(0.0f, 25.0f) + public var maxBlurSize : float = 5.0f; + + @Range(0, 1) + public var downsample : int = 0; + + public var tiltShiftShader : Shader; + private var tiltShiftMaterial : Material = null; + + + function CheckResources () : boolean { + CheckSupport (true); + + tiltShiftMaterial = CheckShaderAndCreateMaterial (tiltShiftShader, tiltShiftMaterial); + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if(CheckResources() == false) { + Graphics.Blit (source, destination); + return; + } + + tiltShiftMaterial.SetFloat("_BlurSize", maxBlurSize < 0.0f ? 0.0f : maxBlurSize); + tiltShiftMaterial.SetFloat("_BlurArea", blurArea); + source.filterMode = FilterMode.Bilinear; + + var rt : RenderTexture = destination; + if (downsample) { + rt = RenderTexture.GetTemporary (source.width>>downsample, source.height>>downsample, 0, source.format); + rt.filterMode = FilterMode.Bilinear; + } + + var basePassNr : int = quality; basePassNr *= 2; + Graphics.Blit (source, rt, tiltShiftMaterial, mode == TiltShiftMode.TiltShiftMode ? basePassNr : basePassNr + 1); + + if (downsample) { + tiltShiftMaterial.SetTexture ("_Blurred", rt); + Graphics.Blit (source, destination, tiltShiftMaterial, 6); + } + + if (rt != destination) + RenderTexture.ReleaseTemporary (rt); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js.meta new file mode 100644 index 0000000..bb4e9ef --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/TiltShiftHdr.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 776cc4b17d3044029b83a0c3fc4c2965 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - tiltShiftShader: {fileID: 4800000, guid: bf34d2a25450349699e8ae6456fa7ca9, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js b/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js new file mode 100644 index 0000000..c2f4d14 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js @@ -0,0 +1,239 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Color Adjustments/Tonemapping") + +class Tonemapping extends PostEffectsBase { + + public enum TonemapperType { + SimpleReinhard, + UserCurve, + Hable, + Photographic, + OptimizedHejiDawson, + AdaptiveReinhard, + AdaptiveReinhardAutoWhite, + }; + + public enum AdaptiveTexSize { + Square16 = 16, + Square32 = 32, + Square64 = 64, + Square128 = 128, + Square256 = 256, + Square512 = 512, + Square1024 = 1024, + }; + + public var type : TonemapperType = TonemapperType.Photographic; + public var adaptiveTextureSize = AdaptiveTexSize.Square256; + + // CURVE parameter + public var remapCurve : AnimationCurve; + private var curveTex : Texture2D = null; + + // UNCHARTED parameter + public var exposureAdjustment : float = 1.5f; + + // REINHARD parameter + public var middleGrey : float = 0.4f; + public var white : float = 2.0f; + public var adaptionSpeed : float = 1.5f; + + // usual & internal stuff + public var tonemapper : Shader = null; + public var validRenderTextureFormat : boolean = true; + private var tonemapMaterial : Material = null; + private var rt : RenderTexture = null; + private var rtFormat : RenderTextureFormat = RenderTextureFormat.ARGBHalf; + + function CheckResources () : boolean { + CheckSupport (false, true); + + tonemapMaterial = CheckShaderAndCreateMaterial(tonemapper, tonemapMaterial); + if (!curveTex && type == TonemapperType.UserCurve) { + curveTex = new Texture2D (256, 1, TextureFormat.ARGB32, false, true); + curveTex.filterMode = FilterMode.Bilinear; + curveTex.wrapMode = TextureWrapMode.Clamp; + curveTex.hideFlags = HideFlags.DontSave; + } + + if(!isSupported) + ReportAutoDisable (); + return isSupported; + } + + public function UpdateCurve () : float { + var range : float = 1.0f; + if(remapCurve.keys.length < 1) + remapCurve = new AnimationCurve(Keyframe(0, 0), Keyframe(2, 1)); + if (remapCurve) { + if(remapCurve.length) + range = remapCurve[remapCurve.length-1].time; + for (var i : float = 0.0f; i <= 1.0f; i += 1.0f / 255.0f) { + var c : float = remapCurve.Evaluate(i * 1.0f * range); + curveTex.SetPixel (Mathf.Floor(i*255.0f), 0, Color(c,c,c)); + } + curveTex.Apply (); + } + return 1.0f / range; + } + + function OnDisable () { + if (rt) { + DestroyImmediate (rt); + rt = null; + } + if (tonemapMaterial) { + DestroyImmediate (tonemapMaterial); + tonemapMaterial = null; + } + if (curveTex) { + DestroyImmediate (curveTex); + curveTex = null; + } + } + + function CreateInternalRenderTexture () : boolean { + if (rt) { + return false; + } + rtFormat = SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.RGHalf) ? RenderTextureFormat.RGHalf : RenderTextureFormat.ARGBHalf; + rt = new RenderTexture(1,1, 0, rtFormat); + rt.hideFlags = HideFlags.DontSave; + return true; + } + + // attribute indicates that the image filter chain will continue in LDR + @ImageEffectTransformsToLDR + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if (CheckResources() == false) { + Graphics.Blit (source, destination); + return; + } + + #if UNITY_EDITOR + validRenderTextureFormat = true; + if (source.format != RenderTextureFormat.ARGBHalf) { + validRenderTextureFormat = false; + } + #endif + + // clamp some values to not go out of a valid range + + exposureAdjustment = exposureAdjustment < 0.001f ? 0.001f : exposureAdjustment; + + // SimpleReinhard tonemappers (local, non adaptive) + + if (type == TonemapperType.UserCurve) { + var rangeScale : float = UpdateCurve (); + tonemapMaterial.SetFloat("_RangeScale", rangeScale); + tonemapMaterial.SetTexture("_Curve", curveTex); + Graphics.Blit(source, destination, tonemapMaterial, 4); + return; + } + + if (type == TonemapperType.SimpleReinhard) { + tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); + Graphics.Blit(source, destination, tonemapMaterial, 6); + return; + } + + if (type == TonemapperType.Hable) { + tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); + Graphics.Blit(source, destination, tonemapMaterial, 5); + return; + } + + if (type == TonemapperType.Photographic) { + tonemapMaterial.SetFloat("_ExposureAdjustment", exposureAdjustment); + Graphics.Blit(source, destination, tonemapMaterial, 8); + return; + } + + if (type == TonemapperType.OptimizedHejiDawson) { + tonemapMaterial.SetFloat("_ExposureAdjustment", 0.5f * exposureAdjustment); + Graphics.Blit(source, destination, tonemapMaterial, 7); + return; + } + + // still here? + // => adaptive tone mapping: + // builds an average log luminance, tonemaps according to + // middle grey and white values (user controlled) + + // AdaptiveReinhardAutoWhite will calculate white value automagically + + var freshlyBrewedInternalRt : boolean = CreateInternalRenderTexture (); // this retrieves rtFormat, so should happen before rt allocations + + var rtSquared : RenderTexture = RenderTexture.GetTemporary(adaptiveTextureSize, adaptiveTextureSize, 0, rtFormat); + Graphics.Blit(source, rtSquared); + + var downsample : int = Mathf.Log(rtSquared.width * 1.0f, 2); + + var div : int = 2; + var rts : RenderTexture[] = new RenderTexture[downsample]; + for (var i : int = 0; i < downsample; i++) { + rts[i] = RenderTexture.GetTemporary(rtSquared.width / div, rtSquared.width / div, 0, rtFormat); + div *= 2; + } + + var ar : float = (source.width * 1.0f) / (source.height * 1.0f); + + // downsample pyramid + + var lumRt = rts[downsample-1]; + Graphics.Blit(rtSquared, rts[0], tonemapMaterial, 1); + if (type == TonemapperType.AdaptiveReinhardAutoWhite) { + for(i = 0; i < downsample-1; i++) { + Graphics.Blit(rts[i], rts[i+1], tonemapMaterial, 9); + lumRt = rts[i+1]; + } + } + else if (type == TonemapperType.AdaptiveReinhard) { + for(i = 0; i < downsample-1; i++) { + Graphics.Blit(rts[i], rts[i+1]); + lumRt = rts[i+1]; + } + } + + // we have the needed values, let's apply adaptive tonemapping + + adaptionSpeed = adaptionSpeed < 0.001f ? 0.001f : adaptionSpeed; + tonemapMaterial.SetFloat ("_AdaptionSpeed", adaptionSpeed); + + rt.MarkRestoreExpected(); // keeping luminance values between frames, RT restore expected + + #if UNITY_EDITOR + if(Application.isPlaying && !freshlyBrewedInternalRt) + Graphics.Blit (lumRt, rt, tonemapMaterial, 2); + else + Graphics.Blit (lumRt, rt, tonemapMaterial, 3); + #else + Graphics.Blit (lumRt, rt, tonemapMaterial, freshlyBrewedInternalRt ? 3 : 2); + #endif + + middleGrey = middleGrey < 0.001f ? 0.001f : middleGrey; + tonemapMaterial.SetVector ("_HdrParams", Vector4 (middleGrey, middleGrey, middleGrey, white*white)); + tonemapMaterial.SetTexture ("_SmallTex", rt); + if (type == TonemapperType.AdaptiveReinhard) { + Graphics.Blit (source, destination, tonemapMaterial, 0); + } + else if (type == TonemapperType.AdaptiveReinhardAutoWhite) { + Graphics.Blit (source, destination, tonemapMaterial, 10); + } + else { + Debug.LogError ("No valid adaptive tonemapper type found!"); + Graphics.Blit (source, destination); // at least we get the TransformToLDR effect + } + + // cleanup for adaptive + + for(i = 0; i < downsample; i++) { + RenderTexture.ReleaseTemporary (rts[i]); + } + RenderTexture.ReleaseTemporary (rtSquared); + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js.meta new file mode 100644 index 0000000..c944989 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Tonemapping.js.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: dd05e71c69dd4457fa205c9eea7c2326 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - tonemapper: {fileID: 4800000, guid: 003377fc2620a44939dadde6fe3f8190, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js b/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js new file mode 100644 index 0000000..9be041f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js @@ -0,0 +1,102 @@ + +#pragma strict + +static var meshes : Mesh[]; +static var currentTris : int = 0; + +static function HasMeshes () : boolean { + if (!meshes) + return false; + for (var m : Mesh in meshes) + if (null == m) + return false; + + return true; +} + +static function Cleanup () { + if (!meshes) + return; + + for (var m : Mesh in meshes) { + if (null != m) { + DestroyImmediate (m); + m = null; + } + } + meshes = null; +} + +static function GetMeshes (totalWidth : int, totalHeight : int) : Mesh[] +{ + if (HasMeshes () && (currentTris == (totalWidth * totalHeight))) { + return meshes; + } + + var maxTris : int = 65000 / 3; + var totalTris : int = totalWidth * totalHeight; + currentTris = totalTris; + + var meshCount : int = Mathf.CeilToInt ((1.0f * totalTris) / (1.0f * maxTris)); + + meshes = new Mesh[meshCount]; + + var i : int = 0; + var index : int = 0; + for (i = 0; i < totalTris; i += maxTris) { + var tris : int = Mathf.FloorToInt (Mathf.Clamp ((totalTris-i), 0, maxTris)); + + meshes[index] = GetMesh (tris, i, totalWidth, totalHeight); + index++; + } + + return meshes; +} + +static function GetMesh (triCount : int, triOffset : int, totalWidth : int, totalHeight : int) : Mesh +{ + var mesh = new Mesh (); + mesh.hideFlags = HideFlags.DontSave; + + var verts : Vector3[] = new Vector3[triCount*3]; + var uvs : Vector2[] = new Vector2[triCount*3]; + var uvs2 : Vector2[] = new Vector2[triCount*3]; + var tris : int[] = new int[triCount*3]; + + var size : float = 0.0075f; + + for (var i : int = 0; i < triCount; i++) + { + var i3 : int = i * 3; + var vertexWithOffset : int = triOffset + i; + + var x : float = Mathf.Floor(vertexWithOffset % totalWidth) / totalWidth; + var y : float = Mathf.Floor(vertexWithOffset / totalWidth) / totalHeight; + + var position : Vector3 = Vector3 (x*2-1,y*2-1, 1.0); + + verts[i3 + 0] = position; + verts[i3 + 1] = position; + verts[i3 + 2] = position; + + uvs[i3 + 0] = Vector2 (0.0f, 0.0f); + uvs[i3 + 1] = Vector2 (1.0f, 0.0f); + uvs[i3 + 2] = Vector2 (0.0f, 1.0f); + + uvs2[i3 + 0] = Vector2 (x, y); + uvs2[i3 + 1] = Vector2 (x, y); + uvs2[i3 + 2] = Vector2 (x, y); + + tris[i3 + 0] = i3 + 0; + tris[i3 + 1] = i3 + 1; + tris[i3 + 2] = i3 + 2; + } + + mesh.vertices = verts; + mesh.triangles = tris; + mesh.uv = uvs; + mesh.uv2 = uvs2; + + return mesh; +} + diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js.meta new file mode 100644 index 0000000..059df6a --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Triangles.js.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3e177568faf634377937607864643e25 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs new file mode 100644 index 0000000..54adf14 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs @@ -0,0 +1,14 @@ +using UnityEngine; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Displacement/Twirl")] +public class TwirlEffect : ImageEffectBase { + public Vector2 radius = new Vector2(0.3F,0.3F); + public float angle = 50; + public Vector2 center = new Vector2 (0.5F, 0.5F); + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs.meta new file mode 100644 index 0000000..09873d8 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/TwirlEffect.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bdda781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 641b781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js b/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js new file mode 100644 index 0000000..d14d864 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js @@ -0,0 +1,109 @@ + +#pragma strict + +@script ExecuteInEditMode +@script RequireComponent (Camera) +@script AddComponentMenu ("Image Effects/Camera/Vignette and Chromatic Aberration") + +class Vignetting /* And Chromatic Aberration */ extends PostEffectsBase { + + public enum AberrationMode { + Simple = 0, + Advanced = 1, + } + + public var mode : AberrationMode = AberrationMode.Simple; + + public var intensity : float = 0.375f; // intensity == 0 disables pre pass (optimization) + public var chromaticAberration : float = 0.2f; + public var axialAberration : float = 0.5f; + + public var blur : float = 0.0f; // blur == 0 disables blur pass (optimization) + public var blurSpread : float = 0.75f; + + public var luminanceDependency : float = 0.25f; + + public var blurDistance : float = 2.5f; + + public var vignetteShader : Shader; + private var vignetteMaterial : Material; + + public var separableBlurShader : Shader; + private var separableBlurMaterial : Material; + + public var chromAberrationShader : Shader; + private var chromAberrationMaterial : Material; + + function CheckResources () : boolean { + CheckSupport (false); + + vignetteMaterial = CheckShaderAndCreateMaterial (vignetteShader, vignetteMaterial); + separableBlurMaterial = CheckShaderAndCreateMaterial (separableBlurShader, separableBlurMaterial); + chromAberrationMaterial = CheckShaderAndCreateMaterial (chromAberrationShader, chromAberrationMaterial); + + if (!isSupported) + ReportAutoDisable (); + return isSupported; + } + + function OnRenderImage (source : RenderTexture, destination : RenderTexture) { + if( CheckResources () == false) { + Graphics.Blit (source, destination); + return; + } + + var rtW : int = source.width; + var rtH : int = source.height; + + var doPrepass : boolean = (Mathf.Abs(blur)>0.0f || Mathf.Abs(intensity)>0.0f); + + var widthOverHeight : float = (1.0f * rtW) / (1.0f * rtH); + var oneOverBaseSize : float = 1.0f / 512.0f; + + var color : RenderTexture = null; + var color2a : RenderTexture = null; + var color2b : RenderTexture = null; + + if (doPrepass) { + color = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); + + // Blur corners + if (Mathf.Abs (blur)>0.0f) { + color2a = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); + + Graphics.Blit (source, color2a, chromAberrationMaterial, 0); + + for(var i : int = 0; i < 2; i++) { // maybe make iteration count tweakable + separableBlurMaterial.SetVector ("offsets", Vector4 (0.0f, blurSpread * oneOverBaseSize, 0.0f, 0.0f)); + color2b = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); + Graphics.Blit (color2a, color2b, separableBlurMaterial); + RenderTexture.ReleaseTemporary (color2a); + + separableBlurMaterial.SetVector ("offsets", Vector4 (blurSpread * oneOverBaseSize / widthOverHeight, 0.0f, 0.0f, 0.0f)); + color2a = RenderTexture.GetTemporary (rtW / 2, rtH / 2, 0, source.format); + Graphics.Blit (color2b, color2a, separableBlurMaterial); + RenderTexture.ReleaseTemporary (color2b); + } + } + + vignetteMaterial.SetFloat ("_Intensity", intensity); // intensity for vignette + vignetteMaterial.SetFloat ("_Blur", blur); // blur intensity + vignetteMaterial.SetTexture ("_VignetteTex", color2a); // blurred texture + + Graphics.Blit (source, color, vignetteMaterial, 0); // prepass blit: darken & blur corners + } + + chromAberrationMaterial.SetFloat ("_ChromaticAberration", chromaticAberration); + chromAberrationMaterial.SetFloat ("_AxialAberration", axialAberration); + chromAberrationMaterial.SetVector ("_BlurDistance", Vector2 (-blurDistance, blurDistance)); + chromAberrationMaterial.SetFloat ("_Luminance", 1.0f/Mathf.Max(Mathf.Epsilon, luminanceDependency)); + + if(doPrepass) color.wrapMode = TextureWrapMode.Clamp; + else source.wrapMode = TextureWrapMode.Clamp; + Graphics.Blit (doPrepass ? color : source, destination, chromAberrationMaterial, mode == AberrationMode.Advanced ? 2 : 1); + + RenderTexture.ReleaseTemporary (color); + RenderTexture.ReleaseTemporary (color2a); + } + +} \ No newline at end of file diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js.meta b/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js.meta new file mode 100644 index 0000000..91a7508 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/Vignetting.js.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: bef3d242a13c447ac90c2d2dc213b1ea +MonoImporter: + serializedVersion: 2 + defaultReferences: + - vignetteShader: {fileID: 4800000, guid: 627943dc7a9a74286b70a4f694a0acd5, type: 3} + - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, + type: 3} + - chromAberrationShader: {fileID: 4800000, guid: 2b4f29398d9484ccfa9fd220449f5eee, + type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs b/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs new file mode 100644 index 0000000..ca9d95c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs @@ -0,0 +1,14 @@ +using UnityEngine; + +[ExecuteInEditMode] +[AddComponentMenu("Image Effects/Displacement/Vortex")] +public class VortexEffect : ImageEffectBase { + public Vector2 radius = new Vector2(0.4F,0.4F); + public float angle = 50; + public Vector2 center = new Vector2(0.5F, 0.5F); + + // Called by camera to apply image effect + void OnRenderImage (RenderTexture source, RenderTexture destination) { + ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); + } +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs.meta b/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs.meta new file mode 100644 index 0000000..8ecc974 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/VortexEffect.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a94b781cad112c75d0008dfa8d76c639 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - shader: {fileID: 4800000, guid: 708b781cad112c75d0008dfa8d76c639, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources.meta new file mode 100644 index 0000000..0d1197c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: c60d549d7b8ffdd479e6bedd2605e659 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders.meta new file mode 100644 index 0000000..b68c7f9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b2145489f7c704db8acb14a52bddeee9 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader new file mode 100644 index 0000000..b124d1c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader @@ -0,0 +1,135 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BlendModesOverlay" { + Properties { + _MainTex ("Screen Blended", 2D) = "" {} + _Overlay ("Color", 2D) = "grey" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[2] : TEXCOORD0; + }; + + sampler2D _Overlay; + sampler2D _MainTex; + + half _Intensity; + half4 _MainTex_TexelSize; + half4 _UV_Transform = half4(1, 0, 0, 1); + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv[0] = float2( + dot(v.texcoord.xy, _UV_Transform.xy), + dot(v.texcoord.xy, _UV_Transform.zw) + ); + + #if UNITY_UV_STARTS_AT_TOP + if(_MainTex_TexelSize.y<0.0) + o.uv[0].y = 1.0-o.uv[0].y; + #endif + + o.uv[1] = v.texcoord.xy; + return o; + } + + half4 fragAddSub (v2f i) : SV_Target { + half4 toAdd = tex2D(_Overlay, i.uv[0]) * _Intensity; + return tex2D(_MainTex, i.uv[1]) + toAdd; + } + + half4 fragMultiply (v2f i) : SV_Target { + half4 toBlend = tex2D(_Overlay, i.uv[0]) * _Intensity; + return tex2D(_MainTex, i.uv[1]) * toBlend; + } + + half4 fragScreen (v2f i) : SV_Target { + half4 toBlend = (tex2D(_Overlay, i.uv[0]) * _Intensity); + return 1-(1-toBlend)*(1-(tex2D(_MainTex, i.uv[1]))); + } + + half4 fragOverlay (v2f i) : SV_Target { + half4 m = (tex2D(_Overlay, i.uv[0]));// * 255.0; + half4 color = (tex2D(_MainTex, i.uv[1]));//* 255.0; + + // overlay blend mode + //color.rgb = (color.rgb/255.0) * (color.rgb + ((2*m.rgb)/( 255.0 )) * (255.0-color.rgb)); + //color.rgb /= 255.0; + + /* +if (Target > ½) R = 1 - (1-2x(Target-½)) x (1-Blend) +if (Target <= ½) R = (2xTarget) x Blend + */ + + float3 check = step(0.5, color.rgb); + float3 result = 0; + + result = check * (half3(1,1,1) - ( (half3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); + result += (1-check) * (2*color.rgb) * m.rgb; + + return half4(lerp(color.rgb, result.rgb, (_Intensity)), color.a); + } + + half4 fragAlphaBlend (v2f i) : SV_Target { + half4 toAdd = tex2D(_Overlay, i.uv[0]) ; + return lerp(tex2D(_MainTex, i.uv[1]), toAdd, toAdd.a); + } + + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + ColorMask RGB + + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAddSub + ENDCG + } + + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragScreen + ENDCG + } + + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragMultiply + ENDCG + } + + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragOverlay + ENDCG + } + + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAlphaBlend + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader.meta new file mode 100644 index 0000000..7779533 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlendModesOverlay.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 8c81db0e527d24acc9bcec04e87781bd +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader new file mode 100644 index 0000000..44329e7 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader @@ -0,0 +1,53 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BlurEffectConeTap" { + Properties { _MainTex ("", any) = "" {} } + SubShader { + Pass { + ZTest Always Cull Off ZWrite Off Fog { Mode Off } + SetTexture [_MainTex] {constantColor (0,0,0,0.25) combine texture * constant alpha} + SetTexture [_MainTex] {constantColor (0,0,0,0.25) combine texture * constant + previous} + SetTexture [_MainTex] {constantColor (0,0,0,0.25) combine texture * constant + previous} + SetTexture [_MainTex] {constantColor (0,0,0,0.25) combine texture * constant + previous} + } + } + CGINCLUDE + #include "UnityCG.cginc" + struct v2f { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half2 taps[4] : TEXCOORD1; + }; + sampler2D _MainTex; + half4 _MainTex_TexelSize; + half4 _BlurOffsets; + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord - _BlurOffsets.xy * _MainTex_TexelSize.xy; // hack, see BlurEffect.cs for the reason for this. let's make a new blur effect soon + o.taps[0] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy; + o.taps[1] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy; + o.taps[2] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); + o.taps[3] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); + return o; + } + half4 frag(v2f i) : SV_Target { + half4 color = tex2D(_MainTex, i.taps[0]); + color += tex2D(_MainTex, i.taps[1]); + color += tex2D(_MainTex, i.taps[2]); + color += tex2D(_MainTex, i.taps[3]); + return color * 0.25; + } + ENDCG + SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } + } + Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader.meta new file mode 100644 index 0000000..5f328f4 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/BlurEffectConeTaps.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 57e6deea7c2924e22a5138e2b70bb4dc +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CameraMotionBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CameraMotionBlur.shader new file mode 100644 index 0000000..4733006 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CameraMotionBlur.shader @@ -0,0 +1,518 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + /* + CAMERA MOTION BLUR IMAGE EFFECTS + + Reconstruction Filter: + Based on "Plausible Motion Blur" + http://graphics.cs.williams.edu/papers/MotionBlurI3D12/ + + CameraMotion: + Based on Alex Vlacho's technique in + http://www.valvesoftware.com/publications/2008/GDC2008_PostProcessingInTheOrangeBox.pdf + + SimpleBlur: + Straightforward sampling along velocities + + ScatterFromGather: + Combines Reconstruction with depth of field type defocus + */ + + Shader "Hidden/CameraMotionBlur" { + Properties { + _MainTex ("-", 2D) = "" {} + _NoiseTex ("-", 2D) = "grey" {} + _VelTex ("-", 2D) = "black" {} + _NeighbourMaxTex ("-", 2D) = "black" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + // 's' in paper (# of samples for reconstruction) + #define NUM_SAMPLES (11) + // # samples for valve style blur + #define MOTION_SAMPLES (16) + // 'k' in paper + float _MaxRadiusOrKInPaper; + + static const int SmallDiscKernelSamples = 12; + static const float2 SmallDiscKernel[SmallDiscKernelSamples] = + { + float2(-0.326212,-0.40581), + float2(-0.840144,-0.07358), + float2(-0.695914,0.457137), + float2(-0.203345,0.620716), + float2(0.96234,-0.194983), + float2(0.473434,-0.480026), + float2(0.519456,0.767022), + float2(0.185461,-0.893124), + float2(0.507431,0.064425), + float2(0.89642,0.412458), + float2(-0.32194,-0.932615), + float2(-0.791559,-0.59771) + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + sampler2D_float _CameraDepthTexture; + sampler2D _VelTex; + sampler2D _NeighbourMaxTex; + sampler2D _NoiseTex; + sampler2D _TileTexDebug; + + float4 _MainTex_TexelSize; + float4 _CameraDepthTexture_TexelSize; + float4 _VelTex_TexelSize; + + float4x4 _InvViewProj; // inverse view-projection matrix + float4x4 _PrevViewProj; // previous view-projection matrix + float4x4 _ToPrevViewProjCombined; // combined + + float _Jitter; + + float _VelocityScale; + float _DisplayVelocityScale; + + float _MaxVelocity; + float _MinVelocity; + + float4 _BlurDirectionPacked; + + float _SoftZDistance; + + v2f vert(appdata_img v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + float4 CameraVelocity(v2f i) : SV_Target + { + float2 depth_uv = i.uv; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + depth_uv.y = 1 - depth_uv.y; + #endif + + // read depth + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, depth_uv); + + // calculate position from pixel from depth + float3 clipPos = float3(i.uv.x*2.0-1.0, (i.uv.y)*2.0-1.0, d); + + // only 1 matrix mul: + float4 prevClipPos = mul(_ToPrevViewProjCombined, float4(clipPos, 1.0)); + prevClipPos.xyz /= prevClipPos.w; + + /* + float4 ws = mul(_InvViewProj, float4(clipPos, 1.0)); + ws /= ws.w; + prevClipPos = mul(_PrevViewProj,ws); + prevClipPos.xyz /= prevClipPos.w; + */ + + /* + float2 vel = _VelocityScale *(clipPos.xy - prevClipPos.xy) / 2.f; + // clamp to maximum velocity (in pixels) + float maxVel = length(_MainTex_TexelSize.xy*_MaxVelocity); + if (length(vel) > maxVel) { + vel = normalize(vel) * maxVel; + } + return float4(vel, 0.0, 0.0); + */ + + float2 vel = _MainTex_TexelSize.zw * _VelocityScale * (clipPos.xy - prevClipPos.xy) / 2.f; + float vellen = length(vel); + float maxVel = _MaxVelocity; + float2 velOut = vel * max(0.5, min(vellen, maxVel)) / (vellen + 1e-2f); + velOut *= _MainTex_TexelSize.xy; + return float4(velOut, 0.0, 0.0); + + } + + // vector with largest magnitude + float2 vmax(float2 a, float2 b) + { + float ma = dot(a, a); + float mb = dot(b, b); + return (ma > mb) ? a : b; + } + + // find dominant velocity for each tile + float4 TileMax(v2f i) : SV_Target + { + float2 uvCorner = i.uv - _MainTex_TexelSize.xy * (_MaxRadiusOrKInPaper * 0.5); + float2 maxvel = float2(0,0); + float4 baseUv = float4(uvCorner,0,0); + float4 uvScale = float4(_MainTex_TexelSize.xy, 0, 0); + + for(int l=0; l<(int)_MaxRadiusOrKInPaper; l++) + { + for(int k=0; k<(int)_MaxRadiusOrKInPaper; k++) + { + maxvel = vmax(maxvel, tex2Dlod(_MainTex, baseUv + float4(l,k,0,0) * uvScale).xy); + } + } + return float4(maxvel, 0, 1); + } + + // find maximum velocity in any adjacent tile + float4 NeighbourMax(v2f i) : SV_Target + { + float2 x_ = i.uv; + + // to fetch all neighbours, we need 3x3 point filtered samples + + float2 nx = tex2D(_MainTex, x_+float2(1.0, 1.0)*_MainTex_TexelSize.xy).xy; + nx = vmax(nx, tex2D(_MainTex, x_+float2(1.0, 0.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(1.0,-1.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0, 1.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0, 0.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(0.0,-1.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0, 1.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0, 0.0)*_MainTex_TexelSize.xy).xy); + nx = vmax(nx, tex2D(_MainTex, x_+float2(-1.0,-1.0)*_MainTex_TexelSize.xy).xy); + + return float4(nx, 0, 0); + } + + float4 Debug(v2f i) : SV_Target + { + return saturate( float4(tex2D(_MainTex, i.uv).x,abs(tex2D(_MainTex, i.uv).y),-tex2D(_MainTex, i.uv).xy) * _DisplayVelocityScale); + } + + // classification filters + float cone(float2 px, float2 py, float2 v) + { + return clamp(1.0 - (length(px - py) / length(v)), 0.0, 1.0); + } + + float cylinder(float2 x, float2 y, float2 v) + { + float lv = length(v); + return 1.0 - smoothstep(0.95*lv, 1.05*lv, length(x - y)); + } + + // is zb closer than za? + float softDepthCompare(float za, float zb) + { + return clamp(1.0 - (za - zb) / _SoftZDistance, 0.0, 1.0); + } + + float4 SimpleBlur (v2f i) : SV_Target + { + float2 x = i.uv; + float2 xf = x; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + xf.y = 1 - xf.y; + #endif + + float2 vx = tex2D(_VelTex, xf).xy; // vel at x + + float4 sum = float4(0, 0, 0, 0); + for(int l=0; l _MaxVelocity) { + blurDir *= (_MaxVelocity / velMag); + velMag = _MaxVelocity; + } + + float4 centerTap = tex2D(_MainTex, x); + float4 sum = centerTap; + + blurDir *= smoothstep(_MinVelocity * 0.25f, _MinVelocity * 2.5, velMag); + + blurDir *= _MainTex_TexelSize.xy; + blurDir /= MOTION_SAMPLES; + + for(int i=0; i mb) ? a : b; + } + + // find dominant velocity in each tile + float4 TileMax(v2f i) : SV_Target + { + float2 tilemax = float2(0.0, 0.0); + float2 srcPos = i.uv - _MainTex_TexelSize.xy * _MaxRadiusOrKInPaper * 0.5; + + for(int y=0; y<(int)_MaxRadiusOrKInPaper; y++) { + for(int x=0; x<(int)_MaxRadiusOrKInPaper; x++) { + float2 v = tex2D(_MainTex, srcPos + float2(x,y) * _MainTex_TexelSize.xy).xy; + tilemax = vmax(tilemax, v); + } + } + return float4(tilemax, 0, 1); + } + + // find maximum velocity in any adjacent tile + float4 NeighbourMax(v2f i) : SV_Target + { + float2 maxvel = float2(0.0, 0.0); + for(int y=-1; y<=1; y++) { + for(int x=-1; x<=1; x++) { + float2 v = tex2D(_MainTex, i.uv + float2(x,y) * _MainTex_TexelSize.xy).xy; + maxvel = vmax(maxvel, v); + } + } + return float4(maxvel, 0, 1); + } + + float cone(float2 px, float2 py, float2 v) + { + return clamp(1.0 - (length(px - py) / length(v)), 0.0, 1.0); + } + + float cylinder(float2 x, float2 y, float2 v) + { + float lv = length(v); + return 1.0 - smoothstep(0.95*lv, 1.05*lv, length(x - y)); + } + + float softDepthCompare(float za, float zb) + { + return clamp(1.0 - (za - zb) / _SoftZDistance, 0.0, 1.0); + } + + float4 ReconstructFilterBlur(v2f i) : SV_Target + { + float2 x = i.uv; + float2 xf = x; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + xf.y = 1-xf.y; + #endif + + float2 x2 = xf; + + float2 vn = tex2D(_NeighbourMaxTex, x2).xy; // largest velocity in neighbourhood + float4 cx = tex2D(_MainTex, x); // color at x + + float zx = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, x); + zx = -Linear01Depth(zx); // depth at x + float2 vx = tex2D(_VelTex, xf).xy; // vel at x + + // random offset [-0.5, 0.5] + float j = (tex2D(_NoiseTex, i.uv * 11.0f ).r*2-1) * _Jitter; + + // sample current pixel + float weight = 1.0; + float4 sum = cx * weight; + + int centerSample = (int)(NUM_SAMPLES-1) / 2; + + // in DX11 county we take more samples and interleave with sampling along vx direction to break up "patternized" look + + for(int l=0; l0.99999) + return half4(1,1,1,1); + else + return EncodeFloatRGBA(d); + } + + ENDCG + +Subshader { + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ConvertDepth.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ConvertDepth.shader.meta new file mode 100644 index 0000000..234e0ce --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ConvertDepth.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 14768d3865b1342e3a861fbe19ba2db2 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader new file mode 100644 index 0000000..820be2e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader @@ -0,0 +1,63 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + + +Shader "Hidden/CreaseApply" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _HrDepthTex ("Base (RGB)", 2D) = "white" {} + _LrDepthTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +sampler2D _MainTex; +sampler2D _HrDepthTex; +sampler2D _LrDepthTex; + +uniform float4 _MainTex_TexelSize; + +uniform float intensity; + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +v2f vert( appdata_img v ) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = v.texcoord.xy; + return o; +} + +half4 frag (v2f i) : SV_Target +{ + float4 hrDepth = tex2D(_HrDepthTex, i.uv); + float4 lrDepth = tex2D(_LrDepthTex, i.uv); + + hrDepth.a = DecodeFloatRGBA(hrDepth); + lrDepth.a = DecodeFloatRGBA(lrDepth); + + float4 color = tex2D(_MainTex, i.uv); + + return color * (1.0-abs(hrDepth.a-lrDepth.a)*intensity); +} + +ENDCG + + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader.meta new file mode 100644 index 0000000..d67a003 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/CreaseApply.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b59984d82af624bd3b0c777f038276f2 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader new file mode 100644 index 0000000..13f3966 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader @@ -0,0 +1,327 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/EdgeDetect" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[5] : TEXCOORD0; + }; + + struct v2fd { + float4 pos : SV_POSITION; + float2 uv[2] : TEXCOORD0; + }; + + sampler2D _MainTex; + uniform float4 _MainTex_TexelSize; + + sampler2D _CameraDepthNormalsTexture; + sampler2D_float _CameraDepthTexture; + + uniform half4 _Sensitivity; + uniform half4 _BgColor; + uniform half _BgFade; + uniform half _SampleDistance; + uniform float _Exponent; + + uniform float _Threshold; + + struct v2flum { + float4 pos : SV_POSITION; + float2 uv[3] : TEXCOORD0; + }; + + v2flum vertLum (appdata_img v) + { + v2flum o; + o.pos = UnityObjectToClipPos (v.vertex); + float2 uv = MultiplyUV( UNITY_MATRIX_TEXTURE0, v.texcoord ); + o.uv[0] = uv; + o.uv[1] = uv + float2(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance; + o.uv[2] = uv + float2(+_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance; + return o; + } + + + fixed4 fragLum (v2flum i) : SV_Target + { + fixed4 original = tex2D(_MainTex, i.uv[0]); + + // a very simple cross gradient filter + + half3 p1 = original.rgb; + half3 p2 = tex2D(_MainTex, i.uv[1]).rgb; + half3 p3 = tex2D(_MainTex, i.uv[2]).rgb; + + half3 diff = p1 * 2 - p2 - p3; + half len = dot(diff, diff); + len = step(len, _Threshold); + //if(len >= _Threshold) + // original.rgb = 0; + + return len * lerp(original, _BgColor, _BgFade); + } + + inline half CheckSame (half2 centerNormal, float centerDepth, half4 theSample) + { + // difference in normals + // do not bother decoding normals - there's no need here + half2 diff = abs(centerNormal - theSample.xy) * _Sensitivity.y; + half isSameNormal = (diff.x + diff.y) * _Sensitivity.y < 0.1; + // difference in depth + float sampleDepth = DecodeFloatRG (theSample.zw); + float zdiff = abs(centerDepth-sampleDepth); + // scale the required threshold by the distance + half isSameDepth = zdiff * _Sensitivity.x < 0.09 * centerDepth; + + // return: + // 1 - if normals and depth are similar enough + // 0 - otherwise + + return isSameNormal * isSameDepth; + } + + v2f vertRobert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + float2 uv = v.texcoord.xy; + o.uv[0] = uv; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + uv.y = 1-uv.y; + #endif + + // calc coord for the X pattern + // maybe nicer TODO for the future: 'rotated triangles' + + o.uv[1] = uv + _MainTex_TexelSize.xy * half2(1,1) * _SampleDistance; + o.uv[2] = uv + _MainTex_TexelSize.xy * half2(-1,-1) * _SampleDistance; + o.uv[3] = uv + _MainTex_TexelSize.xy * half2(-1,1) * _SampleDistance; + o.uv[4] = uv + _MainTex_TexelSize.xy * half2(1,-1) * _SampleDistance; + + return o; + } + + v2f vertThin( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + float2 uv = v.texcoord.xy; + o.uv[0] = uv; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + uv.y = 1-uv.y; + #endif + + o.uv[1] = uv; + o.uv[4] = uv; + + // offsets for two additional samples + o.uv[2] = uv + float2(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance; + o.uv[3] = uv + float2(+_MainTex_TexelSize.x, -_MainTex_TexelSize.y) * _SampleDistance; + + return o; + } + + v2fd vertD( appdata_img v ) + { + v2fd o; + o.pos = UnityObjectToClipPos (v.vertex); + + float2 uv = v.texcoord.xy; + o.uv[0] = uv; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + uv.y = 1-uv.y; + #endif + + o.uv[1] = uv; + + return o; + } + + float4 fragDCheap(v2fd i) : SV_Target + { + // inspired by borderlands implementation of popular "sobel filter" + + float centerDepth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv[1])); + float4 depthsDiag; + float4 depthsAxis; + + float2 uvDist = _SampleDistance * _MainTex_TexelSize.xy; + + depthsDiag.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist)); // TR + depthsDiag.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(-1,1))); // TL + depthsDiag.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(-1,1))); // BR + depthsDiag.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist)); // BL + + depthsAxis.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(0,1))); // T + depthsAxis.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(1,0))); // L + depthsAxis.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(1,0))); // R + depthsAxis.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(0,1))); // B + + depthsDiag -= centerDepth; + depthsAxis /= centerDepth; + + const float4 HorizDiagCoeff = float4(1,1,-1,-1); + const float4 VertDiagCoeff = float4(-1,1,-1,1); + const float4 HorizAxisCoeff = float4(1,0,0,-1); + const float4 VertAxisCoeff = float4(0,1,-1,0); + + float4 SobelH = depthsDiag * HorizDiagCoeff + depthsAxis * HorizAxisCoeff; + float4 SobelV = depthsDiag * VertDiagCoeff + depthsAxis * VertAxisCoeff; + + float SobelX = dot(SobelH, float4(1,1,1,1)); + float SobelY = dot(SobelV, float4(1,1,1,1)); + float Sobel = sqrt(SobelX * SobelX + SobelY * SobelY); + + Sobel = 1.0-pow(saturate(Sobel), _Exponent); + return Sobel * lerp(tex2D(_MainTex, i.uv[0].xy), _BgColor, _BgFade); + } + + // pretty much also just a sobel filter, except for that edges "outside" the silhouette get discarded + // which makes it compatible with other depth based post fx + + float4 fragD(v2fd i) : SV_Target + { + // inspired by borderlands implementation of popular "sobel filter" + + float centerDepth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv[1])); + float4 depthsDiag; + float4 depthsAxis; + + float2 uvDist = _SampleDistance * _MainTex_TexelSize.xy; + + depthsDiag.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist)); // TR + depthsDiag.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(-1,1))); // TL + depthsDiag.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(-1,1))); // BR + depthsDiag.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist)); // BL + + depthsAxis.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(0,1))); // T + depthsAxis.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(1,0))); // L + depthsAxis.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(1,0))); // R + depthsAxis.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(0,1))); // B + + // make it work nicely with depth based image effects such as depth of field: + depthsDiag = (depthsDiag > centerDepth.xxxx) ? depthsDiag : centerDepth.xxxx; + depthsAxis = (depthsAxis > centerDepth.xxxx) ? depthsAxis : centerDepth.xxxx; + + depthsDiag -= centerDepth; + depthsAxis /= centerDepth; + + const float4 HorizDiagCoeff = float4(1,1,-1,-1); + const float4 VertDiagCoeff = float4(-1,1,-1,1); + const float4 HorizAxisCoeff = float4(1,0,0,-1); + const float4 VertAxisCoeff = float4(0,1,-1,0); + + float4 SobelH = depthsDiag * HorizDiagCoeff + depthsAxis * HorizAxisCoeff; + float4 SobelV = depthsDiag * VertDiagCoeff + depthsAxis * VertAxisCoeff; + + float SobelX = dot(SobelH, float4(1,1,1,1)); + float SobelY = dot(SobelV, float4(1,1,1,1)); + float Sobel = sqrt(SobelX * SobelX + SobelY * SobelY); + + Sobel = 1.0-pow(saturate(Sobel), _Exponent); + return Sobel * lerp(tex2D(_MainTex, i.uv[0].xy), _BgColor, _BgFade); + } + + half4 fragRobert(v2f i) : SV_Target { + half4 sample1 = tex2D(_CameraDepthNormalsTexture, i.uv[1].xy); + half4 sample2 = tex2D(_CameraDepthNormalsTexture, i.uv[2].xy); + half4 sample3 = tex2D(_CameraDepthNormalsTexture, i.uv[3].xy); + half4 sample4 = tex2D(_CameraDepthNormalsTexture, i.uv[4].xy); + + half edge = 1.0; + + edge *= CheckSame(sample1.xy, DecodeFloatRG(sample1.zw), sample2); + edge *= CheckSame(sample3.xy, DecodeFloatRG(sample3.zw), sample4); + + return edge * lerp(tex2D(_MainTex, i.uv[0]), _BgColor, _BgFade); + } + + half4 fragThin (v2f i) : SV_Target + { + half4 original = tex2D(_MainTex, i.uv[0]); + + half4 center = tex2D (_CameraDepthNormalsTexture, i.uv[1]); + half4 sample1 = tex2D (_CameraDepthNormalsTexture, i.uv[2]); + half4 sample2 = tex2D (_CameraDepthNormalsTexture, i.uv[3]); + + // encoded normal + half2 centerNormal = center.xy; + // decoded depth + float centerDepth = DecodeFloatRG (center.zw); + + half edge = 1.0; + + edge *= CheckSame(centerNormal, centerDepth, sample1); + edge *= CheckSame(centerNormal, centerDepth, sample2); + + return edge * lerp(original, _BgColor, _BgFade); + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertThin + #pragma fragment fragThin + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertRobert + #pragma fragment fragRobert + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vertD + #pragma fragment fragDCheap + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vertD + #pragma fragment fragD + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma target 3.0 + #pragma vertex vertLum + #pragma fragment fragLum + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader.meta new file mode 100644 index 0000000..66f505f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/EdgeDetectNormals.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 0d1644bdf064147baa97f235fc5b4903 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader new file mode 100644 index 0000000..ad5d896 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader @@ -0,0 +1,60 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/FisheyeShader" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + // Shader code pasted into all further CGPROGRAM blocks + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + + float2 intensity; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + half4 frag(v2f i) : SV_Target + { + half2 coords = i.uv; + coords = (coords - 0.5) * 2.0; + + half2 realCoordOffs; + realCoordOffs.x = (1-coords.y * coords.y) * intensity.y * (coords.x); + realCoordOffs.y = (1-coords.x * coords.x) * intensity.x * (coords.y); + + half4 color = tex2D (_MainTex, i.uv - realCoordOffs); + + return color; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } + +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader.meta new file mode 100644 index 0000000..dadf5e7 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/FisheyeShader.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 874ceab4425f64bccb1d14032f4452b1 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader new file mode 100644 index 0000000..fa06d1c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader @@ -0,0 +1,180 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/GlobalFog" { +Properties { + _MainTex ("Base (RGB)", 2D) = "black" {} +} + +CGINCLUDE + + #include "UnityCG.cginc" + + uniform sampler2D _MainTex; + uniform sampler2D_float _CameraDepthTexture; + + // x = fog height + // y = FdotC (CameraY-FogHeight) + // z = k (FdotC > 0.0) + // w = a/2 + uniform float4 _HeightParams; + + // x = start distance + uniform float4 _DistanceParams; + + int _SceneFogMode; + float4 _SceneFogParams; + #ifndef UNITY_APPLY_FOG + half4 unity_FogColor; + half4 unity_FogDensity; + #endif + + uniform float4 _MainTex_TexelSize; + + // for fast world space reconstruction + uniform float4x4 _FrustumCornersWS; + uniform float4 _CameraWS; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uv_depth : TEXCOORD1; + float4 interpolatedRay : TEXCOORD2; + }; + + v2f vert (appdata_img v) + { + v2f o; + half index = v.vertex.z; + v.vertex.z = 0.1; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + o.uv_depth = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv.y = 1-o.uv.y; + #endif + + o.interpolatedRay = _FrustumCornersWS[(int)index]; + o.interpolatedRay.w = index; + + return o; + } + + // Applies one of standard fog formulas, given fog coordinate (i.e. distance) + half ComputeFogFactor (float coord) + { + float fogFac = 0.0; + if (_SceneFogMode == 1) // linear + { + // factor = (end-z)/(end-start) = z * (-1/(end-start)) + (end/(end-start)) + fogFac = coord * _SceneFogParams.z + _SceneFogParams.w; + } + if (_SceneFogMode == 2) // exp + { + // factor = exp(-density*z) + fogFac = _SceneFogParams.y * coord; fogFac = exp2(-fogFac); + } + if (_SceneFogMode == 3) // exp2 + { + // factor = exp(-(density*z)^2) + fogFac = _SceneFogParams.x * coord; fogFac = exp2(-fogFac*fogFac); + } + return saturate(fogFac); + } + + // Distance-based fog + float ComputeDistance (float3 camDir) + { + float coord = length(camDir); + return coord; + } + + // Linear half-space fog, from https://www.terathon.com/lengyel/Lengyel-UnifiedFog.pdf + float ComputeHalfSpace (float3 wsDir) + { + float3 wpos = _CameraWS + wsDir; + float FH = _HeightParams.x; + float3 C = _CameraWS; + float3 V = wsDir; + float3 P = wpos; + float3 aV = _HeightParams.w * V; + float FdotC = _HeightParams.y; + float k = _HeightParams.z; + float FdotP = P.y-FH; + float FdotV = wsDir.y; + float c1 = k * (FdotP + FdotC); + float c2 = (1-2*k) * FdotP; + float g = min(c2, 0.0); + g = -length(aV) * (c1 - g * g / abs(FdotV+1.0e-5f)); + return g; + } + + half4 ComputeFog (v2f i, bool distance, bool height) : SV_Target + { + half4 sceneColor = tex2D(_MainTex, i.uv); + + // Reconstruct world space position & direction + // towards this screen pixel. + float rawDepth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv_depth); + float dpth = Linear01Depth(rawDepth); + float4 wsDir = dpth * i.interpolatedRay; + float4 wsPos = _CameraWS + wsDir; + + // Compute fog distance + float g = _DistanceParams.x; + if (distance) + g += ComputeDistance (wsDir); + if (height) + g += ComputeHalfSpace (wsDir); + + // Compute fog amount + half fogFac = ComputeFogFactor (max(0.0,g)); + // Do not fog skybox + if (rawDepth >= 0.999999) + fogFac = 1.0; + //return fogFac; // for debugging + + // Lerp between fog color & original scene color + // by fog amount + return lerp (unity_FogColor, sceneColor, fogFac); + } + +ENDCG + +SubShader +{ + ZTest Always Cull Off ZWrite Off Fog { Mode Off } + + // 0: distance + height + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + half4 frag (v2f i) : SV_Target { return ComputeFog (i, true, true); } + ENDCG + } + // 1: distance + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + half4 frag (v2f i) : SV_Target { return ComputeFog (i, true, false); } + ENDCG + } + // 2: height + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + half4 frag (v2f i) : SV_Target { return ComputeFog (i, false, true); } + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader.meta new file mode 100644 index 0000000..daf131d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlobalFog.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 70d8568987ac0499f952b54c7c13e265 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader new file mode 100644 index 0000000..3473af5 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader @@ -0,0 +1,58 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/GlowCompose" { + +Properties { + _Color ("Glow Amount", Color) = (1,1,1,1) + _MainTex ("", 2D) = "white" {} +} + +Category { + ZTest Always Cull Off ZWrite Off + Blend One One + + Subshader { + Pass { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + float4 _MainTex_TexelSize; + float4 _BlurOffsets; + + v2f vert (appdata_img v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord.xy); + return o; + } + + sampler2D _MainTex; + fixed4 _Color; + + fixed4 frag( v2f i ) : SV_Target + { + return 2.0f * _Color * tex2D( _MainTex, i.uv ); + } + ENDCG + } + } + + SubShader { + Pass { + SetTexture [_MainTex] {constantColor [_Color] combine constant * texture DOUBLE} + } + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader.meta new file mode 100644 index 0000000..02ef4ef --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowCompose.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 96ca71e39c7b6fb4f9bec2c5bf331349 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader new file mode 100644 index 0000000..1bcdd88 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader @@ -0,0 +1,75 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/GlowConeTap" { + +Properties { + _Color ("Color", color) = (1,1,1,0) + _MainTex ("", 2D) = "white" {} +} + +Category { + ZTest Always Cull Off ZWrite Off + + Subshader { + Pass { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + half4 uv[2] : TEXCOORD0; + }; + + float4 _MainTex_TexelSize; + float4 _BlurOffsets; + + v2f vert (appdata_img v) + { + v2f o; + float offX = _MainTex_TexelSize.x * _BlurOffsets.x; + float offY = _MainTex_TexelSize.y * _BlurOffsets.y; + + o.pos = UnityObjectToClipPos (v.vertex); + float2 uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord.xy-float2(offX, offY)); + + o.uv[0].xy = uv + float2( offX, offY); + o.uv[0].zw = uv + float2(-offX, offY); + o.uv[1].xy = uv + float2( offX,-offY); + o.uv[1].zw = uv + float2(-offX,-offY); + return o; + } + + sampler2D _MainTex; + fixed4 _Color; + + fixed4 frag( v2f i ) : SV_Target + { + fixed4 c; + c = tex2D( _MainTex, i.uv[0].xy ); + c += tex2D( _MainTex, i.uv[0].zw ); + c += tex2D( _MainTex, i.uv[1].xy ); + c += tex2D( _MainTex, i.uv[1].zw ); + c.rgb *= _Color.rgb; + return c * _Color.a; + } + ENDCG + } + } + + Subshader { + Pass { + SetTexture [_MainTex] {constantColor [_Color] combine texture * constant alpha} + SetTexture [_MainTex] {constantColor [_Color] combine texture * constant + previous} + SetTexture [_MainTex] {constantColor [_Color] combine texture * constant + previous} + SetTexture [_MainTex] {constantColor [_Color] combine texture * constant + previous} + } + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader.meta new file mode 100644 index 0000000..d31dcca --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowConeTap.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: fb52973118cf00648825ced2fcca240c +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader new file mode 100644 index 0000000..f57641f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader @@ -0,0 +1,73 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Glow Downsample" { + +Properties { + _Color ("Color", color) = (1,1,1,0) + _MainTex ("", 2D) = "white" {} +} + +Subshader { + + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag + +#include "UnityCG.cginc" + +struct v2f { + float4 pos : SV_POSITION; + float4 uv[4] : TEXCOORD0; +}; + +float4 _MainTex_TexelSize; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + float4 uv; + uv.xy = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); + uv.zw = 0; + float offX = _MainTex_TexelSize.x; + float offY = _MainTex_TexelSize.y; + + // Direct3D9 needs some texel offset! + #ifdef UNITY_HALF_TEXEL_OFFSET + uv.x += offX * 2.0f; + uv.y += offY * 2.0f; + #endif + o.uv[0] = uv + float4(-offX,-offY,0,1); + o.uv[1] = uv + float4( offX,-offY,0,1); + o.uv[2] = uv + float4( offX, offY,0,1); + o.uv[3] = uv + float4(-offX, offY,0,1); + return o; +} + +sampler2D _MainTex; +fixed4 _Color; + +fixed4 frag( v2f i ) : SV_Target +{ + fixed4 c; + c = tex2D( _MainTex, i.uv[0].xy ); + c += tex2D( _MainTex, i.uv[1].xy ); + c += tex2D( _MainTex, i.uv[2].xy ); + c += tex2D( _MainTex, i.uv[3].xy ); + c /= 4; + c.rgb *= _Color.rgb; + c.rgb *= (c.a + _Color.a); + c.a = 0; + return c; +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader.meta new file mode 100644 index 0000000..163f309 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GlowEffectDownsample.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b14b79b8936134d3f8238f0c2d40d634 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader new file mode 100644 index 0000000..2d27c9d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader @@ -0,0 +1,36 @@ +Shader "Hidden/Grayscale Effect" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _RampTex ("Base (RGB)", 2D) = "grayscaleRamp" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert_img +#pragma fragment frag +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform sampler2D _RampTex; +uniform half _RampOffset; + +fixed4 frag (v2f_img i) : SV_Target +{ + fixed4 original = tex2D(_MainTex, i.uv); + fixed grayscale = Luminance(original.rgb); + half2 remap = half2 (grayscale + _RampOffset, .5); + fixed4 output = tex2D(_RampTex, remap); + output.a = original.a; + return output; +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader.meta new file mode 100644 index 0000000..d35f84c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/GrayscaleEffect.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: daf9781cad112c75d0008dfa8d76c639 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader new file mode 100644 index 0000000..2242495 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader @@ -0,0 +1,122 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/MotionBlur" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _AccumOrig("AccumOrig", Float) = 0.65 +} + + SubShader { + ZTest Always Cull Off ZWrite Off + Pass { + Blend SrcAlpha OneMinusSrcAlpha + ColorMask RGB + BindChannels { + Bind "vertex", vertex + Bind "texcoord", texcoord + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata_t { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD; + }; + + struct v2f { + float4 vertex : SV_POSITION; + float2 texcoord : TEXCOORD; + }; + + float4 _MainTex_ST; + float _AccumOrig; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); + return o; + } + + sampler2D _MainTex; + + half4 frag (v2f i) : SV_Target + { + return half4(tex2D(_MainTex, i.texcoord).rgb, _AccumOrig ); + } + ENDCG + } + + Pass { + Blend One Zero + ColorMask A + + BindChannels { + Bind "vertex", vertex + Bind "texcoord", texcoord + } + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata_t { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD; + }; + + struct v2f { + float4 vertex : SV_POSITION; + float2 texcoord : TEXCOORD; + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); + return o; + } + + sampler2D _MainTex; + + half4 frag (v2f i) : SV_Target + { + return tex2D(_MainTex, i.texcoord); + } + ENDCG + } + + } + +SubShader { + ZTest Always Cull Off ZWrite Off + Pass { + Blend SrcAlpha OneMinusSrcAlpha + ColorMask RGB + SetTexture [_MainTex] { + ConstantColor (0,0,0,[_AccumOrig]) + Combine texture, constant + } + } + Pass { + Blend One Zero + ColorMask A + SetTexture [_MainTex] { + Combine texture + } + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader.meta new file mode 100644 index 0000000..a164ad1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlur.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e9ba2083ad114a07d000fbfb8d76c639 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader new file mode 100644 index 0000000..24dea58 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader @@ -0,0 +1,60 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/MotionBlurClear" +{ + +Properties { } + +SubShader { +Pass { + //ZTest LEqual + ZTest Always // lame depth test + ZWrite Off // lame depth test + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct vs_input { + float4 vertex : POSITION; + }; + + struct ps_input { + float4 pos : SV_POSITION; + float4 screen : TEXCOORD0; + }; + + sampler2D_float _CameraDepthTexture; + + ps_input vert (vs_input v) + { + ps_input o; + o.pos = UnityObjectToClipPos (v.vertex); + o.screen = ComputeScreenPos(o.pos); + COMPUTE_EYEDEPTH(o.screen.z); + return o; + } + + float4 frag (ps_input i) : SV_Target + { + // superlame: manual depth test needed as we can't bind depth, FIXME for 4.x + // alternatively implement SM > 3 version where we write out custom depth + + float d = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screen)); + d = LinearEyeDepth(d); + + clip(d - i.screen.z + 1e-2f); + return float4(0, 0, 0, 0); + } + + ENDCG + + } +} + +Fallback Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader.meta new file mode 100644 index 0000000..0e27c3b --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/MotionBlurClear.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 7699c5fbfa27745a1abe111ab7bf9785 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader new file mode 100644 index 0000000..a1dc44a --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader @@ -0,0 +1,158 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/NoiseAndGrain" { + Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _NoiseTex ("Noise (RGB)", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _NoiseTex; + float4 _NoiseTex_TexelSize; + + uniform float4 _MainTex_TexelSize; + + uniform float3 _NoisePerChannel; + uniform float3 _NoiseTilingPerChannel; + uniform float3 _NoiseAmount; + uniform float3 _ThreshholdRGB; + uniform float3 _MidGrey; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv_screen : TEXCOORD0; + float4 uvRg : TEXCOORD1; + float2 uvB : TEXCOORD2; + }; + + struct appdata_img2 + { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + inline float3 Overlay(float3 m, float3 color) { + color = saturate(color); + float3 check = step(float3(0.5,0.5,0.5), color.rgb); + float3 result = check * (float3(1,1,1) - ((float3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); + result += (1-check) * (2*color.rgb) * m.rgb; + return result; + } + + v2f vert (appdata_img2 v) + { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + + #if UNITY_UV_STARTS_AT_TOP + o.uv_screen = v.vertex.xyxy; + if (_MainTex_TexelSize.y < 0) + o.uv_screen.y = 1-o.uv_screen.y; + #else + o.uv_screen = v.vertex.xy; + #endif + + // different tiling for 3 channels + o.uvRg = v.texcoord.xyxy + v.texcoord1.xyxy * _NoiseTilingPerChannel.rrgg * _NoiseTex_TexelSize.xyxy; + o.uvB = v.texcoord.xy + v.texcoord1.xy * _NoiseTilingPerChannel.bb * _NoiseTex_TexelSize.xy; + + return o; + } + + float4 frag ( v2f i ) : SV_Target + { + float4 color = (tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + // fetching & scaling noise (COMPILER BUG WORKAROUND) + float3 m = float3(0,0,0); + m += (tex2D(_NoiseTex, i.uvRg.xy) * float4(1,0,0,0)).rgb; + m += (tex2D(_NoiseTex, i.uvRg.zw) * float4(0,1,0,0)).rgb; + m += (tex2D(_NoiseTex, i.uvB.xy) * float4(0,0,1,0)).rgb; + + m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * float3(finalIntensity,finalIntensity,finalIntensity) )); + + return float4(Overlay(m, color.rgb), color.a); + } + + float4 fragTmp ( v2f i ) : SV_Target + { + float4 color = (tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + // fetching & scaling noise (COMPILER BUG WORKAROUND) + float3 m = float3(0,0,0); + m += (tex2D(_NoiseTex, i.uvRg.xy) * float4(1,0,0,0)).rgb; + m += (tex2D(_NoiseTex, i.uvRg.zw) * float4(0,1,0,0)).rgb; + m += (tex2D(_NoiseTex, i.uvB.xy) * float4(0,0,1,0)).rgb; + + m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * float3(finalIntensity,finalIntensity,finalIntensity))); + + return float4(m.rgb, color.a); + } + + float4 fragOverlayBlend ( v2f i ) : SV_Target + { + float4 color = tex2D(_MainTex, i.uv_screen.xy); + float4 m = tex2D(_NoiseTex, i.uv_screen.xy); + + return float4(Overlay(m, color.rgb), color.a); + } + + ENDCG + + SubShader { + ZTest Always Cull Off ZWrite Off Blend Off + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragOverlayBlend + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragTmp + + ENDCG + + } + } + FallBack Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader.meta new file mode 100644 index 0000000..e737499 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrain.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b0249d8c935344451aa4de6db76f0688 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader new file mode 100644 index 0000000..1b8e347 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader @@ -0,0 +1,239 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/NoiseAndGrainDX11" { + Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _NoiseTex ("Noise (RGB)", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _NoiseTex; + float4 _NoiseTex_TexelSize; + + uniform float4 _MainTex_TexelSize; + + uniform float3 _NoisePerChannel; + uniform float3 _NoiseTilingPerChannel; + uniform float3 _NoiseAmount; + uniform float3 _ThreshholdRGB; + uniform float3 _MidGrey; + uniform float _DX11NoiseTime; + + // DX11 noise helper functions, credit: rgba/iq + + int ihash(int n) + { + n = (n<<13)^n; + return (n*(n*n*15731+789221)+1376312589) & 2147483647; + } + + float frand(int n) + { + return ihash(n) / 2147483647.0; + } + + float cellNoise1f(int3 p) + { + return frand(p.z*65536 + p.y*256 + p.x);//*2.0-1.0; + } + + float3 cellNoise3f(int3 p) + { + int i = p.z*65536 + p.y*256 + p.x; + return float3(frand(i), frand(i + 57), frand(i + 113));//*2.0-1.0; + } + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv_screen : TEXCOORD0; + float4 uvRg : TEXCOORD1; + float2 uvB : TEXCOORD2; + float2 uvOffsets : TEXCOORD4; + }; + + struct appdata_img2 + { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + inline float3 Overlay(float3 m, float3 color) { + float3 check = step(0.5, color.rgb); + float3 result = check * (float3(1,1,1) - ((float3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); + result += (1-check) * (2*color.rgb) * m.rgb; + return result; + } + + v2f vert (appdata_img2 v) + { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + + #if UNITY_UV_STARTS_AT_TOP + o.uv_screen = v.vertex.xyxy; + if (_MainTex_TexelSize.y < 0) + o.uv_screen.y = 1-o.uv_screen.y; + #else + o.uv_screen = v.vertex.xy; + #endif + + // different tiling for 3 channels + o.uvRg = v.texcoord.xyxy + v.texcoord1.xyxy * _NoiseTilingPerChannel.rrgg * _NoiseTex_TexelSize.xyxy; + o.uvB = v.texcoord.xy + v.texcoord1.xy * _NoiseTilingPerChannel.bb * _NoiseTex_TexelSize.xy; + + o.uvOffsets = v.texcoord.xy; + + return o; + } + + float4 fragDX11 ( v2f i ) : SV_Target + { + float4 color = saturate(tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + float3 m = cellNoise3f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); + m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * finalIntensity)); + + return float4(Overlay(m, color.rgb), color.a); + } + + float4 fragDX11Monochrome ( v2f i ) : SV_Target + { + float4 color = saturate(tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + float3 m = cellNoise1f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); + m = saturate(lerp(float3(0.5,0.5,0.5), m, finalIntensity)); + + return float4(Overlay(m, color.rgb), color.a); + } + + float4 fragDX11Tmp ( v2f i ) : SV_Target + { + float4 color = saturate(tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + float3 m = cellNoise3f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); + m = saturate(lerp(float3(0.5,0.5,0.5), m, _NoisePerChannel.rgb * finalIntensity)); + + return float4(m.rgb, color.a); + } + + float4 fragDX11MonochromeTmp ( v2f i ) : SV_Target + { + float4 color = saturate(tex2D (_MainTex, i.uv_screen.xy)); + + // black & white intensities + float2 blackWhiteCurve = Luminance(color.rgb) - _MidGrey.x; // maybe tweak middle grey + blackWhiteCurve.xy = saturate(blackWhiteCurve.xy * _MidGrey.yz); //float2(1.0/0.8, -1.0/0.2)); + + float finalIntensity = _NoiseAmount.x + max(0.0f, dot(_NoiseAmount.zy, blackWhiteCurve.xy)); + + float3 m = cellNoise1f(float3( (i.uv_screen.xy + i.uvOffsets) * _MainTex_TexelSize.zw, _DX11NoiseTime)); + m = saturate(lerp(float3(0.5,0.5,0.5), m, finalIntensity)); + + return float4(m.rgb, color.a); + } + + float4 fragOverlayBlend ( v2f i ) : SV_Target + { + float4 color = saturate(tex2D (_MainTex, i.uv_screen.xy)); + float4 m = saturate(tex2D (_NoiseTex, i.uv_screen.xy)); + + return float4(Overlay(m, color.rgb), color.a); + } + + ENDCG + + SubShader { + ZTest Always Cull Off ZWrite Off Blend Off + + Pass { + + CGPROGRAM + + #pragma exclude_renderers gles xbox360 ps3 d3d9 + #pragma target 5.0 + #pragma vertex vert + #pragma fragment fragDX11 + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma exclude_renderers gles xbox360 ps3 d3d9 + #pragma target 5.0 + #pragma vertex vert + #pragma fragment fragDX11Monochrome + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma exclude_renderers gles xbox360 ps3 d3d9 + #pragma target 5.0 + #pragma vertex vert + #pragma fragment fragDX11Tmp + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma exclude_renderers gles xbox360 ps3 d3d9 + #pragma target 5.0 + #pragma vertex vert + #pragma fragment fragDX11MonochromeTmp + + ENDCG + + } + + Pass { + + CGPROGRAM + + #pragma exclude_renderers gles xbox360 ps3 d3d9 + #pragma target 5.0 + #pragma vertex vert + #pragma fragment fragOverlayBlend + + ENDCG + + } + } + FallBack Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader.meta new file mode 100644 index 0000000..2f3b961 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseAndGrainDX11.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 8b30686bb4322ab42ad5eb50a0210b58 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader new file mode 100644 index 0000000..90f2858 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader @@ -0,0 +1,64 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Noise Shader RGB" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _GrainTex ("Base (RGB)", 2D) = "gray" {} + _ScratchTex ("Base (RGB)", 2D) = "gray" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uvg : TEXCOORD1; // grain + float2 uvs : TEXCOORD2; // scratch +}; + +uniform sampler2D _MainTex; +uniform sampler2D _GrainTex; +uniform sampler2D _ScratchTex; + +uniform float4 _GrainOffsetScale; +uniform float4 _ScratchOffsetScale; +uniform fixed4 _Intensity; // x=grain, y=scratch + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); + o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; + o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; + return o; +} + +fixed4 frag (v2f i) : SV_Target +{ + fixed4 col = tex2D(_MainTex, i.uv); + + // sample noise texture and do a signed add + fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; + col.rgb += grain * _Intensity.x; + + // sample scratch texture and do a signed add + fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; + col.rgb += scratch * _Intensity.y; + + return col; +} +ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader.meta new file mode 100644 index 0000000..0a9249d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderRGB.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 5d7f4c401ae8946bcb0d6ff68a9e7466 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader new file mode 100644 index 0000000..d13cdbe --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader @@ -0,0 +1,75 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Noise Shader YUV" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _GrainTex ("Base (RGB)", 2D) = "gray" {} + _ScratchTex ("Base (RGB)", 2D) = "gray" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uvg : TEXCOORD1; // grain + float2 uvs : TEXCOORD2; // scratch +}; + +uniform sampler2D _MainTex; +uniform sampler2D _GrainTex; +uniform sampler2D _ScratchTex; + +uniform float4 _GrainOffsetScale; +uniform float4 _ScratchOffsetScale; +uniform fixed4 _Intensity; // x=grain, y=scratch + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); + o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; + o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; + return o; +} + +fixed4 frag (v2f i) : SV_Target +{ + fixed4 col = tex2D(_MainTex, i.uv); + + // convert to YUV + fixed3 yuv; + yuv.x = dot( col.rgb, half3(0.299,0.587,0.114) ); + yuv.y = (col.b-yuv.x)*0.492; + yuv.z = (col.r-yuv.x)*0.877; + + // sample noise texture and do a signed add + fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; + yuv.rgb += grain * _Intensity.x; + + // convert back to rgb + col.r = yuv.z * 1.140 + yuv.x; + col.g = yuv.z * (-0.581) + yuv.y * (-0.395) + yuv.x; + col.b = yuv.y * 2.032 + yuv.x; + + // sample scratch texture and add + fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; + col.rgb += scratch * _Intensity.y; + + return col; +} +ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader.meta new file mode 100644 index 0000000..a3f26e7 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/NoiseEffectShaderYUV.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 0e447868506ba49f0a73235b8a8b647a +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader new file mode 100644 index 0000000..5c8891a --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader @@ -0,0 +1,99 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/PrepareSunShaftsBlur" { + Properties { + _MainTex ("Base", 2D) = "" {} + _Skybox ("Skybox", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + sampler2D _Skybox; + sampler2D_float _CameraDepthTexture; + + uniform half _NoSkyBoxMask; + uniform half4 _SunPosition; + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + half TransformColor (half4 skyboxValue) { + return max (skyboxValue.a, _NoSkyBoxMask * dot (skyboxValue.rgb, float3 (0.59,0.3,0.11))); + } + + half4 frag (v2f i) : SV_Target { + float depthSample = SAMPLE_DEPTH_TEXTURE( _CameraDepthTexture, i.uv.xy); + half4 tex = tex2D (_MainTex, i.uv.xy); + + depthSample = Linear01Depth (depthSample); + + // consider maximum radius + half2 vec = _SunPosition.xy - i.uv.xy; + half dist = saturate (_SunPosition.w - length (vec.xy)); + + half4 outColor = 0; + + // consider shafts blockers + if (depthSample > 0.99) + outColor = TransformColor (tex) * dist; + + return outColor; + } + + half4 fragNoDepthNeeded (v2f i) : SV_Target { + float4 sky = (tex2D (_Skybox, i.uv.xy)); + float4 tex = (tex2D (_MainTex, i.uv.xy)); + + // consider maximum radius + half2 vec = _SunPosition.xy - i.uv.xy; + half dist = saturate (_SunPosition.w - length (vec)); + + half4 outColor = 0; + + if (Luminance ( abs(sky.rgb - tex.rgb)) < 0.2) + outColor = TransformColor (sky) * dist; + + return outColor; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragNoDepthNeeded + + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader.meta new file mode 100644 index 0000000..ffd3ee5 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/PrepareSunShaftsBlur.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 9ad381ed8492840ab9f165df743e4826 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader new file mode 100644 index 0000000..5e0025c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader @@ -0,0 +1,73 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/RadialBlur" +{ + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + // Shader code pasted into all further CGPROGRAM blocks + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 blurVector : TEXCOORD1; + }; + + sampler2D _MainTex; + + float4 _BlurRadius4; + float4 _SunPosition; + + float4 _MainTex_TexelSize; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + + o.blurVector = (_SunPosition.xy - v.texcoord.xy) * _BlurRadius4.xy; + + return o; + } + + #define SAMPLES_FLOAT 6.0f + #define SAMPLES_INT 6 + + half4 frag(v2f i) : SV_Target + { + half4 color = half4(0,0,0,0); + + for(int j = 0; j < SAMPLES_INT; j++) + { + half4 tmpColor = tex2D(_MainTex, i.uv.xy); + color += tmpColor; + + i.uv.xy += i.blurVector; + } + + return color / SAMPLES_FLOAT; + } + + ENDCG + +Subshader +{ + Blend One Zero + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + ENDCG + } // Pass +} // Subshader + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader.meta new file mode 100644 index 0000000..96c5bef --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/RadialBlur.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f58445347fe2e4b8396487ed2bfa02ad +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader new file mode 100644 index 0000000..9cf2895 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader @@ -0,0 +1,282 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/SSAO" { +Properties { + _MainTex ("", 2D) = "" {} + _RandomTexture ("", 2D) = "" {} + _SSAO ("", 2D) = "" {} +} +Subshader { + ZTest Always Cull Off ZWrite Off + +CGINCLUDE +// Common code used by several SSAO passes below +#include "UnityCG.cginc" +#pragma exclude_renderers gles +struct v2f_ao { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uvr : TEXCOORD1; +}; + +uniform float2 _NoiseScale; +float4 _CameraDepthNormalsTexture_ST; + +v2f_ao vert_ao (appdata_img v) +{ + v2f_ao o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX(v.texcoord, _CameraDepthNormalsTexture); + o.uvr = v.texcoord.xy * _NoiseScale; + return o; +} + +sampler2D _CameraDepthNormalsTexture; +sampler2D _RandomTexture; +float4 _Params; // x=radius, y=minz, z=attenuation power, w=SSAO power + +// HLSL and GLSL do not support arbitrarily sized arrays as function parameters (eg. float bla[]), whereas Cg does. +#if !defined(UNITY_COMPILER_CG) + +# define INPUT_SAMPLE_COUNT 8 +# include "frag_ao.cginc" +# undef INPUT_SAMPLE_COUNT + +# define INPUT_SAMPLE_COUNT 14 +# include "frag_ao.cginc" +# undef INPUT_SAMPLE_COUNT + +# define INPUT_SAMPLE_COUNT 26 +# include "frag_ao.cginc" +# undef INPUT_SAMPLE_COUNT + +# define INPUT_SAMPLE_COUNT 34 +# include "frag_ao.cginc" +# undef INPUT_SAMPLE_COUNT + +#else +# define INPUT_SAMPLE_COUNT +# include "frag_ao.cginc" +#endif + +ENDCG + + // ---- SSAO pass, 8 samples + Pass { + +CGPROGRAM +#pragma vertex vert_ao +#pragma fragment frag +#pragma target 3.0 + + +half4 frag (v2f_ao i) : SV_Target +{ + #define SAMPLE_COUNT 8 + const float3 RAND_SAMPLES[SAMPLE_COUNT] = { + float3(0.01305719,0.5872321,-0.119337), + float3(0.3230782,0.02207272,-0.4188725), + float3(-0.310725,-0.191367,0.05613686), + float3(-0.4796457,0.09398766,-0.5802653), + float3(0.1399992,-0.3357702,0.5596789), + float3(-0.2484578,0.2555322,0.3489439), + float3(0.1871898,-0.702764,-0.2317479), + float3(0.8849149,0.2842076,0.368524), + }; + return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); +} +ENDCG + + } + +// ---- SSAO pass, 14 samples + Pass { + +CGPROGRAM +#pragma vertex vert_ao +#pragma fragment frag +#pragma target 3.0 + + +half4 frag (v2f_ao i) : SV_Target +{ + #define SAMPLE_COUNT 14 + const float3 RAND_SAMPLES[SAMPLE_COUNT] = { + float3(0.4010039,0.8899381,-0.01751772), + float3(0.1617837,0.1338552,-0.3530486), + float3(-0.2305296,-0.1900085,0.5025396), + float3(-0.6256684,0.1241661,0.1163932), + float3(0.3820786,-0.3241398,0.4112825), + float3(-0.08829653,0.1649759,0.1395879), + float3(0.1891677,-0.1283755,-0.09873557), + float3(0.1986142,0.1767239,0.4380491), + float3(-0.3294966,0.02684341,-0.4021836), + float3(-0.01956503,-0.3108062,-0.410663), + float3(-0.3215499,0.6832048,-0.3433446), + float3(0.7026125,0.1648249,0.02250625), + float3(0.03704464,-0.939131,0.1358765), + float3(-0.6984446,-0.6003422,-0.04016943), + }; + return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); +} +ENDCG + + } + +// ---- SSAO pass, 26 samples + Pass { + +CGPROGRAM +#pragma vertex vert_ao +#pragma fragment frag +#pragma target 3.0 + + +half4 frag (v2f_ao i) : SV_Target +{ + #define SAMPLE_COUNT 26 + const float3 RAND_SAMPLES[SAMPLE_COUNT] = { + float3(0.2196607,0.9032637,0.2254677), + float3(0.05916681,0.2201506,-0.1430302), + float3(-0.4152246,0.1320857,0.7036734), + float3(-0.3790807,0.1454145,0.100605), + float3(0.3149606,-0.1294581,0.7044517), + float3(-0.1108412,0.2162839,0.1336278), + float3(0.658012,-0.4395972,-0.2919373), + float3(0.5377914,0.3112189,0.426864), + float3(-0.2752537,0.07625949,-0.1273409), + float3(-0.1915639,-0.4973421,-0.3129629), + float3(-0.2634767,0.5277923,-0.1107446), + float3(0.8242752,0.02434147,0.06049098), + float3(0.06262707,-0.2128643,-0.03671562), + float3(-0.1795662,-0.3543862,0.07924347), + float3(0.06039629,0.24629,0.4501176), + float3(-0.7786345,-0.3814852,-0.2391262), + float3(0.2792919,0.2487278,-0.05185341), + float3(0.1841383,0.1696993,-0.8936281), + float3(-0.3479781,0.4725766,-0.719685), + float3(-0.1365018,-0.2513416,0.470937), + float3(0.1280388,-0.563242,0.3419276), + float3(-0.4800232,-0.1899473,0.2398808), + float3(0.6389147,0.1191014,-0.5271206), + float3(0.1932822,-0.3692099,-0.6060588), + float3(-0.3465451,-0.1654651,-0.6746758), + float3(0.2448421,-0.1610962,0.1289366), + }; + return frag_ao (i, SAMPLE_COUNT, RAND_SAMPLES); +} +ENDCG + + } + +// ---- Blur pass + Pass { +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#pragma target 3.0 +#include "UnityCG.cginc" + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +float4 _MainTex_ST; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX (v.texcoord, _CameraDepthNormalsTexture); + return o; +} + +sampler2D _SSAO; +float3 _TexelOffsetScale; + +inline half CheckSame (half4 n, half4 nn) +{ + // difference in normals + half2 diff = abs(n.xy - nn.xy); + half sn = (diff.x + diff.y) < 0.1; + // difference in depth + float z = DecodeFloatRG (n.zw); + float zz = DecodeFloatRG (nn.zw); + float zdiff = abs(z-zz) * _ProjectionParams.z; + half sz = zdiff < 0.2; + return sn * sz; +} + + +half4 frag( v2f i ) : SV_Target +{ + #define NUM_BLUR_SAMPLES 4 + + float2 o = _TexelOffsetScale.xy; + + half sum = tex2D(_SSAO, i.uv).r * (NUM_BLUR_SAMPLES + 1); + half denom = NUM_BLUR_SAMPLES + 1; + + half4 geom = tex2D (_CameraDepthNormalsTexture, i.uv); + + for (int s = 0; s < NUM_BLUR_SAMPLES; ++s) + { + float2 nuv = i.uv + o * (s+1); + half4 ngeom = tex2D (_CameraDepthNormalsTexture, nuv.xy); + half coef = (NUM_BLUR_SAMPLES - s) * CheckSame (geom, ngeom); + sum += tex2D (_SSAO, nuv.xy).r * coef; + denom += coef; + } + for (int s = 0; s < NUM_BLUR_SAMPLES; ++s) + { + float2 nuv = i.uv - o * (s+1); + half4 ngeom = tex2D (_CameraDepthNormalsTexture, nuv.xy); + half coef = (NUM_BLUR_SAMPLES - s) * CheckSame (geom, ngeom); + sum += tex2D (_SSAO, nuv.xy).r * coef; + denom += coef; + } + return sum / denom; +} +ENDCG + } + + // ---- Composite pass + Pass { +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +struct v2f { + float4 pos : SV_POSITION; + float2 uv[2] : TEXCOORD0; +}; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv[0] = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); + o.uv[1] = MultiplyUV (UNITY_MATRIX_TEXTURE1, v.texcoord); + return o; +} + +sampler2D _MainTex; +sampler2D _SSAO; + +half4 frag( v2f i ) : SV_Target +{ + half4 c = tex2D (_MainTex, i.uv[0]); + half ao = tex2D (_SSAO, i.uv[1]).r; + ao = pow (ao, _Params.w); + c.rgb *= ao; + return c; +} +ENDCG + } + +} + +Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader.meta new file mode 100644 index 0000000..29c3f54 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SSAOShader.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 43ca18288c424f645aaa1e9e07f04c50 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader new file mode 100644 index 0000000..b80cb12 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader @@ -0,0 +1,405 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +// This Ambient Occlusion image effect is based on "Scalable Ambient Obscurance": + +/** + +\author Morgan McGuire and Michael Mara, NVIDIA and Williams College, http://research.nvidia.com, http://graphics.cs.williams.edu + +Open Source under the "BSD" license: http://www.opensource.org/licenses/bsd-license.php + +Copyright (c) 2011-2012, NVIDIA +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +Shader "Hidden/ScreenSpaceAmbientObscurance" +{ + Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + #ifdef SHADER_API_D3D11 + #define NUM_SAMPLES (15) + #else + #define NUM_SAMPLES (11) + #endif + + #define FAR_PLANE_Z (300.0) + #define NUM_SPIRAL_TURNS (7) + #define bias (0.01) + + float _Radius; + float _Radius2; // _Radius * _Radius; + float _Intensity; + float4 _ProjInfo; + float4x4 _ProjectionInv; // ref only + + sampler2D_float _CameraDepthTexture; + sampler2D _Rand; + sampler2D _AOTex; + sampler2D _MainTex; + + float4 _MainTex_TexelSize; + + static const float gaussian[5] = { 0.153170, 0.144893, 0.122649, 0.092902, 0.062970 }; // stddev = 2.0 + + float2 _Axis; + + /** Increase to make edges crisper. Decrease to reduce temporal flicker. */ + #define EDGE_SHARPNESS (1.0) + + float _BlurFilterDistance; + #define SCALE _BlurFilterDistance + + /** Filter _Radius in pixels. This will be multiplied by SCALE. */ + #define R (4) + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uv2 : TEXCOORD1; + }; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + o.uv2 = v.texcoord.xy; + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv2.y = 1-o.uv2.y; + #endif + return o; + } + + float3 ReconstructCSPosition(float2 S, float z) + { + float linEyeZ = LinearEyeDepth(z); + return float3(( ( S.xy * _MainTex_TexelSize.zw) * _ProjInfo.xy + _ProjInfo.zw) * linEyeZ, linEyeZ); + + /* + // for reference + float4 clipPos = float4(S*2.0-1.0, (z*2-1), 1); + float4 viewPos; + viewPos.x = dot((float4)_ProjectionInv[0], clipPos); + viewPos.y = dot((float4)_ProjectionInv[1], clipPos); + viewPos.w = dot((float4)_ProjectionInv[3], clipPos); + viewPos.z = z; + viewPos = viewPos/viewPos.w; + return viewPos.xyz; + */ + } + + float3 ReconstructCSFaceNormal(float3 C) { + return normalize(cross(ddy(C), ddx(C))); + } + + + /** Returns a unit vector and a screen-space _Radius for the tap on a unit disk (the caller should scale by the actual disk _Radius) */ + + float2 TapLocation(int sampleNumber, float spinAngle, out float ssR){ + // Radius relative to ssR + float alpha = float(sampleNumber + 0.5) * (1.0 / NUM_SAMPLES); + float angle = alpha * (NUM_SPIRAL_TURNS * 6.28) + spinAngle; + + ssR = alpha; + return float2(cos(angle), sin(angle)); + } + + /** Used for packing Z into the GB channels */ + float CSZToKey(float z) { + return saturate(z * (1.0 / FAR_PLANE_Z)); + } + + /** Used for packing Z into the GB channels */ + void packKey(float key, out float2 p) { + // Round to the nearest 1/256.0 + float temp = floor(key * 256.0); + + // Integer part + p.x = temp * (1.0 / 256.0); + + // Fractional part + p.y = key * 256.0 - temp; + } + + /** Returns a number on (0, 1) */ + float UnpackKey(float2 p) + { + return p.x * (256.0 / 257.0) + p.y * (1.0 / 257.0); + } + + + /** Read the camera-space position of the point at screen-space pixel ssP */ + float3 GetPosition(float2 ssP) { + float3 P; + + P.z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, ssP.xy); + + // Offset to pixel center + P = ReconstructCSPosition(float2(ssP) /*+ float2(0.5, 0.5)*/, P.z); + return P; + } + + /** Read the camera-space position of the point at screen-space pixel ssP + unitOffset * ssR. Assumes length(unitOffset) == 1 */ + float3 GetOffsetPosition(float2 ssC, float2 unitOffset, float ssR) + { + float2 ssP = saturate(float2(ssR*unitOffset) + ssC); + + float3 P; + P.z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, ssP.xy); + + // Offset to pixel center + P = ReconstructCSPosition(float2(ssP)/* + float2(0.5, 0.5)*/, P.z); + + return P; + } + + /** Compute the occlusion due to sample with index \a i about the pixel at \a ssC that corresponds + to camera-space point \a C with unit normal \a n_C, using maximum screen-space sampling _Radius \a ssDiskRadius */ + + float SampleAO(in float2 ssC, in float3 C, in float3 n_C, in float ssDiskRadius, in int tapIndex, in float randomPatternRotationAngle) + { + // Offset on the unit disk, spun for this pixel + float ssR; + float2 unitOffset = TapLocation(tapIndex, randomPatternRotationAngle, ssR); + ssR *= ssDiskRadius; + + // The occluding point in camera space + float3 Q = GetOffsetPosition(ssC, unitOffset, ssR); + + float3 v = Q - C; + + float vv = dot(v, v); + float vn = dot(v, n_C); + + const float epsilon = 0.01; + float f = max(_Radius2 - vv, 0.0); + return f * f * f * max((vn - bias) / (epsilon + vv), 0.0); + } + + float4 fragAO(v2f i) : SV_Target + { + float4 fragment = fixed4(1,1,1,1); + + // Pixel being shaded + float2 ssC = i.uv2.xy;// * _MainTex_TexelSize.zw; + + // View space point being shaded + float3 C = GetPosition(ssC); + + //return abs(float4(C.xyz,0)); + //if(abs(C.z)<0.31) + // return 1; + //return abs(C.z); + + packKey(CSZToKey(C.z), fragment.gb); + //packKey(CSZToKey(C.z), bilateralKey); + + float randomPatternRotationAngle = 1.0; + #ifdef SHADER_API_D3D11 + int2 ssCInt = ssC.xy * _MainTex_TexelSize.zw; + randomPatternRotationAngle = (3 * ssCInt.x ^ ssCInt.y + ssCInt.x * ssCInt.y) * 10; + #else + // TODO: make dx9 rand better + randomPatternRotationAngle = tex2D(_Rand, i.uv*12.0).x * 1000.0; + #endif + + // Reconstruct normals from positions. These will lead to 1-pixel black lines + // at depth discontinuities, however the blur will wipe those out so they are not visible + // in the final image. + float3 n_C = ReconstructCSFaceNormal(C); + + //return float4((n_C),0); + + // Choose the screen-space sample _Radius + // proportional to the projected area of the sphere + float ssDiskRadius = -_Radius / C.z; // -projScale * _Radius / C.z; // <::::: + + float sum = 0.0; + for (int l = 0; l < NUM_SAMPLES; ++l) { + sum += SampleAO(ssC, C, n_C, (ssDiskRadius), l, randomPatternRotationAngle); + } + + float temp = _Radius2 * _Radius; + sum /= temp * temp; + + float A = max(0.0, 1.0 - sum * _Intensity * (5.0 / NUM_SAMPLES)); + fragment.ra = float2(A,A); + + return fragment; + } + + float4 fragUpsample (v2f i) : SV_Target + { + float4 fragment = fixed4(1,1,1,1); + + // View space point being shaded + float3 C = GetPosition(i.uv.xy); + + packKey(CSZToKey(C.z), fragment.gb); + fragment.ra = tex2D(_MainTex, i.uv.xy).ra; + + return fragment; + } + + float4 fragApply (v2f i) : SV_Target + { + float4 ao = tex2D(_AOTex, i.uv2.xy); + return tex2D(_MainTex, i.uv.xy) * ao.rrrr; + } + + float4 fragApplySoft (v2f i) : SV_Target + { + float4 color = tex2D(_MainTex, i.uv.xy); + + float ao = tex2D(_AOTex, i.uv2.xy).r; + ao += tex2D(_AOTex, i.uv2.xy + _MainTex_TexelSize.xy * 0.75).r; + ao += tex2D(_AOTex, i.uv2.xy - _MainTex_TexelSize.xy * 0.75).r; + ao += tex2D(_AOTex, i.uv2.xy + _MainTex_TexelSize.xy * float2(-0.75,0.75)).r; + ao += tex2D(_AOTex, i.uv2.xy - _MainTex_TexelSize.xy * float2(-0.75,0.75)).r; + + return color * float4(ao,ao,ao,5)/5; + } + + float4 fragBlurBL (v2f i) : SV_Target + { + float4 fragment = float4(1,1,1,1); + + float2 ssC = i.uv.xy; + + float4 temp = tex2Dlod(_MainTex, float4(i.uv.xy,0,0)); + + float2 passthrough2 = temp.gb; + float key = UnpackKey(passthrough2); + + float sum = temp.r; + + /* + if (key >= 0.999) { + // Sky pixel (if you aren't using depth keying, disable this test) + fragment.gb = passthrough2; + return fragment; + } + */ + + // Base weight for depth falloff. Increase this for more blurriness, decrease it for better edge discrimination + + float BASE = gaussian[0] * 0.5; // ole: i decreased + float totalWeight = BASE; + sum *= totalWeight; + + for (int r = -R; r <= R; ++r) { + // We already handled the zero case above. This loop should be unrolled and the branch discarded + if (r != 0) { + temp = tex2Dlod(_MainTex, float4(ssC + _Axis * _MainTex_TexelSize.xy * (r * SCALE),0,0) ); + float tapKey = UnpackKey(temp.gb); + float value = temp.r; + + // spatial domain: offset gaussian tap + int index = r; if (index<0) index = -index; + float weight = 0.3 + gaussian[index]; + + // range domain (the "bilateral" weight). As depth difference increases, decrease weight. + weight *= max(0.0, 1.0 - (2000.0 * EDGE_SHARPNESS) * abs(tapKey - key)); + + sum += value * weight; + totalWeight += weight; + } + } + + const float epsilon = 0.0001; + fragment = sum / (totalWeight + epsilon); + + fragment.gb = passthrough2; + + return fragment; + } + + ENDCG + +SubShader { + + // 0: get ao + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragAO + #pragma target 3.0 + + ENDCG + } + + // 1: bilateral blur + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragBlurBL + #pragma target 3.0 + + ENDCG + } + + // 2: apply ao + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragApply + #pragma target 3.0 + + ENDCG + } + + // 3: apply with a slight box filter + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragApplySoft + #pragma target 3.0 + + ENDCG + } + + // 4: in case you want to blur in high rez for nicer z borders + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragUpsample + #pragma target 3.0 + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader.meta new file mode 100644 index 0000000..67c78a2 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ScreenSpaceAmbientObscurance.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 95616c020c5604dda96cf76afbbc0272 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader new file mode 100644 index 0000000..c042cd8 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader @@ -0,0 +1,38 @@ +Shader "Hidden/Sepiatone Effect" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert_img +#pragma fragment frag +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; + +fixed4 frag (v2f_img i) : SV_Target +{ + fixed4 original = tex2D(_MainTex, i.uv); + + // get intensity value (Y part of YIQ color space) + fixed Y = dot (fixed3(0.299, 0.587, 0.114), original.rgb); + + // Convert to Sepia Tone by adding constant + fixed4 sepiaConvert = float4 (0.191, -0.054, -0.221, 0.0); + fixed4 output = sepiaConvert + Y; + output.a = original.a; + + return output; +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader.meta new file mode 100644 index 0000000..e94093b --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SepiaToneEffect.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b6aa781cad112c75d0008dfa8d76c639 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader new file mode 100644 index 0000000..00e0d42 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader @@ -0,0 +1,56 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + + +Shader "Hidden/ShowAlphaChannel" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _EdgeTex ("_EdgeTex", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag + +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform sampler2D _EdgeTex; + +uniform float4 _MainTex_TexelSize; + +float filterRadius; + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +v2f vert( appdata_img v ) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord.xy; + + return o; +} + +half4 frag (v2f i) : SV_Target +{ + + half4 color = tex2D(_MainTex, i.uv.xy); + half edges = color.a; + + return edges; +} +ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader.meta new file mode 100644 index 0000000..84d6b57 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/ShowAlphaChannel.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: da310021e2a4142429d95c537846dc38 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader new file mode 100644 index 0000000..4d4cec9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader @@ -0,0 +1,43 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + + +Shader "Hidden/SimpleClear" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform float4 _MainTex_TexelSize; + +struct v2f { + float4 pos : SV_POSITION; +}; + +v2f vert( appdata_img v ) +{ + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + return o; +} + +half4 frag (v2f i) : SV_Target +{ + return half4(0,0,0,0); +} +ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader.meta new file mode 100644 index 0000000..2b70642 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SimpleClear.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f688f89ed5eb847c5b19c934a0f1e772 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader new file mode 100644 index 0000000..175e586 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader @@ -0,0 +1,224 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/SunShaftsComposite" { + Properties { + _MainTex ("Base", 2D) = "" {} + _ColorBuffer ("Color", 2D) = "" {} + _Skybox ("Skybox", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + #if UNITY_UV_STARTS_AT_TOP + float2 uv1 : TEXCOORD1; + #endif + }; + + struct v2f_radial { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 blurVector : TEXCOORD1; + }; + + sampler2D _MainTex; + sampler2D _ColorBuffer; + sampler2D _Skybox; + sampler2D_float _CameraDepthTexture; + + uniform half4 _SunThreshold; + + uniform half4 _SunColor; + uniform half4 _BlurRadius4; + uniform half4 _SunPosition; + uniform half4 _MainTex_TexelSize; + + #define SAMPLES_FLOAT 6.0f + #define SAMPLES_INT 6 + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + o.uv1 = v.texcoord.xy; + if (_MainTex_TexelSize.y < 0) + o.uv1.y = 1-o.uv1.y; + #endif + + return o; + } + + half4 fragScreen(v2f i) : SV_Target { + half4 colorA = tex2D (_MainTex, i.uv.xy); + #if UNITY_UV_STARTS_AT_TOP + half4 colorB = tex2D (_ColorBuffer, i.uv1.xy); + #else + half4 colorB = tex2D (_ColorBuffer, i.uv.xy); + #endif + half4 depthMask = saturate (colorB * _SunColor); + return 1.0f - (1.0f-colorA) * (1.0f-depthMask); + } + + half4 fragAdd(v2f i) : SV_Target { + half4 colorA = tex2D (_MainTex, i.uv.xy); + #if UNITY_UV_STARTS_AT_TOP + half4 colorB = tex2D (_ColorBuffer, i.uv1.xy); + #else + half4 colorB = tex2D (_ColorBuffer, i.uv.xy); + #endif + half4 depthMask = saturate (colorB * _SunColor); + return colorA + depthMask; + } + + v2f_radial vert_radial( appdata_img v ) { + v2f_radial o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv.xy = v.texcoord.xy; + o.blurVector = (_SunPosition.xy - v.texcoord.xy) * _BlurRadius4.xy; + + return o; + } + + half4 frag_radial(v2f_radial i) : SV_Target + { + half4 color = half4(0,0,0,0); + for(int j = 0; j < SAMPLES_INT; j++) + { + half4 tmpColor = tex2D(_MainTex, i.uv.xy); + color += tmpColor; + i.uv.xy += i.blurVector; + } + return color / SAMPLES_FLOAT; + } + + half TransformColor (half4 skyboxValue) { + return dot(max(skyboxValue.rgb - _SunThreshold.rgb, half3(0,0,0)), half3(1,1,1)); // threshold and convert to greyscale + } + + half4 frag_depth (v2f i) : SV_Target { + #if UNITY_UV_STARTS_AT_TOP + float depthSample = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + #else + float depthSample = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv.xy); + #endif + + half4 tex = tex2D (_MainTex, i.uv.xy); + + depthSample = Linear01Depth (depthSample); + + // consider maximum radius + #if UNITY_UV_STARTS_AT_TOP + half2 vec = _SunPosition.xy - i.uv1.xy; + #else + half2 vec = _SunPosition.xy - i.uv.xy; + #endif + half dist = saturate (_SunPosition.w - length (vec.xy)); + + half4 outColor = 0; + + // consider shafts blockers + if (depthSample > 0.99) + outColor = TransformColor (tex) * dist; + + return outColor; + } + + half4 frag_nodepth (v2f i) : SV_Target { + #if UNITY_UV_STARTS_AT_TOP + float4 sky = (tex2D (_Skybox, i.uv1.xy)); + #else + float4 sky = (tex2D (_Skybox, i.uv.xy)); + #endif + + float4 tex = (tex2D (_MainTex, i.uv.xy)); + + // consider maximum radius + #if UNITY_UV_STARTS_AT_TOP + half2 vec = _SunPosition.xy - i.uv1.xy; + #else + half2 vec = _SunPosition.xy - i.uv.xy; + #endif + half dist = saturate (_SunPosition.w - length (vec)); + + half4 outColor = 0; + + // find unoccluded sky pixels + // consider pixel values that differ significantly between framebuffer and sky-only buffer as occluded + if (Luminance ( abs(sky.rgb - tex.rgb)) < 0.2) + outColor = TransformColor (sky) * dist; + + return outColor; + } + + + + ENDCG + +Subshader { + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragScreen + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert_radial + #pragma fragment frag_radial + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag_depth + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag_nodepth + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragAdd + + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader.meta new file mode 100644 index 0000000..5be4ee9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/SunShaftsComposite.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d3b1c8c1036784176946f5cfbfb7fe4c +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader new file mode 100644 index 0000000..51c3a10 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader @@ -0,0 +1,356 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Tonemapper" { + Properties { + _MainTex ("", 2D) = "black" {} + _SmallTex ("", 2D) = "grey" {} + _Curve ("", 2D) = "black" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + sampler2D _SmallTex; + sampler2D _Curve; + + float4 _HdrParams; + float2 intensity; + float4 _MainTex_TexelSize; + float _AdaptionSpeed; + float _ExposureAdjustment; + float _RangeScale; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + float4 fragLog(v2f i) : SV_Target + { + const float DELTA = 0.0001f; + + float fLogLumSum = 0.0f; + + fLogLumSum += log( Luminance(tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(-1,-1)).rgb) + DELTA); + fLogLumSum += log( Luminance(tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(1,1)).rgb) + DELTA); + fLogLumSum += log( Luminance(tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(-1,1)).rgb) + DELTA); + fLogLumSum += log( Luminance(tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(1,-1)).rgb) + DELTA); + + float avg = fLogLumSum / 4.0; + return float4(avg, avg, avg, avg); + } + + float4 fragExp(v2f i) : SV_Target + { + float2 lum = float2(0.0f, 0.0f); + + lum += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(-1,-1)).xy; + lum += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(1,1)).xy; + lum += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(1,-1)).xy; + lum += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * float2(-1,1)).xy; + + lum = exp(lum / 4.0f); + + return float4(lum.x, lum.y, lum.x, saturate(0.0125 * _AdaptionSpeed)); + } + + float3 ToCIE(float3 FullScreenImage) + { + // RGB -> XYZ conversion + // http://www.w3.org/Graphics/Color/sRGB + // The official sRGB to XYZ conversion matrix is (following ITU-R BT.709) + // 0.4125 0.3576 0.1805 + // 0.2126 0.7152 0.0722 + // 0.0193 0.1192 0.9505 + + float3x3 RGB2XYZ = {0.5141364, 0.3238786, 0.16036376, 0.265068, 0.67023428, 0.06409157, 0.0241188, 0.1228178, 0.84442666}; + + float3 XYZ = mul(RGB2XYZ, FullScreenImage.rgb); + + // XYZ -> Yxy conversion + + float3 Yxy; + + Yxy.r = XYZ.g; + + // x = X / (X + Y + Z) + // y = X / (X + Y + Z) + + float temp = dot(float3(1.0,1.0,1.0), XYZ.rgb); + + Yxy.gb = XYZ.rg / temp; + + return Yxy; + } + + float3 FromCIE(float3 Yxy) + { + float3 XYZ; + // Yxy -> XYZ conversion + XYZ.r = Yxy.r * Yxy.g / Yxy. b; + + // X = Y * x / y + XYZ.g = Yxy.r; + + // copy luminance Y + XYZ.b = Yxy.r * (1 - Yxy.g - Yxy.b) / Yxy.b; + + // Z = Y * (1-x-y) / y + + // XYZ -> RGB conversion + // The official XYZ to sRGB conversion matrix is (following ITU-R BT.709) + // 3.2410 -1.5374 -0.4986 + // -0.9692 1.8760 0.0416 + // 0.0556 -0.2040 1.0570 + + float3x3 XYZ2RGB = { 2.5651,-1.1665,-0.3986, -1.0217, 1.9777, 0.0439, 0.0753, -0.2543, 1.1892}; + + return mul(XYZ2RGB, XYZ); + } + + // NOTE/OPTIMIZATION: we're not going the extra CIE detour anymore, but + // scale with the OUT/IN luminance ratio,this is sooooo much faster + + float4 fragAdaptive(v2f i) : SV_Target + { + float avgLum = tex2D(_SmallTex, i.uv).x; + float4 color = tex2D (_MainTex, i.uv); + + float cieLum = max(0.000001, Luminance(color.rgb)); //ToCIE(color.rgb); + + float lumScaled = cieLum * _HdrParams.z / (0.001 + avgLum.x); + + lumScaled = (lumScaled * (1.0f + lumScaled / (_HdrParams.w)))/(1.0f + lumScaled); + + //cie.r = lumScaled; + + color.rgb = color.rgb * (lumScaled / cieLum); + + //color.rgb = FromCIE(cie); + return color; + } + + float4 fragAdaptiveAutoWhite(v2f i) : SV_Target + { + float2 avgLum = tex2D(_SmallTex, i.uv).xy; + float4 color = tex2D(_MainTex, i.uv); + + float cieLum = max(0.000001, Luminance(color.rgb)); //ToCIE(color.rgb); + + float lumScaled = cieLum * _HdrParams.z / (0.001 + avgLum.x); + + lumScaled = (lumScaled * (1.0f + lumScaled / (avgLum.y*avgLum.y)))/(1.0f + lumScaled); + + //cie.r = lumScaled; + + color.rgb = color.rgb * (lumScaled / cieLum); + + //color.rgb = FromCIE(cie); + return color; + } + + float4 fragCurve(v2f i) : SV_Target + { + float4 color = tex2D(_MainTex, i.uv); + float3 cie = ToCIE(color.rgb); + + // Remap to new lum range + float newLum = tex2D(_Curve, float2(cie.r * _RangeScale, 0.5)).r; + cie.r = newLum; + color.rgb = FromCIE(cie); + + return color; + } + + float4 fragHable(v2f i) : SV_Target + { + const float A = 0.15; + const float B = 0.50; + const float C = 0.10; + const float D = 0.20; + const float E = 0.02; + const float F = 0.30; + const float W = 11.2; + + float3 texColor = tex2D(_MainTex, i.uv).rgb; + texColor *= _ExposureAdjustment; + + float ExposureBias = 2.0; + float3 x = ExposureBias*texColor; + float3 curr = ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F; + + x = W; + float3 whiteScale = 1.0f/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F); + float3 color = curr*whiteScale; + + // float3 retColor = pow(color,1/2.2); // we have SRGB write enabled at this stage + + return float4(color, 1.0); + } + + // we are doing it on luminance here (better color preservation, but some other problems like very fast saturation) + float4 fragSimpleReinhard(v2f i) : SV_Target + { + float4 texColor = tex2D(_MainTex, i.uv); + float lum = Luminance(texColor.rgb); + float lumTm = lum * _ExposureAdjustment; + float scale = lumTm / (1+lumTm); + return float4(texColor.rgb * scale / lum, texColor.a); + } + + float4 fragOptimizedHejiDawson(v2f i) : SV_Target + { + float4 texColor = tex2D(_MainTex, i.uv ); + texColor *= _ExposureAdjustment; + float4 X = max(float4(0.0,0.0,0.0,0.0), texColor-0.004); + float4 retColor = (X*(6.2*X+.5))/(X*(6.2*X+1.7)+0.06); + return retColor*retColor; + } + + float4 fragPhotographic(v2f i) : SV_Target + { + float4 texColor = tex2D(_MainTex, i.uv); + return 1-exp2(-_ExposureAdjustment * texColor); + } + + float4 fragDownsample(v2f i) : SV_Target + { + float4 tapA = tex2D(_MainTex, i.uv + _MainTex_TexelSize * 0.5); + float4 tapB = tex2D(_MainTex, i.uv - _MainTex_TexelSize * 0.5); + float4 tapC = tex2D(_MainTex, i.uv + _MainTex_TexelSize * float2(0.5,-0.5)); + float4 tapD = tex2D(_MainTex, i.uv - _MainTex_TexelSize * float2(0.5,-0.5)); + + float4 average = (tapA+tapB+tapC+tapD)/4; + average.y = max(max(tapA.y,tapB.y), max(tapC.y,tapD.y)); + + return average; + } + + ENDCG + +Subshader { + // adaptive reinhhard apply + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAdaptive + ENDCG + } + + // 1 + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragLog + ENDCG + } + // 2 + Pass { + ZTest Always Cull Off ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragExp + ENDCG + } + // 3 + Pass { + ZTest Always Cull Off ZWrite Off + + Blend Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragExp + ENDCG + } + + // 4 user controllable tonemap curve + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragCurve + ENDCG + } + + // 5 tonemapping in uncharted + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragHable + ENDCG + } + + // 6 simple tonemapping based reinhard + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragSimpleReinhard + ENDCG + } + + // 7 OptimizedHejiDawson + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragOptimizedHejiDawson + ENDCG + } + + // 8 Photographic + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragPhotographic + ENDCG + } + + // 9 Downsample with auto white detection + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragDownsample + ENDCG + } + + // 10 adaptive reinhhard apply with auto white + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAdaptiveAutoWhite + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader.meta new file mode 100644 index 0000000..9a113eb --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/Tonemapper.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 003377fc2620a44939dadde6fe3f8190 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader new file mode 100644 index 0000000..ca49f6d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader @@ -0,0 +1,54 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Twirt Effect Shader" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform float4 _MainTex_TexelSize; +uniform float4 _CenterRadius; +uniform float4x4 _RotationMatrix; + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +v2f vert( appdata_img v ) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord - _CenterRadius.xy; + return o; +} + +float4 frag (v2f i) : SV_Target +{ + float2 offset = i.uv; + float2 distortedOffset = MultiplyUV (_RotationMatrix, offset.xy); + float2 tmp = offset / _CenterRadius.zw; + float t = min (1, length(tmp)); + + offset = lerp (distortedOffset, offset, t); + offset += _CenterRadius.xy; + + return tex2D(_MainTex, offset); +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader.meta new file mode 100644 index 0000000..5778cb0 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/TwirlEffect.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 641b781cad112c75d0008dfa8d76c639 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader new file mode 100644 index 0000000..a175bb4 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader @@ -0,0 +1,71 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Vignetting" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _VignetteTex ("Vignette", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uv2 : TEXCOORD1; + }; + + sampler2D _MainTex; + sampler2D _VignetteTex; + + half _Intensity; + half _Blur; + + float4 _MainTex_TexelSize; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + o.uv2 = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv2.y = 1.0 - o.uv2.y; + #endif + + return o; + } + + half4 frag(v2f i) : SV_Target { + half2 coords = i.uv; + half2 uv = i.uv; + + coords = (coords - 0.5) * 2.0; + half coordDot = dot (coords,coords); + half4 color = tex2D (_MainTex, uv); + + float mask = 1.0 - coordDot * _Intensity * 0.1; + + half4 colorBlur = tex2D (_VignetteTex, i.uv2); + color = lerp (color, colorBlur, saturate (_Blur * coordDot)); + + return color * mask; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } +} + +Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader.meta new file mode 100644 index 0000000..d23632d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VignettingShader.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 627943dc7a9a74286b70a4f694a0acd5 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader new file mode 100644 index 0000000..c291d4e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader @@ -0,0 +1,67 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Twist Effect" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader +{ + Pass + { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag + +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; + +uniform float4 _MainTex_ST; + +uniform float4 _MainTex_TexelSize; +uniform float _Angle; +uniform float4 _CenterRadius; + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uvOrig : TEXCOORD1; +}; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + float2 uv = v.texcoord.xy - _CenterRadius.xy; + o.uv = TRANSFORM_TEX(uv, _MainTex); //MultiplyUV (UNITY_MATRIX_TEXTURE0, uv); + o.uvOrig = uv; + return o; +} + +float4 frag (v2f i) : SV_Target +{ + float2 offset = i.uvOrig; + float angle = 1.0 - length(offset / _CenterRadius.zw); + angle = max (0, angle); + angle = angle * angle * _Angle; + float cosLength, sinLength; + sincos (angle, sinLength, cosLength); + + float2 uv; + uv.x = cosLength * offset[0] - sinLength * offset[1]; + uv.y = sinLength * offset[0] + cosLength * offset[1]; + uv += _CenterRadius.xy; + + return tex2D(_MainTex, uv); +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader.meta new file mode 100644 index 0000000..62f5a71 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/VortexEffect.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 708b781cad112c75d0008dfa8d76c639 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing.meta new file mode 100644 index 0000000..7bcca55 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 6d55b5e91b95c41739cdf4f804dd383d +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader new file mode 100644 index 0000000..8a149e4 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader @@ -0,0 +1,346 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +// +// modified and adapted DLAA code based on Dmitry Andreev's +// Directionally Localized Anti-Aliasing (DLAA) +// +// as seen in "The Force Unleashed 2" +// + +Shader "Hidden/DLAA" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +CGINCLUDE + + #include "UnityCG.cginc" + + uniform sampler2D _MainTex; + uniform float4 _MainTex_TexelSize; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + #define LD( o, dx, dy ) o = tex2D( _MainTex, texCoord + float2( dx, dy ) * _MainTex_TexelSize.xy ); + + float GetIntensity( float3 col ) + { + return dot( col, float3( 0.33f, 0.33f, 0.33f ) ); + } + + float4 highPassPre( float2 texCoord ) + { + LD(float4 sCenter, 0.0,0.0) + LD(float4 sUpLeft, -1.0,-1.0) + LD(float4 sUpRight, 1.0,-1.0) + LD(float4 sDownLeft, -1.0,1.0) + LD(float4 sDownRight, 1.0,1.0) + + float4 diff = 4.0f * abs( (sUpLeft + sUpRight + sDownLeft + sDownRight) - 4.0f * sCenter ); + float edgeMask = GetIntensity(diff.xyz); + + return float4(sCenter.rgb, edgeMask); + } + + // Softer (5-pixel wide high-pass) + /* + void HighPassEdgeHV (out float4 edge_h, out float4 edge_v, float4 center, float4 w_h, float4 w_v, float2 texCoord) { + edge_h = abs( w_h - 4.0f * center ) / 4.0f; + edge_v = abs( w_v - 4.0f * center ) / 4.0f; + } + + // Sharper (3-pixel wide high-pass) + void EdgeHV (out float4 edge_h, out float4 edge_v, float4 center, float2 texCoord) { + float4 left, right, top, bottom; + + LD( left, -1, 0 ) + LD( right, 1, 0 ) + LD( top, 0, -1 ) + LD( bottom, 0, 1 ) + + edge_h = abs( left + right - 2.0f * center ) / 2.0f; + edge_v = abs( top + bottom - 2.0f * center ) / 2.0f; + } + */ + + float4 edgeDetectAndBlur( float2 texCoord ) + { + float lambda = 3.0f; + float epsilon = 0.1f; + + // + // Short Edges + // + + float4 center, left_01, right_01, top_01, bottom_01; + + // sample 5x5 cross + LD( center, 0, 0 ) + LD( left_01, -1.5, 0 ) + LD( right_01, 1.5, 0 ) + LD( top_01, 0,-1.5 ) + LD( bottom_01, 0, 1.5 ) + + + float4 w_h = 2.0f * ( left_01 + right_01 ); + float4 w_v = 2.0f * ( top_01 + bottom_01 ); + + + // Softer (5-pixel wide high-pass) + float4 edge_h = abs( w_h - 4.0f * center ) / 4.0f; + float4 edge_v = abs( w_v - 4.0f * center ) / 4.0f; + + + float4 blurred_h = ( w_h + 2.0f * center ) / 6.0f; + float4 blurred_v = ( w_v + 2.0f * center ) / 6.0f; + + float edge_h_lum = GetIntensity( edge_h.xyz ); + float edge_v_lum = GetIntensity( edge_v.xyz ); + float blurred_h_lum = GetIntensity( blurred_h.xyz ); + float blurred_v_lum = GetIntensity( blurred_v.xyz ); + + float edge_mask_h = saturate( ( lambda * edge_h_lum - epsilon ) / blurred_v_lum ); + float edge_mask_v = saturate( ( lambda * edge_v_lum - epsilon ) / blurred_h_lum ); + + float4 clr = center; + clr = lerp( clr, blurred_h, edge_mask_v ); + clr = lerp( clr, blurred_v, edge_mask_h ); // blurrier version + + // + // Long Edges + // + + float4 h0, h1, h2, h3, h4, h5, h6, h7; + float4 v0, v1, v2, v3, v4, v5, v6, v7; + + // sample 16x16 cross (sparse-sample on X360, incremental kernel update on SPUs) + LD( h0, 1.5, 0 ) LD( h1, 3.5, 0 ) LD( h2, 5.5, 0 ) LD( h3, 7.5, 0 ) LD( h4, -1.5,0 ) LD( h5, -3.5,0 ) LD( h6, -5.5,0 ) LD( h7, -7.5,0 ) + LD( v0, 0, 1.5 ) LD( v1, 0, 3.5 ) LD( v2, 0, 5.5 ) LD( v3, 0, 7.5 ) LD( v4, 0,-1.5 ) LD( v5, 0,-3.5 ) LD( v6, 0,-5.5 ) LD( v7, 0,-7.5 ) + + float long_edge_mask_h = ( h0.a + h1.a + h2.a + h3.a + h4.a + h5.a + h6.a + h7.a ) / 8.0f; + float long_edge_mask_v = ( v0.a + v1.a + v2.a + v3.a + v4.a + v5.a + v6.a + v7.a ) / 8.0f; + + long_edge_mask_h = saturate( long_edge_mask_h * 2.0f - 1.0f ); + long_edge_mask_v = saturate( long_edge_mask_v * 2.0f - 1.0f ); + + float4 left, right, top, bottom; + + LD( left, -1, 0 ) + LD( right, 1, 0 ) + LD( top, 0, -1 ) + LD( bottom, 0, 1 ) + + if ( long_edge_mask_h > 0 || long_edge_mask_v > 0 ) // faster but less resistant to noise (TFU2 X360) + //if ( abs( long_edge_mask_h - long_edge_mask_v ) > 0.2f ) // resistant to noise (TFU2 SPUs) + { + float4 long_blurred_h = ( h0 + h1 + h2 + h3 + h4 + h5 + h6 + h7 ) / 8.0f; + float4 long_blurred_v = ( v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 ) / 8.0f; + + float lb_h_lum = GetIntensity( long_blurred_h.xyz ); + float lb_v_lum = GetIntensity( long_blurred_v.xyz ); + + float center_lum = GetIntensity( center.xyz ); + float left_lum = GetIntensity( left.xyz ); + float right_lum = GetIntensity( right.xyz ); + float top_lum = GetIntensity( top.xyz ); + float bottom_lum = GetIntensity( bottom.xyz ); + + float4 clr_v = center; + float4 clr_h = center; + + // we had to hack this because DIV by 0 gives some artefacts on different platforms + float hx = center_lum == top_lum ? 0.0 : saturate( 0 + ( lb_h_lum - top_lum ) / ( center_lum - top_lum ) ); + float hy = center_lum == bottom_lum ? 0.0 : saturate( 1 + ( lb_h_lum - center_lum ) / ( center_lum - bottom_lum ) ); + float vx = center_lum == left_lum ? 0.0 : saturate( 0 + ( lb_v_lum - left_lum ) / ( center_lum - left_lum ) ); + float vy = center_lum == right_lum ? 0.0 : saturate( 1 + ( lb_v_lum - center_lum ) / ( center_lum - right_lum ) ); + + float4 vhxy = float4( vx, vy, hx, hy ); + //vhxy = vhxy == float4( 0, 0, 0, 0 ) ? float4( 1, 1, 1, 1 ) : vhxy; + + clr_v = lerp( left , clr_v, vhxy.x ); + clr_v = lerp( right , clr_v, vhxy.y ); + clr_h = lerp( top , clr_h, vhxy.z ); + clr_h = lerp( bottom, clr_h, vhxy.w ); + + clr = lerp( clr, clr_v, long_edge_mask_v ); + clr = lerp( clr, clr_h, long_edge_mask_h ); + } + + return clr; + } + + float4 edgeDetectAndBlurSharper(float2 texCoord) + { + float lambda = 3.0f; + float epsilon = 0.1f; + + // + // Short Edges + // + + float4 center, left_01, right_01, top_01, bottom_01; + + // sample 5x5 cross + LD( center, 0, 0 ) + LD( left_01, -1.5, 0 ) + LD( right_01, 1.5, 0 ) + LD( top_01, 0,-1.5 ) + LD( bottom_01, 0, 1.5 ) + + + float4 w_h = 2.0f * ( left_01 + right_01 ); + float4 w_v = 2.0f * ( top_01 + bottom_01 ); + + // Sharper (3-pixel wide high-pass) + float4 left, right, top, bottom; + + LD( left, -1, 0 ) + LD( right, 1, 0 ) + LD( top, 0, -1 ) + LD( bottom, 0, 1 ) + + float4 edge_h = abs( left + right - 2.0f * center ) / 2.0f; + float4 edge_v = abs( top + bottom - 2.0f * center ) / 2.0f; + + float4 blurred_h = ( w_h + 2.0f * center ) / 6.0f; + float4 blurred_v = ( w_v + 2.0f * center ) / 6.0f; + + float edge_h_lum = GetIntensity( edge_h.xyz ); + float edge_v_lum = GetIntensity( edge_v.xyz ); + float blurred_h_lum = GetIntensity( blurred_h.xyz ); + float blurred_v_lum = GetIntensity( blurred_v.xyz ); + + float edge_mask_h = saturate( ( lambda * edge_h_lum - epsilon ) / blurred_v_lum ); + float edge_mask_v = saturate( ( lambda * edge_v_lum - epsilon ) / blurred_h_lum ); + + float4 clr = center; + clr = lerp( clr, blurred_h, edge_mask_v ); + clr = lerp( clr, blurred_v, edge_mask_h * 0.5f ); // TFU2 uses 1.0f instead of 0.5f + + // + // Long Edges + // + + float4 h0, h1, h2, h3, h4, h5, h6, h7; + float4 v0, v1, v2, v3, v4, v5, v6, v7; + + // sample 16x16 cross (sparse-sample on X360, incremental kernel update on SPUs) + LD( h0, 1.5, 0 ) LD( h1, 3.5, 0 ) LD( h2, 5.5, 0 ) LD( h3, 7.5, 0 ) LD( h4, -1.5,0 ) LD( h5, -3.5,0 ) LD( h6, -5.5,0 ) LD( h7, -7.5,0 ) + LD( v0, 0, 1.5 ) LD( v1, 0, 3.5 ) LD( v2, 0, 5.5 ) LD( v3, 0, 7.5 ) LD( v4, 0,-1.5 ) LD( v5, 0,-3.5 ) LD( v6, 0,-5.5 ) LD( v7, 0,-7.5 ) + + float long_edge_mask_h = ( h0.a + h1.a + h2.a + h3.a + h4.a + h5.a + h6.a + h7.a ) / 8.0f; + float long_edge_mask_v = ( v0.a + v1.a + v2.a + v3.a + v4.a + v5.a + v6.a + v7.a ) / 8.0f; + + long_edge_mask_h = saturate( long_edge_mask_h * 2.0f - 1.0f ); + long_edge_mask_v = saturate( long_edge_mask_v * 2.0f - 1.0f ); + + //if ( long_edge_mask_h > 0 || long_edge_mask_v > 0 ) // faster but less resistant to noise (TFU2 X360) + if ( abs( long_edge_mask_h - long_edge_mask_v ) > 0.2f ) // resistant to noise (TFU2 SPUs) + { + float4 long_blurred_h = ( h0 + h1 + h2 + h3 + h4 + h5 + h6 + h7 ) / 8.0f; + float4 long_blurred_v = ( v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 ) / 8.0f; + + float lb_h_lum = GetIntensity( long_blurred_h.xyz ); + float lb_v_lum = GetIntensity( long_blurred_v.xyz ); + + float center_lum = GetIntensity( center.xyz ); + float left_lum = GetIntensity( left.xyz ); + float right_lum = GetIntensity( right.xyz ); + float top_lum = GetIntensity( top.xyz ); + float bottom_lum = GetIntensity( bottom.xyz ); + + float4 clr_v = center; + float4 clr_h = center; + + // we had to hack this because DIV by 0 gives some artefacts on different platforms + float hx = center_lum == top_lum ? 0.0 : saturate( 0 + ( lb_h_lum - top_lum ) / ( center_lum - top_lum ) ); + float hy = center_lum == bottom_lum ? 0.0 : saturate( 1 + ( lb_h_lum - center_lum ) / ( center_lum - bottom_lum ) ); + float vx = center_lum == left_lum ? 0.0 : saturate( 0 + ( lb_v_lum - left_lum ) / ( center_lum - left_lum ) ); + float vy = center_lum == right_lum ? 0.0 : saturate( 1 + ( lb_v_lum - center_lum ) / ( center_lum - right_lum ) ); + + float4 vhxy = float4( vx, vy, hx, hy ); + //vhxy = vhxy == float4( 0, 0, 0, 0 ) ? float4( 1, 1, 1, 1 ) : vhxy; + + clr_v = lerp( left , clr_v, vhxy.x ); + clr_v = lerp( right , clr_v, vhxy.y ); + clr_h = lerp( top , clr_h, vhxy.z ); + clr_h = lerp( bottom, clr_h, vhxy.w ); + + clr = lerp( clr, clr_v, long_edge_mask_v ); + clr = lerp( clr, clr_h, long_edge_mask_h ); + } + + return clr; + } + + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + float2 uv = v.texcoord.xy; + o.uv.xy = uv; + + return o; + } + + half4 fragFirst (v2f i) : SV_Target { + return highPassPre (i.uv); + } + + half4 fragSecond (v2f i) : SV_Target { + return edgeDetectAndBlur( i.uv ); + } + + half4 fragThird (v2f i) : SV_Target { + return edgeDetectAndBlurSharper( i.uv ); + } + +ENDCG + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragFirst + #pragma exclude_renderers d3d11_9x + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragSecond + #pragma target 3.0 + #pragma exclude_renderers d3d11_9x + + ENDCG + } + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragThird + #pragma target 3.0 + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader.meta new file mode 100644 index 0000000..7f15211 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/DLAA.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 017ca72b9e8a749058d13ebd527e98fa +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader new file mode 100644 index 0000000..600ad85 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader @@ -0,0 +1,189 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/FXAA II" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM + +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" +#pragma target 3.0 + +#define FXAA_HLSL_3 1 + +/*============================================================================ + + FXAA v2 CONSOLE by TIMOTHY LOTTES @ NVIDIA + +============================================================================*/ + +/*============================================================================ + API PORTING +============================================================================*/ +#ifndef FXAA_GLSL_120 + #define FXAA_GLSL_120 0 +#endif +#ifndef FXAA_GLSL_130 + #define FXAA_GLSL_130 0 +#endif +#ifndef FXAA_HLSL_3 + #define FXAA_HLSL_3 0 +#endif +#ifndef FXAA_HLSL_4 + #define FXAA_HLSL_4 0 +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_120 + // Requires, + // #version 120 + // #extension GL_EXT_gpu_shader4 : enable + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaSat(a) clamp((a), 0.0, 1.0) + #define FxaaTex sampler2D + #define FxaaTexLod0(t, p) texture2DLod(t, p, 0.0) + #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o) +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_130 + // Requires "#version 130" or better + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaSat(a) clamp((a), 0.0, 1.0) + #define FxaaTex sampler2D + #define FxaaTexLod0(t, p) textureLod(t, p, 0.0) + #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o) +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_3 + #define int2 float2 + #define FxaaInt2 float2 + #define FxaaFloat2 float2 + #define FxaaSat(a) saturate((a)) + #define FxaaTex sampler2D + #define FxaaTexLod0(t, p) tex2Dlod(t, float4(p, 0.0, 0.0)) + #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0)) +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_4 + #define FxaaInt2 int2 + #define FxaaFloat2 float2 + #define FxaaSat(a) saturate((a)) + struct FxaaTex { SamplerState smpl; Texture2D tex; }; + #define FxaaTexLod0(t, p) t.tex.SampleLevel(t.smpl, p, 0.0) + #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o) +#endif + + +/*============================================================================ + + VERTEX SHADER + +============================================================================*/ +float4 FxaaVertexShader( +float2 pos, // Both x and y range {-1.0 to 1.0 across screen}. +float2 rcpFrame) { // {1.0/frameWidth, 1.0/frameHeight} +/*--------------------------------------------------------------------------*/ + #define FXAA_SUBPIX_SHIFT (1.0/4.0) +/*--------------------------------------------------------------------------*/ + float4 posPos; + posPos.xy = (pos.xy * 0.5) + 0.5; + posPos.zw = posPos.xy - (rcpFrame * (0.5 + FXAA_SUBPIX_SHIFT)); + return posPos; } + +/*============================================================================ + + PIXEL SHADER + +============================================================================*/ +float3 FxaaPixelShader( +float4 posPos, // Output of FxaaVertexShader interpolated across screen. +FxaaTex tex, // Input texture. +float2 rcpFrame) { // Constant {1.0/frameWidth, 1.0/frameHeight}. +/*--------------------------------------------------------------------------*/ + #define FXAA_REDUCE_MIN (1.0/128.0) + #define FXAA_REDUCE_MUL (1.0/8.0) + #define FXAA_SPAN_MAX 8.0 +/*--------------------------------------------------------------------------*/ + float3 rgbNW = FxaaTexLod0(tex, posPos.zw).xyz; + float3 rgbNE = FxaaTexOff(tex, posPos.zw, FxaaInt2(1,0), rcpFrame.xy).xyz; + float3 rgbSW = FxaaTexOff(tex, posPos.zw, FxaaInt2(0,1), rcpFrame.xy).xyz; + float3 rgbSE = FxaaTexOff(tex, posPos.zw, FxaaInt2(1,1), rcpFrame.xy).xyz; + float3 rgbM = FxaaTexLod0(tex, posPos.xy).xyz; +/*--------------------------------------------------------------------------*/ + float3 luma = float3(0.299, 0.587, 0.114); + float lumaNW = dot(rgbNW, luma); + float lumaNE = dot(rgbNE, luma); + float lumaSW = dot(rgbSW, luma); + float lumaSE = dot(rgbSE, luma); + float lumaM = dot(rgbM, luma); +/*--------------------------------------------------------------------------*/ + float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); + float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); +/*--------------------------------------------------------------------------*/ + float2 dir; + dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); + dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); +/*--------------------------------------------------------------------------*/ + float dirReduce = max( + (lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), + FXAA_REDUCE_MIN); + float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce); + dir = min(FxaaFloat2( FXAA_SPAN_MAX, FXAA_SPAN_MAX), + max(FxaaFloat2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), + dir * rcpDirMin)) * rcpFrame.xy; +/*--------------------------------------------------------------------------*/ + float3 rgbA = (1.0/2.0) * ( + FxaaTexLod0(tex, posPos.xy + dir * (1.0/3.0 - 0.5)).xyz + + FxaaTexLod0(tex, posPos.xy + dir * (2.0/3.0 - 0.5)).xyz); + float3 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * ( + FxaaTexLod0(tex, posPos.xy + dir * (0.0/3.0 - 0.5)).xyz + + FxaaTexLod0(tex, posPos.xy + dir * (3.0/3.0 - 0.5)).xyz); + float lumaB = dot(rgbB, luma); + if((lumaB < lumaMin) || (lumaB > lumaMax)) return rgbA; + return rgbB; } + + +struct v2f { + float4 pos : SV_POSITION; + float4 uv : TEXCOORD0; +}; + +float4 _MainTex_TexelSize; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = FxaaVertexShader (v.texcoord.xy*2-1, _MainTex_TexelSize.xy); + return o; +} + +sampler2D _MainTex; + +float4 frag (v2f i) : SV_Target +{ + return float4(FxaaPixelShader(i.uv, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); +} + +ENDCG + } +} + +Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader.meta new file mode 100644 index 0000000..bb712ed --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA2.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: cd5b323dcc592457790ff18b528f5e67 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader new file mode 100644 index 0000000..c00f526 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader @@ -0,0 +1,174 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + + +/*============================================================================ + +source taken from + + + NVIDIA FXAA 3.11 by TIMOTHY LOTTES + + +and adapted and ported to Unity by Unity Technologies + + +------------------------------------------------------------------------------ +COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED. +------------------------------------------------------------------------------ +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED +*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA +OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR +CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR +LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, +OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE +THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +============================================================================*/ + + +Shader "Hidden/FXAA III (Console)" { + Properties { + _MainTex ("-", 2D) = "white" {} + _EdgeThresholdMin ("Edge threshold min",float) = 0.125 + _EdgeThreshold("Edge Threshold", float) = 0.25 + _EdgeSharpness("Edge sharpness",float) = 4.0 + } + SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + + #include "UnityCG.cginc" + + uniform sampler2D _MainTex; + uniform half _EdgeThresholdMin; + uniform half _EdgeThreshold; + uniform half _EdgeSharpness; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 interpolatorA : TEXCOORD1; + float4 interpolatorB : TEXCOORD2; + float4 interpolatorC : TEXCOORD3; + }; + + float4 _MainTex_TexelSize; + + v2f vert (appdata_img v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = v.texcoord.xy; + + float4 extents; + float2 offset = ( _MainTex_TexelSize.xy ) * 0.5f; + extents.xy = v.texcoord.xy - offset; + extents.zw = v.texcoord.xy + offset; + + float4 rcpSize; + rcpSize.xy = -_MainTex_TexelSize.xy * 0.5f; + rcpSize.zw = _MainTex_TexelSize.xy * 0.5f; +#if defined (SHADER_API_PSP2) + //cg compiler linker bug workaround + float almostzero = v.texcoord.x*0.000001f; + rcpSize.x += almostzero; +#endif + o.interpolatorA = extents; + o.interpolatorB = rcpSize; + o.interpolatorC = rcpSize; + + o.interpolatorC.xy *= 4.0; + o.interpolatorC.zw *= 4.0; + + return o; + } + +// hacky support for NaCl +#if defined(SHADER_API_GLES) && defined(SHADER_API_DESKTOP) + #define FxaaTexTop(t, p) tex2D(t, p) +#else + #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0)) +#endif + + inline half TexLuminance( float2 uv ) + { + return Luminance(FxaaTexTop(_MainTex, uv).rgb); + } + + half3 FxaaPixelShader(float2 pos, float4 extents, float4 rcpSize, float4 rcpSize2) + { + half lumaNw = TexLuminance(extents.xy); + half lumaSw = TexLuminance(extents.xw); + half lumaNe = TexLuminance(extents.zy); + half lumaSe = TexLuminance(extents.zw); + + half3 centre = FxaaTexTop(_MainTex, pos).rgb; + half lumaCentre = Luminance(centre); + + half lumaMaxNwSw = max( lumaNw , lumaSw ); + lumaNe += 1.0/384.0; + half lumaMinNwSw = min( lumaNw , lumaSw ); + + half lumaMaxNeSe = max( lumaNe , lumaSe ); + half lumaMinNeSe = min( lumaNe , lumaSe ); + + half lumaMax = max( lumaMaxNeSe, lumaMaxNwSw ); + half lumaMin = min( lumaMinNeSe, lumaMinNwSw ); + + half lumaMaxScaled = lumaMax * _EdgeThreshold; + + half lumaMinCentre = min( lumaMin , lumaCentre ); + half lumaMaxScaledClamped = max( _EdgeThresholdMin , lumaMaxScaled ); + half lumaMaxCentre = max( lumaMax , lumaCentre ); + half dirSWMinusNE = lumaSw - lumaNe; + half lumaMaxCMinusMinC = lumaMaxCentre - lumaMinCentre; + half dirSEMinusNW = lumaSe - lumaNw; + + if(lumaMaxCMinusMinC < lumaMaxScaledClamped) + return centre; + + half2 dir; + dir.x = dirSWMinusNE + dirSEMinusNW; + dir.y = dirSWMinusNE - dirSEMinusNW; + + dir = normalize(dir); + half3 col1 = FxaaTexTop(_MainTex, pos.xy - dir * rcpSize.zw).rgb; + half3 col2 = FxaaTexTop(_MainTex, pos.xy + dir * rcpSize.zw).rgb; + + half dirAbsMinTimesC = min( abs( dir.x ) , abs( dir.y ) ) * _EdgeSharpness; + dir = clamp(dir.xy/dirAbsMinTimesC, -2.0, 2.0); + + half3 col3 = FxaaTexTop(_MainTex, pos.xy - dir * rcpSize2.zw).rgb; + half3 col4 = FxaaTexTop(_MainTex, pos.xy + dir * rcpSize2.zw).rgb; + + half3 rgbyA = col1 + col2; + half3 rgbyB = ((col3 + col4) * 0.25) + (rgbyA * 0.25); + + if((Luminance(rgbyA) < lumaMin) || (Luminance(rgbyB) > lumaMax)) + return rgbyA * 0.5; + else + return rgbyB; + } + + half4 frag (v2f i) : SV_Target + { + half3 color = FxaaPixelShader(i.uv, i.interpolatorA, i.interpolatorB, i.interpolatorC); + return half4(color, 1.0); + } + + ENDCG + } + } + FallBack Off +} + diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader.meta new file mode 100644 index 0000000..c6c6ecd --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAA3Console.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: c547503fff0e8482ea5793727057041c +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader new file mode 100644 index 0000000..07afa03 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader @@ -0,0 +1,829 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/FXAA Preset 2" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" +#pragma target 3.0 + +// doesn't make sense to have this on consoles, it'll fallback to FXAA2 +#pragma exclude_renderers xbox360 ps3 gles + + +#define FXAA_HLSL_3 1 +#define FXAA_PRESET 2 + + +// Copyright (c) 2010 NVIDIA Corporation. All rights reserved. +// +// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED +// *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS +// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS +// BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES +// WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, +// BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) +// ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS +// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +/*============================================================================ + + FXAA + +============================================================================*/ + +/*============================================================================ + API PORTING +============================================================================*/ +#ifndef FXAA_GLSL_120 + #define FXAA_GLSL_120 0 +#endif +#ifndef FXAA_GLSL_130 + #define FXAA_GLSL_130 0 +#endif +#ifndef FXAA_HLSL_3 + #define FXAA_HLSL_3 0 +#endif +#ifndef FXAA_HLSL_4 + #define FXAA_HLSL_4 0 +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_120 + // Requires, + // #version 120 + // #extension GL_EXT_gpu_shader4 : enable + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaBool3 bvec3 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaFloat3 vec3 + #define FxaaFloat4 vec4 + #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) mix((f), (t), (b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_130 + // Requires "#version 130" or better + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaBool3 bvec3 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaFloat3 vec3 + #define FxaaFloat4 vec4 + #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) mix((f), (t), (b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_3 + #define int2 float2 + #define FxaaInt2 float2 + #define FxaaFloat2 float2 + #define FxaaFloat3 float3 + #define FxaaFloat4 float4 + #define FxaaBool2Float(a) (a) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_4 + #define FxaaInt2 int2 + #define FxaaFloat2 float2 + #define FxaaFloat3 float3 + #define FxaaFloat4 float4 + #define FxaaBool2Float(a) (a) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) + struct FxaaTex { SamplerState smpl; Texture2D tex; }; +#endif +/*--------------------------------------------------------------------------*/ +#define FxaaToFloat3(a) FxaaFloat3((a), (a), (a)) +/*--------------------------------------------------------------------------*/ +float4 FxaaTexLod0(FxaaTex tex, float2 pos) { + #if FXAA_GLSL_120 + return texture2DLod(tex, pos.xy, 0.0); + #endif + #if FXAA_GLSL_130 + return textureLod(tex, pos.xy, 0.0); + #endif + #if FXAA_HLSL_3 + return tex2Dlod(tex, float4(pos.xy, 0.0, 0.0)); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0); + #endif +} +/*--------------------------------------------------------------------------*/ +float4 FxaaTexGrad(FxaaTex tex, float2 pos, float2 grad) { + #if FXAA_GLSL_120 + return texture2DGrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_GLSL_130 + return textureGrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_HLSL_3 + return tex2Dgrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleGrad(tex.smpl, pos.xy, grad, grad); + #endif +} +/*--------------------------------------------------------------------------*/ +float4 FxaaTexOff(FxaaTex tex, float2 pos, int2 off, float2 rcpFrame) { + #if FXAA_GLSL_120 + return texture2DLodOffset(tex, pos.xy, 0.0, off.xy); + #endif + #if FXAA_GLSL_130 + return textureLodOffset(tex, pos.xy, 0.0, off.xy); + #endif + #if FXAA_HLSL_3 + return tex2Dlod(tex, float4(pos.xy + (off * rcpFrame), 0, 0)); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0, off.xy); + #endif +} + +/*============================================================================ + SRGB KNOBS +------------------------------------------------------------------------------ +FXAA_SRGB_ROP - Set to 1 when applying FXAA to an sRGB back buffer (DX10/11). + This will do the sRGB to linear transform, + as ROP will expect linear color from this shader, + and this shader works in non-linear color. +============================================================================*/ +#define FXAA_SRGB_ROP 0 + +/*============================================================================ + DEBUG KNOBS +------------------------------------------------------------------------------ +All debug knobs draw FXAA-untouched pixels in FXAA computed luma (monochrome). + +FXAA_DEBUG_PASSTHROUGH - Red for pixels which are filtered by FXAA with a + yellow tint on sub-pixel aliasing filtered by FXAA. +FXAA_DEBUG_HORZVERT - Blue for horizontal edges, gold for vertical edges. +FXAA_DEBUG_PAIR - Blue/green for the 2 pixel pair choice. +FXAA_DEBUG_NEGPOS - Red/blue for which side of center of span. +FXAA_DEBUG_OFFSET - Red/blue for -/+ x, gold/skyblue for -/+ y. +============================================================================*/ +#ifndef FXAA_DEBUG_PASSTHROUGH + #define FXAA_DEBUG_PASSTHROUGH 0 +#endif +#ifndef FXAA_DEBUG_HORZVERT + #define FXAA_DEBUG_HORZVERT 0 +#endif +#ifndef FXAA_DEBUG_PAIR + #define FXAA_DEBUG_PAIR 0 +#endif +#ifndef FXAA_DEBUG_NEGPOS + #define FXAA_DEBUG_NEGPOS 0 +#endif +#ifndef FXAA_DEBUG_OFFSET + #define FXAA_DEBUG_OFFSET 0 +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_DEBUG_PASSTHROUGH || FXAA_DEBUG_HORZVERT || FXAA_DEBUG_PAIR + #define FXAA_DEBUG 1 +#endif +#if FXAA_DEBUG_NEGPOS || FXAA_DEBUG_OFFSET + #define FXAA_DEBUG 1 +#endif +#ifndef FXAA_DEBUG + #define FXAA_DEBUG 0 +#endif + +/*============================================================================ + COMPILE-IN KNOBS +------------------------------------------------------------------------------ +FXAA_PRESET - Choose compile-in knob preset 0-5. +------------------------------------------------------------------------------ +FXAA_EDGE_THRESHOLD - The minimum amount of local contrast required + to apply algorithm. + 1.0/3.0 - too little + 1.0/4.0 - good start + 1.0/8.0 - applies to more edges + 1.0/16.0 - overkill +------------------------------------------------------------------------------ +FXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks. + Perf optimization. + 1.0/32.0 - visible limit (smaller isn't visible) + 1.0/16.0 - good compromise + 1.0/12.0 - upper limit (seeing artifacts) +------------------------------------------------------------------------------ +FXAA_SEARCH_STEPS - Maximum number of search steps for end of span. +------------------------------------------------------------------------------ +FXAA_SEARCH_ACCELERATION - How much to accelerate search, + 1 - no acceleration + 2 - skip by 2 pixels + 3 - skip by 3 pixels + 4 - skip by 4 pixels +------------------------------------------------------------------------------ +FXAA_SEARCH_THRESHOLD - Controls when to stop searching. + 1.0/4.0 - seems to be the best quality wise +------------------------------------------------------------------------------ +FXAA_SUBPIX_FASTER - Turn on lower quality but faster subpix path. + Not recomended, but used in preset 0. +------------------------------------------------------------------------------ +FXAA_SUBPIX - Toggle subpix filtering. + 0 - turn off + 1 - turn on + 2 - turn on full (ignores FXAA_SUBPIX_TRIM and CAP) +------------------------------------------------------------------------------ +FXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal. + 1.0/2.0 - low removal + 1.0/3.0 - medium removal + 1.0/4.0 - default removal + 1.0/8.0 - high removal + 0.0 - complete removal +------------------------------------------------------------------------------ +FXAA_SUBPIX_CAP - Insures fine detail is not completely removed. + This is important for the transition of sub-pixel detail, + like fences and wires. + 3.0/4.0 - default (medium amount of filtering) + 7.0/8.0 - high amount of filtering + 1.0 - no capping of sub-pixel aliasing removal +============================================================================*/ +#ifndef FXAA_PRESET + #define FXAA_PRESET 3 +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 0) + #define FXAA_EDGE_THRESHOLD (1.0/4.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/12.0) + #define FXAA_SEARCH_STEPS 2 + #define FXAA_SEARCH_ACCELERATION 4 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 1 + #define FXAA_SUBPIX_CAP (2.0/3.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 1) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/16.0) + #define FXAA_SEARCH_STEPS 4 + #define FXAA_SEARCH_ACCELERATION 3 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 2) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 8 + #define FXAA_SEARCH_ACCELERATION 2 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 3) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 16 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 4) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 24 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 5) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 32 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM)) + +/*============================================================================ + HELPERS +============================================================================*/ +// Return the luma, the estimation of luminance from rgb inputs. +// This approximates luma using one FMA instruction, +// skipping normalization and tossing out blue. +// FxaaLuma() will range 0.0 to 2.963210702. +float FxaaLuma(float3 rgb) { + return rgb.y * (0.587/0.299) + rgb.x; } +/*--------------------------------------------------------------------------*/ +float3 FxaaLerp3(float3 a, float3 b, float amountOfA) { + return (FxaaToFloat3(-amountOfA) * b) + + ((a * FxaaToFloat3(amountOfA)) + b); } +/*--------------------------------------------------------------------------*/ +// Support any extra filtering before returning color. +float3 FxaaFilterReturn(float3 rgb) { + #if FXAA_SRGB_ROP + // Do sRGB encoded value to linear conversion. + return FxaaSel3( + rgb * FxaaToFloat3(1.0/12.92), + FxaaPow3( + rgb * FxaaToFloat3(1.0/1.055) + FxaaToFloat3(0.055/1.055), + FxaaToFloat3(2.4)), + rgb > FxaaToFloat3(0.04045)); + #else + return rgb; + #endif +} + +/*============================================================================ + VERTEX SHADER +============================================================================*/ +float2 FxaaVertexShader( +// Both x and y range {-1.0 to 1.0 across screen}. +float2 inPos) { + float2 pos; + pos.xy = (inPos.xy * FxaaFloat2(0.5, 0.5)) + FxaaFloat2(0.5, 0.5); + return pos; } + +/*============================================================================ + + PIXEL SHADER + +============================================================================*/ +float3 FxaaPixelShader( +// Output of FxaaVertexShader interpolated across screen. +// xy -> actual texture position {0.0 to 1.0} +float2 pos, +// Input texture. +FxaaTex tex, +// RCPFRAME SHOULD PIXEL SHADER CONSTANTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// {1.0/frameWidth, 1.0/frameHeight} +float2 rcpFrame) { + +/*---------------------------------------------------------------------------- + EARLY EXIT IF LOCAL CONTRAST BELOW EDGE DETECT LIMIT +------------------------------------------------------------------------------ +Majority of pixels of a typical image do not require filtering, +often pixels are grouped into blocks which could benefit from early exit +right at the beginning of the algorithm. +Given the following neighborhood, + + N + W M E + S + +If the difference in local maximum and minimum luma (contrast "range") +is lower than a threshold proportional to the maximum local luma ("rangeMax"), +then the shader early exits (no visible aliasing). +This threshold is clamped at a minimum value ("FXAA_EDGE_THRESHOLD_MIN") +to avoid processing in really dark areas. +----------------------------------------------------------------------------*/ + float3 rgbN = FxaaTexOff(tex, pos.xy, FxaaInt2( 0,-1), rcpFrame).xyz; + float3 rgbW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 0), rcpFrame).xyz; + float3 rgbM = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 0), rcpFrame).xyz; + float3 rgbE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 0), rcpFrame).xyz; + float3 rgbS = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 1), rcpFrame).xyz; + float lumaN = FxaaLuma(rgbN); + float lumaW = FxaaLuma(rgbW); + float lumaM = FxaaLuma(rgbM); + float lumaE = FxaaLuma(rgbE); + float lumaS = FxaaLuma(rgbS); + float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE))); + float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE))); + float range = rangeMax - rangeMin; + #if FXAA_DEBUG + float lumaO = lumaM / (1.0 + (0.587/0.299)); + #endif + if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) { + #if FXAA_DEBUG + return FxaaFilterReturn(FxaaToFloat3(lumaO)); + #endif + return FxaaFilterReturn(rgbM); } + #if FXAA_SUBPIX > 0 + #if FXAA_SUBPIX_FASTER + float3 rgbL = (rgbN + rgbW + rgbE + rgbS + rgbM) * + FxaaToFloat3(1.0/5.0); + #else + float3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS; + #endif + #endif + +/*---------------------------------------------------------------------------- + COMPUTE LOWPASS +------------------------------------------------------------------------------ +FXAA computes a local neighborhood lowpass value as follows, + + (N + W + E + S)/4 + +Then uses the ratio of the contrast range of the lowpass +and the range found in the early exit check, +as a sub-pixel aliasing detection filter. +When FXAA detects sub-pixel aliasing (such as single pixel dots), +it later blends in "blendL" amount +of a lowpass value (computed in the next section) to the final result. +----------------------------------------------------------------------------*/ + #if FXAA_SUBPIX != 0 + float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25; + float rangeL = abs(lumaL - lumaM); + #endif + #if FXAA_SUBPIX == 1 + float blendL = max(0.0, + (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; + blendL = min(FXAA_SUBPIX_CAP, blendL); + #endif + #if FXAA_SUBPIX == 2 + float blendL = rangeL / range; + #endif + #if FXAA_DEBUG_PASSTHROUGH + #if FXAA_SUBPIX == 0 + float blendL = 0.0; + #endif + return FxaaFilterReturn( + FxaaFloat3(1.0, blendL/FXAA_SUBPIX_CAP, 0.0)); + #endif + +/*---------------------------------------------------------------------------- + CHOOSE VERTICAL OR HORIZONTAL SEARCH +------------------------------------------------------------------------------ +FXAA uses the following local neighborhood, + + NW N NE + W M E + SW S SE + +To compute an edge amount for both vertical and horizontal directions. +Note edge detect filters like Sobel fail on single pixel lines through M. +FXAA takes the weighted average magnitude of the high-pass values +for rows and columns as an indication of local edge amount. + +A lowpass value for anti-sub-pixel-aliasing is computed as + (N+W+E+S+M+NW+NE+SW+SE)/9. +This full box pattern has higher quality than other options. + +Note following this block, both vertical and horizontal cases +flow in parallel (reusing the horizontal variables). +----------------------------------------------------------------------------*/ + float3 rgbNW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1,-1), rcpFrame).xyz; + float3 rgbNE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1,-1), rcpFrame).xyz; + float3 rgbSW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 1), rcpFrame).xyz; + float3 rgbSE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 1), rcpFrame).xyz; + #if (FXAA_SUBPIX_FASTER == 0) && (FXAA_SUBPIX > 0) + rgbL += (rgbNW + rgbNE + rgbSW + rgbSE); + rgbL *= FxaaToFloat3(1.0/9.0); + #endif + float lumaNW = FxaaLuma(rgbNW); + float lumaNE = FxaaLuma(rgbNE); + float lumaSW = FxaaLuma(rgbSW); + float lumaSE = FxaaLuma(rgbSE); + float edgeVert = + abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) + + abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) + + abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE)); + float edgeHorz = + abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) + + abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) + + abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE)); + bool horzSpan = edgeHorz >= edgeVert; + #if FXAA_DEBUG_HORZVERT + if(horzSpan) return FxaaFilterReturn(FxaaFloat3(1.0, 0.75, 0.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 0.50, 1.0)); + #endif + float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x; + if(!horzSpan) lumaN = lumaW; + if(!horzSpan) lumaS = lumaE; + float gradientN = abs(lumaN - lumaM); + float gradientS = abs(lumaS - lumaM); + lumaN = (lumaN + lumaM) * 0.5; + lumaS = (lumaS + lumaM) * 0.5; + +/*---------------------------------------------------------------------------- + CHOOSE SIDE OF PIXEL WHERE GRADIENT IS HIGHEST +------------------------------------------------------------------------------ +This chooses a pixel pair. +For "horzSpan == true" this will be a vertical pair, + + [N] N + [M] or [M] + S [S] + +Note following this block, both {N,M} and {S,M} cases +flow in parallel (reusing the {N,M} variables). + +This pair of image rows or columns is searched below +in the positive and negative direction +until edge status changes +(or the maximum number of search steps is reached). +----------------------------------------------------------------------------*/ + bool pairN = gradientN >= gradientS; + #if FXAA_DEBUG_PAIR + if(pairN) return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 1.0, 0.0)); + #endif + if(!pairN) lumaN = lumaS; + if(!pairN) gradientN = gradientS; + if(!pairN) lengthSign *= -1.0; + float2 posN; + posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5); + posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0); + +/*---------------------------------------------------------------------------- + CHOOSE SEARCH LIMITING VALUES +------------------------------------------------------------------------------ +Search limit (+/- gradientN) is a function of local gradient. +----------------------------------------------------------------------------*/ + gradientN *= FXAA_SEARCH_THRESHOLD; + +/*---------------------------------------------------------------------------- + SEARCH IN BOTH DIRECTIONS UNTIL FIND LUMA PAIR AVERAGE IS OUT OF RANGE +------------------------------------------------------------------------------ +This loop searches either in vertical or horizontal directions, +and in both the negative and positive direction in parallel. +This loop fusion is faster than searching separately. + +The search is accelerated using FXAA_SEARCH_ACCELERATION length box filter +via anisotropic filtering with specified texture gradients. +----------------------------------------------------------------------------*/ + float2 posP = posN; + float2 offNP = horzSpan ? + FxaaFloat2(rcpFrame.x, 0.0) : + FxaaFloat2(0.0f, rcpFrame.y); + float lumaEndN = lumaN; + float lumaEndP = lumaN; + bool doneN = false; + bool doneP = false; + #if FXAA_SEARCH_ACCELERATION == 1 + posN += offNP * FxaaFloat2(-1.0, -1.0); + posP += offNP * FxaaFloat2( 1.0, 1.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 2 + posN += offNP * FxaaFloat2(-1.5, -1.5); + posP += offNP * FxaaFloat2( 1.5, 1.5); + offNP *= FxaaFloat2(2.0, 2.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 3 + posN += offNP * FxaaFloat2(-2.0, -2.0); + posP += offNP * FxaaFloat2( 2.0, 2.0); + offNP *= FxaaFloat2(3.0, 3.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 4 + posN += offNP * FxaaFloat2(-2.5, -2.5); + posP += offNP * FxaaFloat2( 2.5, 2.5); + offNP *= FxaaFloat2(4.0, 4.0); + #endif + for(int i = 0; i < FXAA_SEARCH_STEPS; i++) { + #if FXAA_SEARCH_ACCELERATION == 1 + if(!doneN) lumaEndN = + FxaaLuma(FxaaTexLod0(tex, posN.xy).xyz); + if(!doneP) lumaEndP = + FxaaLuma(FxaaTexLod0(tex, posP.xy).xyz); + #else + if(!doneN) lumaEndN = + FxaaLuma(FxaaTexGrad(tex, posN.xy, offNP).xyz); + if(!doneP) lumaEndP = + FxaaLuma(FxaaTexGrad(tex, posP.xy, offNP).xyz); + #endif + doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN); + doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN); + if(doneN && doneP) break; + if(!doneN) posN -= offNP; + if(!doneP) posP += offNP; } + +/*---------------------------------------------------------------------------- + HANDLE IF CENTER IS ON POSITIVE OR NEGATIVE SIDE +------------------------------------------------------------------------------ +FXAA uses the pixel's position in the span +in combination with the values (lumaEnd*) at the ends of the span, +to determine filtering. + +This step computes which side of the span the pixel is on. +On negative side if dstN < dstP, + + posN pos posP + |-----------|------|------------------| + | | | | + |<--dstN--->|<---------dstP---------->| + | + span center + +----------------------------------------------------------------------------*/ + float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y; + float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y; + bool directionN = dstN < dstP; + #if FXAA_DEBUG_NEGPOS + if(directionN) return FxaaFilterReturn(FxaaFloat3(1.0, 0.0, 0.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); + #endif + lumaEndN = directionN ? lumaEndN : lumaEndP; + +/*---------------------------------------------------------------------------- + CHECK IF PIXEL IS IN SECTION OF SPAN WHICH GETS NO FILTERING +------------------------------------------------------------------------------ +If both the pair luma at the end of the span (lumaEndN) +and middle pixel luma (lumaM) +are on the same side of the middle pair average luma (lumaN), +then don't filter. + +Cases, + +(1.) "L", + + lumaM + | + V XXXXXXXX <- other line averaged + XXXXXXX[X]XXXXXXXXXXX <- source pixel line + | . | + -------------------------- + [ ]xxxxxx[x]xx[X]XXXXXX <- pair average + -------------------------- + ^ ^ ^ ^ + | | | | + . |<---->|<---------- no filter region + . | | | + . center | | + . | lumaEndN + . | . + . lumaN . + . . + |<--- span -->| + + +(2.) "^" and "-", + + <- other line averaged + XXXXX[X]XXX <- source pixel line + | | | + -------------------------- + [ ]xxxx[x]xx[ ] <- pair average + -------------------------- + | | | + |<--->|<--->|<---------- filter both sides + + +(3.) "v" and inverse of "-", + + XXXXXX XXXXXXXXX <- other line averaged + XXXXXXXXXXX[X]XXXXXXXXXXXX <- source pixel line + | | | + -------------------------- + XXXX[X]xxxx[x]xx[X]XXXXXXX <- pair average + -------------------------- + | | | + |<--->|<--->|<---------- don't filter both! + + +Note the "v" case for FXAA requires no filtering. +This is because the inverse of the "-" case is the "v". +Filtering "v" case turns open spans like this, + + XXXXXXXXX + +Into this (which is not desired), + + x+. .+x + XXXXXXXXX + +----------------------------------------------------------------------------*/ + if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) + lengthSign = 0.0; + +/*---------------------------------------------------------------------------- + COMPUTE SUB-PIXEL OFFSET AND FILTER SPAN +------------------------------------------------------------------------------ +FXAA filters using a bilinear texture fetch offset +from the middle pixel M towards the center of the pair (NM below). +Maximum filtering will be half way between pair. +Reminder, at this point in the code, +the {N,M} pair is also reused for all cases: {S,M}, {W,M}, and {E,M}. + + +-------+ + | | 0.5 offset + | N | | + | | V + +-------+....--- + | | + | M...|....--- + | | ^ + +-------+ | + . . 0.0 offset + . S . + . . + ......... + +Position on span is used to compute sub-pixel filter offset using simple ramp, + + posN posP + |\ |<------- 0.5 pixel offset into pair pixel + | \ | + | \ | + ---.......|...\..........|<------- 0.25 pixel offset into pair pixel + ^ | ^\ | + | | | \ | + V | | \ | + ---.......|===|==========|<------- 0.0 pixel offset (ie M pixel) + ^ . | ^ . + | . pos | . + | . . | . + | . . center . + | . . . + | |<->|<---------.-------- dstN + | . . . + | . |<-------->|<------- dstP + | . . + | |<------------>|<------- spanLength + | + subPixelOffset + +----------------------------------------------------------------------------*/ + float spanLength = (dstP + dstN); + dstN = directionN ? dstN : dstP; + float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign; + #if FXAA_DEBUG_OFFSET + float ox = horzSpan ? 0.0 : subPixelOffset*2.0/rcpFrame.x; + float oy = horzSpan ? subPixelOffset*2.0/rcpFrame.y : 0.0; + if(ox < 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(1.0, 0.0, 0.0), -ox)); + if(ox > 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(0.0, 0.0, 1.0), ox)); + if(oy < 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(1.0, 0.6, 0.2), -oy)); + if(oy > 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(0.2, 0.6, 1.0), oy)); + return FxaaFilterReturn(FxaaFloat3(lumaO, lumaO, lumaO)); + #endif + float3 rgbF = FxaaTexLod0(tex, FxaaFloat2( + pos.x + (horzSpan ? 0.0 : subPixelOffset), + pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz; + #if FXAA_SUBPIX == 0 + return FxaaFilterReturn(rgbF); + #else + return FxaaFilterReturn(FxaaLerp3(rgbL, rgbF, blendL)); + #endif +} + + + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord.xy; + return o; +} + +sampler2D _MainTex; +float4 _MainTex_TexelSize; + +float4 frag (v2f i) : SV_Target +{ + return float4(FxaaPixelShader(i.uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); +} + +ENDCG + } +} + +Fallback "Hidden/FXAA II" +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader.meta new file mode 100644 index 0000000..7518139 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset2.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 6f1418cffd12146f2a83be795f6fa5a7 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader new file mode 100644 index 0000000..1cba248 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader @@ -0,0 +1,828 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/FXAA Preset 3" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#include "UnityCG.cginc" +#pragma target 3.0 + +// Not very practical on consoles/mobile, and PS3 Cg takes ages to compile this :( +#pragma exclude_renderers xbox360 ps3 gles + +#define FXAA_HLSL_3 1 +#define FXAA_PRESET 3 + + +// Copyright (c) 2010 NVIDIA Corporation. All rights reserved. +// +// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED +// *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS +// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS +// BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES +// WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, +// BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) +// ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS +// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +/*============================================================================ + + FXAA + +============================================================================*/ + +/*============================================================================ + API PORTING +============================================================================*/ +#ifndef FXAA_GLSL_120 + #define FXAA_GLSL_120 0 +#endif +#ifndef FXAA_GLSL_130 + #define FXAA_GLSL_130 0 +#endif +#ifndef FXAA_HLSL_3 + #define FXAA_HLSL_3 0 +#endif +#ifndef FXAA_HLSL_4 + #define FXAA_HLSL_4 0 +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_120 + // Requires, + // #version 120 + // #extension GL_EXT_gpu_shader4 : enable + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaBool3 bvec3 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaFloat3 vec3 + #define FxaaFloat4 vec4 + #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) mix((f), (t), (b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_GLSL_130 + // Requires "#version 130" or better + #define int2 ivec2 + #define float2 vec2 + #define float3 vec3 + #define float4 vec4 + #define FxaaBool3 bvec3 + #define FxaaInt2 ivec2 + #define FxaaFloat2 vec2 + #define FxaaFloat3 vec3 + #define FxaaFloat4 vec4 + #define FxaaBool2Float(a) mix(0.0, 1.0, (a)) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) mix((f), (t), (b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_3 + #define int2 float2 + #define FxaaInt2 float2 + #define FxaaFloat2 float2 + #define FxaaFloat3 float3 + #define FxaaFloat4 float4 + #define FxaaBool2Float(a) (a) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) + #define FxaaTex sampler2D +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_HLSL_4 + #define FxaaInt2 int2 + #define FxaaFloat2 float2 + #define FxaaFloat3 float3 + #define FxaaFloat4 float4 + #define FxaaBool2Float(a) (a) + #define FxaaPow3(x, y) pow(x, y) + #define FxaaSel3(f, t, b) ((f)*(!b) + (t)*(b)) + struct FxaaTex { SamplerState smpl; Texture2D tex; }; +#endif +/*--------------------------------------------------------------------------*/ +#define FxaaToFloat3(a) FxaaFloat3((a), (a), (a)) +/*--------------------------------------------------------------------------*/ +float4 FxaaTexLod0(FxaaTex tex, float2 pos) { + #if FXAA_GLSL_120 + return texture2DLod(tex, pos.xy, 0.0); + #endif + #if FXAA_GLSL_130 + return textureLod(tex, pos.xy, 0.0); + #endif + #if FXAA_HLSL_3 + return tex2Dlod(tex, float4(pos.xy, 0.0, 0.0)); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0); + #endif +} +/*--------------------------------------------------------------------------*/ +float4 FxaaTexGrad(FxaaTex tex, float2 pos, float2 grad) { + #if FXAA_GLSL_120 + return texture2DGrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_GLSL_130 + return textureGrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_HLSL_3 + return tex2Dgrad(tex, pos.xy, grad, grad); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleGrad(tex.smpl, pos.xy, grad, grad); + #endif +} +/*--------------------------------------------------------------------------*/ +float4 FxaaTexOff(FxaaTex tex, float2 pos, int2 off, float2 rcpFrame) { + #if FXAA_GLSL_120 + return texture2DLodOffset(tex, pos.xy, 0.0, off.xy); + #endif + #if FXAA_GLSL_130 + return textureLodOffset(tex, pos.xy, 0.0, off.xy); + #endif + #if FXAA_HLSL_3 + return tex2Dlod(tex, float4(pos.xy + (off * rcpFrame), 0, 0)); + #endif + #if FXAA_HLSL_4 + return tex.tex.SampleLevel(tex.smpl, pos.xy, 0.0, off.xy); + #endif +} + +/*============================================================================ + SRGB KNOBS +------------------------------------------------------------------------------ +FXAA_SRGB_ROP - Set to 1 when applying FXAA to an sRGB back buffer (DX10/11). + This will do the sRGB to linear transform, + as ROP will expect linear color from this shader, + and this shader works in non-linear color. +============================================================================*/ +#define FXAA_SRGB_ROP 0 + +/*============================================================================ + DEBUG KNOBS +------------------------------------------------------------------------------ +All debug knobs draw FXAA-untouched pixels in FXAA computed luma (monochrome). + +FXAA_DEBUG_PASSTHROUGH - Red for pixels which are filtered by FXAA with a + yellow tint on sub-pixel aliasing filtered by FXAA. +FXAA_DEBUG_HORZVERT - Blue for horizontal edges, gold for vertical edges. +FXAA_DEBUG_PAIR - Blue/green for the 2 pixel pair choice. +FXAA_DEBUG_NEGPOS - Red/blue for which side of center of span. +FXAA_DEBUG_OFFSET - Red/blue for -/+ x, gold/skyblue for -/+ y. +============================================================================*/ +#ifndef FXAA_DEBUG_PASSTHROUGH + #define FXAA_DEBUG_PASSTHROUGH 0 +#endif +#ifndef FXAA_DEBUG_HORZVERT + #define FXAA_DEBUG_HORZVERT 0 +#endif +#ifndef FXAA_DEBUG_PAIR + #define FXAA_DEBUG_PAIR 0 +#endif +#ifndef FXAA_DEBUG_NEGPOS + #define FXAA_DEBUG_NEGPOS 0 +#endif +#ifndef FXAA_DEBUG_OFFSET + #define FXAA_DEBUG_OFFSET 0 +#endif +/*--------------------------------------------------------------------------*/ +#if FXAA_DEBUG_PASSTHROUGH || FXAA_DEBUG_HORZVERT || FXAA_DEBUG_PAIR + #define FXAA_DEBUG 1 +#endif +#if FXAA_DEBUG_NEGPOS || FXAA_DEBUG_OFFSET + #define FXAA_DEBUG 1 +#endif +#ifndef FXAA_DEBUG + #define FXAA_DEBUG 0 +#endif + +/*============================================================================ + COMPILE-IN KNOBS +------------------------------------------------------------------------------ +FXAA_PRESET - Choose compile-in knob preset 0-5. +------------------------------------------------------------------------------ +FXAA_EDGE_THRESHOLD - The minimum amount of local contrast required + to apply algorithm. + 1.0/3.0 - too little + 1.0/4.0 - good start + 1.0/8.0 - applies to more edges + 1.0/16.0 - overkill +------------------------------------------------------------------------------ +FXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks. + Perf optimization. + 1.0/32.0 - visible limit (smaller isn't visible) + 1.0/16.0 - good compromise + 1.0/12.0 - upper limit (seeing artifacts) +------------------------------------------------------------------------------ +FXAA_SEARCH_STEPS - Maximum number of search steps for end of span. +------------------------------------------------------------------------------ +FXAA_SEARCH_ACCELERATION - How much to accelerate search, + 1 - no acceleration + 2 - skip by 2 pixels + 3 - skip by 3 pixels + 4 - skip by 4 pixels +------------------------------------------------------------------------------ +FXAA_SEARCH_THRESHOLD - Controls when to stop searching. + 1.0/4.0 - seems to be the best quality wise +------------------------------------------------------------------------------ +FXAA_SUBPIX_FASTER - Turn on lower quality but faster subpix path. + Not recomended, but used in preset 0. +------------------------------------------------------------------------------ +FXAA_SUBPIX - Toggle subpix filtering. + 0 - turn off + 1 - turn on + 2 - turn on full (ignores FXAA_SUBPIX_TRIM and CAP) +------------------------------------------------------------------------------ +FXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal. + 1.0/2.0 - low removal + 1.0/3.0 - medium removal + 1.0/4.0 - default removal + 1.0/8.0 - high removal + 0.0 - complete removal +------------------------------------------------------------------------------ +FXAA_SUBPIX_CAP - Insures fine detail is not completely removed. + This is important for the transition of sub-pixel detail, + like fences and wires. + 3.0/4.0 - default (medium amount of filtering) + 7.0/8.0 - high amount of filtering + 1.0 - no capping of sub-pixel aliasing removal +============================================================================*/ +#ifndef FXAA_PRESET + #define FXAA_PRESET 3 +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 0) + #define FXAA_EDGE_THRESHOLD (1.0/4.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/12.0) + #define FXAA_SEARCH_STEPS 2 + #define FXAA_SEARCH_ACCELERATION 4 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 1 + #define FXAA_SUBPIX_CAP (2.0/3.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 1) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/16.0) + #define FXAA_SEARCH_STEPS 4 + #define FXAA_SEARCH_ACCELERATION 3 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 2) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 8 + #define FXAA_SEARCH_ACCELERATION 2 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 3) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 16 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 4) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 24 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#if (FXAA_PRESET == 5) + #define FXAA_EDGE_THRESHOLD (1.0/8.0) + #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0) + #define FXAA_SEARCH_STEPS 32 + #define FXAA_SEARCH_ACCELERATION 1 + #define FXAA_SEARCH_THRESHOLD (1.0/4.0) + #define FXAA_SUBPIX 1 + #define FXAA_SUBPIX_FASTER 0 + #define FXAA_SUBPIX_CAP (3.0/4.0) + #define FXAA_SUBPIX_TRIM (1.0/4.0) +#endif +/*--------------------------------------------------------------------------*/ +#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM)) + +/*============================================================================ + HELPERS +============================================================================*/ +// Return the luma, the estimation of luminance from rgb inputs. +// This approximates luma using one FMA instruction, +// skipping normalization and tossing out blue. +// FxaaLuma() will range 0.0 to 2.963210702. +float FxaaLuma(float3 rgb) { + return rgb.y * (0.587/0.299) + rgb.x; } +/*--------------------------------------------------------------------------*/ +float3 FxaaLerp3(float3 a, float3 b, float amountOfA) { + return (FxaaToFloat3(-amountOfA) * b) + + ((a * FxaaToFloat3(amountOfA)) + b); } +/*--------------------------------------------------------------------------*/ +// Support any extra filtering before returning color. +float3 FxaaFilterReturn(float3 rgb) { + #if FXAA_SRGB_ROP + // Do sRGB encoded value to linear conversion. + return FxaaSel3( + rgb * FxaaToFloat3(1.0/12.92), + FxaaPow3( + rgb * FxaaToFloat3(1.0/1.055) + FxaaToFloat3(0.055/1.055), + FxaaToFloat3(2.4)), + rgb > FxaaToFloat3(0.04045)); + #else + return rgb; + #endif +} + +/*============================================================================ + VERTEX SHADER +============================================================================*/ +float2 FxaaVertexShader( +// Both x and y range {-1.0 to 1.0 across screen}. +float2 inPos) { + float2 pos; + pos.xy = (inPos.xy * FxaaFloat2(0.5, 0.5)) + FxaaFloat2(0.5, 0.5); + return pos; } + +/*============================================================================ + + PIXEL SHADER + +============================================================================*/ +float3 FxaaPixelShader( +// Output of FxaaVertexShader interpolated across screen. +// xy -> actual texture position {0.0 to 1.0} +float2 pos, +// Input texture. +FxaaTex tex, +// RCPFRAME SHOULD PIXEL SHADER CONSTANTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// {1.0/frameWidth, 1.0/frameHeight} +float2 rcpFrame) { + +/*---------------------------------------------------------------------------- + EARLY EXIT IF LOCAL CONTRAST BELOW EDGE DETECT LIMIT +------------------------------------------------------------------------------ +Majority of pixels of a typical image do not require filtering, +often pixels are grouped into blocks which could benefit from early exit +right at the beginning of the algorithm. +Given the following neighborhood, + + N + W M E + S + +If the difference in local maximum and minimum luma (contrast "range") +is lower than a threshold proportional to the maximum local luma ("rangeMax"), +then the shader early exits (no visible aliasing). +This threshold is clamped at a minimum value ("FXAA_EDGE_THRESHOLD_MIN") +to avoid processing in really dark areas. +----------------------------------------------------------------------------*/ + float3 rgbN = FxaaTexOff(tex, pos.xy, FxaaInt2( 0,-1), rcpFrame).xyz; + float3 rgbW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 0), rcpFrame).xyz; + float3 rgbM = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 0), rcpFrame).xyz; + float3 rgbE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 0), rcpFrame).xyz; + float3 rgbS = FxaaTexOff(tex, pos.xy, FxaaInt2( 0, 1), rcpFrame).xyz; + float lumaN = FxaaLuma(rgbN); + float lumaW = FxaaLuma(rgbW); + float lumaM = FxaaLuma(rgbM); + float lumaE = FxaaLuma(rgbE); + float lumaS = FxaaLuma(rgbS); + float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE))); + float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE))); + float range = rangeMax - rangeMin; + #if FXAA_DEBUG + float lumaO = lumaM / (1.0 + (0.587/0.299)); + #endif + if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) { + #if FXAA_DEBUG + return FxaaFilterReturn(FxaaToFloat3(lumaO)); + #endif + return FxaaFilterReturn(rgbM); } + #if FXAA_SUBPIX > 0 + #if FXAA_SUBPIX_FASTER + float3 rgbL = (rgbN + rgbW + rgbE + rgbS + rgbM) * + FxaaToFloat3(1.0/5.0); + #else + float3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS; + #endif + #endif + +/*---------------------------------------------------------------------------- + COMPUTE LOWPASS +------------------------------------------------------------------------------ +FXAA computes a local neighborhood lowpass value as follows, + + (N + W + E + S)/4 + +Then uses the ratio of the contrast range of the lowpass +and the range found in the early exit check, +as a sub-pixel aliasing detection filter. +When FXAA detects sub-pixel aliasing (such as single pixel dots), +it later blends in "blendL" amount +of a lowpass value (computed in the next section) to the final result. +----------------------------------------------------------------------------*/ + #if FXAA_SUBPIX != 0 + float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25; + float rangeL = abs(lumaL - lumaM); + #endif + #if FXAA_SUBPIX == 1 + float blendL = max(0.0, + (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; + blendL = min(FXAA_SUBPIX_CAP, blendL); + #endif + #if FXAA_SUBPIX == 2 + float blendL = rangeL / range; + #endif + #if FXAA_DEBUG_PASSTHROUGH + #if FXAA_SUBPIX == 0 + float blendL = 0.0; + #endif + return FxaaFilterReturn( + FxaaFloat3(1.0, blendL/FXAA_SUBPIX_CAP, 0.0)); + #endif + +/*---------------------------------------------------------------------------- + CHOOSE VERTICAL OR HORIZONTAL SEARCH +------------------------------------------------------------------------------ +FXAA uses the following local neighborhood, + + NW N NE + W M E + SW S SE + +To compute an edge amount for both vertical and horizontal directions. +Note edge detect filters like Sobel fail on single pixel lines through M. +FXAA takes the weighted average magnitude of the high-pass values +for rows and columns as an indication of local edge amount. + +A lowpass value for anti-sub-pixel-aliasing is computed as + (N+W+E+S+M+NW+NE+SW+SE)/9. +This full box pattern has higher quality than other options. + +Note following this block, both vertical and horizontal cases +flow in parallel (reusing the horizontal variables). +----------------------------------------------------------------------------*/ + float3 rgbNW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1,-1), rcpFrame).xyz; + float3 rgbNE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1,-1), rcpFrame).xyz; + float3 rgbSW = FxaaTexOff(tex, pos.xy, FxaaInt2(-1, 1), rcpFrame).xyz; + float3 rgbSE = FxaaTexOff(tex, pos.xy, FxaaInt2( 1, 1), rcpFrame).xyz; + #if (FXAA_SUBPIX_FASTER == 0) && (FXAA_SUBPIX > 0) + rgbL += (rgbNW + rgbNE + rgbSW + rgbSE); + rgbL *= FxaaToFloat3(1.0/9.0); + #endif + float lumaNW = FxaaLuma(rgbNW); + float lumaNE = FxaaLuma(rgbNE); + float lumaSW = FxaaLuma(rgbSW); + float lumaSE = FxaaLuma(rgbSE); + float edgeVert = + abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) + + abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) + + abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE)); + float edgeHorz = + abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) + + abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) + + abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE)); + bool horzSpan = edgeHorz >= edgeVert; + #if FXAA_DEBUG_HORZVERT + if(horzSpan) return FxaaFilterReturn(FxaaFloat3(1.0, 0.75, 0.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 0.50, 1.0)); + #endif + float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x; + if(!horzSpan) lumaN = lumaW; + if(!horzSpan) lumaS = lumaE; + float gradientN = abs(lumaN - lumaM); + float gradientS = abs(lumaS - lumaM); + lumaN = (lumaN + lumaM) * 0.5; + lumaS = (lumaS + lumaM) * 0.5; + +/*---------------------------------------------------------------------------- + CHOOSE SIDE OF PIXEL WHERE GRADIENT IS HIGHEST +------------------------------------------------------------------------------ +This chooses a pixel pair. +For "horzSpan == true" this will be a vertical pair, + + [N] N + [M] or [M] + S [S] + +Note following this block, both {N,M} and {S,M} cases +flow in parallel (reusing the {N,M} variables). + +This pair of image rows or columns is searched below +in the positive and negative direction +until edge status changes +(or the maximum number of search steps is reached). +----------------------------------------------------------------------------*/ + bool pairN = gradientN >= gradientS; + #if FXAA_DEBUG_PAIR + if(pairN) return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 1.0, 0.0)); + #endif + if(!pairN) lumaN = lumaS; + if(!pairN) gradientN = gradientS; + if(!pairN) lengthSign *= -1.0; + float2 posN; + posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5); + posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0); + +/*---------------------------------------------------------------------------- + CHOOSE SEARCH LIMITING VALUES +------------------------------------------------------------------------------ +Search limit (+/- gradientN) is a function of local gradient. +----------------------------------------------------------------------------*/ + gradientN *= FXAA_SEARCH_THRESHOLD; + +/*---------------------------------------------------------------------------- + SEARCH IN BOTH DIRECTIONS UNTIL FIND LUMA PAIR AVERAGE IS OUT OF RANGE +------------------------------------------------------------------------------ +This loop searches either in vertical or horizontal directions, +and in both the negative and positive direction in parallel. +This loop fusion is faster than searching separately. + +The search is accelerated using FXAA_SEARCH_ACCELERATION length box filter +via anisotropic filtering with specified texture gradients. +----------------------------------------------------------------------------*/ + float2 posP = posN; + float2 offNP = horzSpan ? + FxaaFloat2(rcpFrame.x, 0.0) : + FxaaFloat2(0.0f, rcpFrame.y); + float lumaEndN = lumaN; + float lumaEndP = lumaN; + bool doneN = false; + bool doneP = false; + #if FXAA_SEARCH_ACCELERATION == 1 + posN += offNP * FxaaFloat2(-1.0, -1.0); + posP += offNP * FxaaFloat2( 1.0, 1.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 2 + posN += offNP * FxaaFloat2(-1.5, -1.5); + posP += offNP * FxaaFloat2( 1.5, 1.5); + offNP *= FxaaFloat2(2.0, 2.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 3 + posN += offNP * FxaaFloat2(-2.0, -2.0); + posP += offNP * FxaaFloat2( 2.0, 2.0); + offNP *= FxaaFloat2(3.0, 3.0); + #endif + #if FXAA_SEARCH_ACCELERATION == 4 + posN += offNP * FxaaFloat2(-2.5, -2.5); + posP += offNP * FxaaFloat2( 2.5, 2.5); + offNP *= FxaaFloat2(4.0, 4.0); + #endif + for(int i = 0; i < FXAA_SEARCH_STEPS; i++) { + #if FXAA_SEARCH_ACCELERATION == 1 + if(!doneN) lumaEndN = + FxaaLuma(FxaaTexLod0(tex, posN.xy).xyz); + if(!doneP) lumaEndP = + FxaaLuma(FxaaTexLod0(tex, posP.xy).xyz); + #else + if(!doneN) lumaEndN = + FxaaLuma(FxaaTexGrad(tex, posN.xy, offNP).xyz); + if(!doneP) lumaEndP = + FxaaLuma(FxaaTexGrad(tex, posP.xy, offNP).xyz); + #endif + doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN); + doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN); + if(doneN && doneP) break; + if(!doneN) posN -= offNP; + if(!doneP) posP += offNP; } + +/*---------------------------------------------------------------------------- + HANDLE IF CENTER IS ON POSITIVE OR NEGATIVE SIDE +------------------------------------------------------------------------------ +FXAA uses the pixel's position in the span +in combination with the values (lumaEnd*) at the ends of the span, +to determine filtering. + +This step computes which side of the span the pixel is on. +On negative side if dstN < dstP, + + posN pos posP + |-----------|------|------------------| + | | | | + |<--dstN--->|<---------dstP---------->| + | + span center + +----------------------------------------------------------------------------*/ + float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y; + float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y; + bool directionN = dstN < dstP; + #if FXAA_DEBUG_NEGPOS + if(directionN) return FxaaFilterReturn(FxaaFloat3(1.0, 0.0, 0.0)); + else return FxaaFilterReturn(FxaaFloat3(0.0, 0.0, 1.0)); + #endif + lumaEndN = directionN ? lumaEndN : lumaEndP; + +/*---------------------------------------------------------------------------- + CHECK IF PIXEL IS IN SECTION OF SPAN WHICH GETS NO FILTERING +------------------------------------------------------------------------------ +If both the pair luma at the end of the span (lumaEndN) +and middle pixel luma (lumaM) +are on the same side of the middle pair average luma (lumaN), +then don't filter. + +Cases, + +(1.) "L", + + lumaM + | + V XXXXXXXX <- other line averaged + XXXXXXX[X]XXXXXXXXXXX <- source pixel line + | . | + -------------------------- + [ ]xxxxxx[x]xx[X]XXXXXX <- pair average + -------------------------- + ^ ^ ^ ^ + | | | | + . |<---->|<---------- no filter region + . | | | + . center | | + . | lumaEndN + . | . + . lumaN . + . . + |<--- span -->| + + +(2.) "^" and "-", + + <- other line averaged + XXXXX[X]XXX <- source pixel line + | | | + -------------------------- + [ ]xxxx[x]xx[ ] <- pair average + -------------------------- + | | | + |<--->|<--->|<---------- filter both sides + + +(3.) "v" and inverse of "-", + + XXXXXX XXXXXXXXX <- other line averaged + XXXXXXXXXXX[X]XXXXXXXXXXXX <- source pixel line + | | | + -------------------------- + XXXX[X]xxxx[x]xx[X]XXXXXXX <- pair average + -------------------------- + | | | + |<--->|<--->|<---------- don't filter both! + + +Note the "v" case for FXAA requires no filtering. +This is because the inverse of the "-" case is the "v". +Filtering "v" case turns open spans like this, + + XXXXXXXXX + +Into this (which is not desired), + + x+. .+x + XXXXXXXXX + +----------------------------------------------------------------------------*/ + if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0)) + lengthSign = 0.0; + +/*---------------------------------------------------------------------------- + COMPUTE SUB-PIXEL OFFSET AND FILTER SPAN +------------------------------------------------------------------------------ +FXAA filters using a bilinear texture fetch offset +from the middle pixel M towards the center of the pair (NM below). +Maximum filtering will be half way between pair. +Reminder, at this point in the code, +the {N,M} pair is also reused for all cases: {S,M}, {W,M}, and {E,M}. + + +-------+ + | | 0.5 offset + | N | | + | | V + +-------+....--- + | | + | M...|....--- + | | ^ + +-------+ | + . . 0.0 offset + . S . + . . + ......... + +Position on span is used to compute sub-pixel filter offset using simple ramp, + + posN posP + |\ |<------- 0.5 pixel offset into pair pixel + | \ | + | \ | + ---.......|...\..........|<------- 0.25 pixel offset into pair pixel + ^ | ^\ | + | | | \ | + V | | \ | + ---.......|===|==========|<------- 0.0 pixel offset (ie M pixel) + ^ . | ^ . + | . pos | . + | . . | . + | . . center . + | . . . + | |<->|<---------.-------- dstN + | . . . + | . |<-------->|<------- dstP + | . . + | |<------------>|<------- spanLength + | + subPixelOffset + +----------------------------------------------------------------------------*/ + float spanLength = (dstP + dstN); + dstN = directionN ? dstN : dstP; + float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign; + #if FXAA_DEBUG_OFFSET + float ox = horzSpan ? 0.0 : subPixelOffset*2.0/rcpFrame.x; + float oy = horzSpan ? subPixelOffset*2.0/rcpFrame.y : 0.0; + if(ox < 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(1.0, 0.0, 0.0), -ox)); + if(ox > 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(0.0, 0.0, 1.0), ox)); + if(oy < 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(1.0, 0.6, 0.2), -oy)); + if(oy > 0.0) return FxaaFilterReturn( + FxaaLerp3(FxaaToFloat3(lumaO), + FxaaFloat3(0.2, 0.6, 1.0), oy)); + return FxaaFilterReturn(FxaaFloat3(lumaO, lumaO, lumaO)); + #endif + float3 rgbF = FxaaTexLod0(tex, FxaaFloat2( + pos.x + (horzSpan ? 0.0 : subPixelOffset), + pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz; + #if FXAA_SUBPIX == 0 + return FxaaFilterReturn(rgbF); + #else + return FxaaFilterReturn(FxaaLerp3(rgbL, rgbF, blendL)); + #endif +} + + + +struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; +}; + +v2f vert (appdata_img v) +{ + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord.xy; + return o; +} + +sampler2D _MainTex; +float4 _MainTex_TexelSize; + +float4 frag (v2f i) : SV_Target +{ + return float4(FxaaPixelShader(i.uv.xy, _MainTex, _MainTex_TexelSize.xy).xyz, 0.0f); +} + +ENDCG + } +} + +Fallback "Hidden/FXAA II" +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader.meta new file mode 100644 index 0000000..139fae9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/FXAAPreset3.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: c182fa94a5a0a4c02870641efcd38cd5 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader new file mode 100644 index 0000000..ce23ff7 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader @@ -0,0 +1,148 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/NFAA" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _BlurTex ("Base (RGB)", 2D) = "white" {} + +} + +CGINCLUDE + +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform float4 _MainTex_TexelSize; +uniform float _OffsetScale; +uniform float _BlurRadius; + +struct v2f { + float4 pos : SV_POSITION; + float2 uv[8] : TEXCOORD0; +}; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + float2 uv = v.texcoord.xy; + + float2 up = float2(0.0, _MainTex_TexelSize.y) * _OffsetScale; + float2 right = float2(_MainTex_TexelSize.x, 0.0) * _OffsetScale; + + o.uv[0].xy = uv + up; + o.uv[1].xy = uv - up; + o.uv[2].xy = uv + right; + o.uv[3].xy = uv - right; + o.uv[4].xy = uv - right + up; + o.uv[5].xy = uv - right -up; + o.uv[6].xy = uv + right + up; + o.uv[7].xy = uv + right -up; + + return o; + } + + half4 frag (v2f i) : SV_Target + { + // get luminance values + // maybe: experiment with different luminance calculations + float topL = Luminance( tex2D(_MainTex, i.uv[0]).rgb ); + float bottomL = Luminance( tex2D(_MainTex, i.uv[1]).rgb ); + float rightL = Luminance( tex2D(_MainTex, i.uv[2]).rgb ); + float leftL = Luminance( tex2D(_MainTex, i.uv[3]).rgb ); + float leftTopL = Luminance( tex2D(_MainTex, i.uv[4]).rgb ); + float leftBottomL = Luminance( tex2D(_MainTex, i.uv[5]).rgb ); + float rightBottomL = Luminance( tex2D(_MainTex, i.uv[6]).rgb ); + float rightTopL = Luminance( tex2D(_MainTex, i.uv[7]).rgb ); + + // 2 triangle subtractions + float sum0 = dot(float3(1,1,1), float3(rightTopL,bottomL,leftTopL)); + float sum1 = dot(float3(1,1,1), float3(leftBottomL,topL,rightBottomL)); + float sum2 = dot(float3(1,1,1), float3(leftTopL,rightL,leftBottomL)); + float sum3 = dot(float3(1,1,1), float3(rightBottomL,leftL,rightTopL)); + + // figure out "normal" + float2 blurDir = half2((sum0-sum1), (sum3-sum2)); + blurDir *= _MainTex_TexelSize.xy * _BlurRadius; + + // reconstruct normal uv + float2 uv_ = (i.uv[0] + i.uv[1]) * 0.5; + + float4 returnColor = tex2D(_MainTex, uv_); + returnColor += tex2D(_MainTex, uv_+ blurDir.xy); + returnColor += tex2D(_MainTex, uv_ - blurDir.xy); + returnColor += tex2D(_MainTex, uv_ + float2(blurDir.x, -blurDir.y)); + returnColor += tex2D(_MainTex, uv_ - float2(blurDir.x, -blurDir.y)); + + return returnColor * 0.2; + } + + half4 fragDebug (v2f i) : SV_Target + { + // get luminance values + // maybe: experiment with different luminance calculations + float topL = Luminance( tex2D(_MainTex, i.uv[0]).rgb ); + float bottomL = Luminance( tex2D(_MainTex, i.uv[1]).rgb ); + float rightL = Luminance( tex2D(_MainTex, i.uv[2]).rgb ); + float leftL = Luminance( tex2D(_MainTex, i.uv[3]).rgb ); + float leftTopL = Luminance( tex2D(_MainTex, i.uv[4]).rgb ); + float leftBottomL = Luminance( tex2D(_MainTex, i.uv[5]).rgb ); + float rightBottomL = Luminance( tex2D(_MainTex, i.uv[6]).rgb ); + float rightTopL = Luminance( tex2D(_MainTex, i.uv[7]).rgb ); + + // 2 triangle subtractions + float sum0 = dot(float3(1,1,1), float3(rightTopL,bottomL,leftTopL)); + float sum1 = dot(float3(1,1,1), float3(leftBottomL,topL,rightBottomL)); + float sum2 = dot(float3(1,1,1), float3(leftTopL,rightL,leftBottomL)); + float sum3 = dot(float3(1,1,1), float3(rightBottomL,leftL,rightTopL)); + + // figure out "normal" + float2 blurDir = half2((sum0-sum1), (sum3-sum2)); + blurDir *= _MainTex_TexelSize.xy * _BlurRadius; + + // reconstruct normal uv + float2 uv_ = (i.uv[0] + i.uv[1]) * 0.5; + + float4 returnColor = tex2D(_MainTex, uv_); + returnColor += tex2D(_MainTex, uv_+ blurDir.xy); + returnColor += tex2D(_MainTex, uv_ - blurDir.xy); + returnColor += tex2D(_MainTex, uv_ + float2(blurDir.x, -blurDir.y)); + returnColor += tex2D(_MainTex, uv_ - float2(blurDir.x, -blurDir.y)); + + blurDir = half2((sum0-sum1), (sum3-sum2)) * _BlurRadius; + return half4(normalize( half3(blurDir,1) * 0.5 + 0.5), 1); + return returnColor * 0.2; + } + +ENDCG + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma exclude_renderers d3d11_9x + + ENDCG + } + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragDebug + #pragma exclude_renderers d3d11_9x + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader.meta new file mode 100644 index 0000000..c909e0e --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/NFAA.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: ce0cb2621f6d84e21a87414e471a3cce +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader new file mode 100644 index 0000000..77b1632 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader @@ -0,0 +1,87 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/SSAA" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} +} + +// very simple & fast AA by Emmanuel Julien + +SubShader { + Pass { + + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + uniform sampler2D _MainTex; + uniform float4 _MainTex_TexelSize; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[5] : TEXCOORD0; + }; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + + float2 uv = v.texcoord.xy; + + float w = 1.75; + + float2 up = float2(0.0, _MainTex_TexelSize.y) * w; + float2 right = float2(_MainTex_TexelSize.x, 0.0) * w; + + o.uv[0].xy = uv - up; + o.uv[1].xy = uv - right; + o.uv[2].xy = uv + right; + o.uv[3].xy = uv + up; + + o.uv[4].xy = uv; + + return o; + } + + half4 frag (v2f i) : SV_Target + { + half4 outColor; + + float t = Luminance( tex2D( _MainTex, i.uv[0] ).xyz ); + float l = Luminance( tex2D( _MainTex, i.uv[1] ).xyz); + float r = Luminance( tex2D( _MainTex, i.uv[2] ).xyz); + float b = Luminance( tex2D( _MainTex, i.uv[3] ).xyz); + + half2 n = half2( -( t - b ), r - l ); + float nl = length( n ); + + if ( nl < (1.0 / 16.0) ) + outColor = tex2D( _MainTex, i.uv[4] ); + else { + n *= _MainTex_TexelSize.xy / nl; + + half4 o = tex2D( _MainTex, i.uv[4]); + half4 t0 = tex2D( _MainTex, i.uv[4] + n * 0.5) * 0.9; + half4 t1 = tex2D( _MainTex, i.uv[4] - n * 0.5) * 0.9; + half4 t2 = tex2D( _MainTex, i.uv[4] + n) * 0.75; + half4 t3 = tex2D( _MainTex, i.uv[4] - n) * 0.75; + + outColor = (o + t0 + t1 + t2 + t3) / 4.3; + } + + return outColor; + } + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader.meta new file mode 100644 index 0000000..ebdba27 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_Antialiasing/SSAA.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: b3728d1488b02490cbd196c7941bf1f8 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares.meta new file mode 100644 index 0000000..0d4d105 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d6ef58fc6f637406bbe6814a19c377f8 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader new file mode 100644 index 0000000..abda938 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader @@ -0,0 +1,116 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/Blend" { + Properties { + _MainTex ("Screen Blended", 2D) = "" {} + _ColorBuffer ("Color", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[2] : TEXCOORD0; + }; + struct v2f_mt { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + }; + + sampler2D _ColorBuffer; + sampler2D _MainTex; + + half _Intensity; + half4 _ColorBuffer_TexelSize; + half4 _MainTex_TexelSize; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_ColorBuffer_TexelSize.y < 0) + o.uv[1].y = 1-o.uv[1].y; + #endif + + return o; + } + + v2f_mt vertMultiTap( appdata_img v ) { + v2f_mt o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[0] = v.texcoord.xy + _MainTex_TexelSize.xy * 0.5; + o.uv[1] = v.texcoord.xy - _MainTex_TexelSize.xy * 0.5; + o.uv[2] = v.texcoord.xy - _MainTex_TexelSize.xy * half2(1,-1) * 0.5; + o.uv[3] = v.texcoord.xy + _MainTex_TexelSize.xy * half2(1,-1) * 0.5; + return o; + } + + half4 fragScreen (v2f i) : SV_Target { + half4 toBlend = saturate (tex2D(_MainTex, i.uv[0]) * _Intensity); + return 1-(1-toBlend)*(1-tex2D(_ColorBuffer, i.uv[1])); + } + + half4 fragAdd (v2f i) : SV_Target { + return tex2D(_MainTex, i.uv[0].xy) * _Intensity + tex2D(_ColorBuffer, i.uv[1]); + } + + half4 fragVignetteBlend (v2f i) : SV_Target { + return tex2D(_MainTex, i.uv[0].xy) * tex2D(_ColorBuffer, i.uv[0]); + } + + half4 fragMultiTap (v2f_mt i) : SV_Target { + half4 outColor = tex2D(_MainTex, i.uv[0].xy); + outColor += tex2D(_MainTex, i.uv[1].xy); + outColor += tex2D(_MainTex, i.uv[2].xy); + outColor += tex2D(_MainTex, i.uv[3].xy); + return outColor * 0.25; + } + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + + // 0: nicer & softer "screen" blend mode + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragScreen + ENDCG + } + + // 1: simple "add" blend mode + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAdd + ENDCG + } + // 2: used for "stable" downsampling + Pass { + + CGPROGRAM + #pragma vertex vertMultiTap + #pragma fragment fragMultiTap + ENDCG + } + // 3: vignette blending + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragVignetteBlend + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader.meta new file mode 100644 index 0000000..ce84a98 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/Blend.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 53b3960ee3d3d4a5caa8d5473d120187 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader new file mode 100644 index 0000000..fbcdbd9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader @@ -0,0 +1,222 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BlendForBloom" { + Properties { + _MainTex ("Screen Blended", 2D) = "" {} + _ColorBuffer ("Color", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[2] : TEXCOORD0; + }; + struct v2f_mt { + float4 pos : SV_POSITION; + float2 uv[5] : TEXCOORD0; + }; + + sampler2D _ColorBuffer; + sampler2D _MainTex; + + half _Intensity; + half4 _ColorBuffer_TexelSize; + half4 _MainTex_TexelSize; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_ColorBuffer_TexelSize.y < 0) + o.uv[1].y = 1-o.uv[1].y; + #endif + + return o; + } + + v2f_mt vertMultiTap( appdata_img v ) { + v2f_mt o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[4] = v.texcoord.xy; + o.uv[0] = v.texcoord.xy + _MainTex_TexelSize.xy * 0.5; + o.uv[1] = v.texcoord.xy - _MainTex_TexelSize.xy * 0.5; + o.uv[2] = v.texcoord.xy - _MainTex_TexelSize.xy * half2(1,-1) * 0.5; + o.uv[3] = v.texcoord.xy + _MainTex_TexelSize.xy * half2(1,-1) * 0.5; + return o; + } + + half4 fragScreen (v2f i) : SV_Target { + half4 addedbloom = tex2D(_MainTex, i.uv[0].xy) * _Intensity; + half4 screencolor = tex2D(_ColorBuffer, i.uv[1]); + return 1-(1-addedbloom)*(1-screencolor); + } + + half4 fragScreenCheap(v2f i) : SV_Target { + half4 addedbloom = tex2D(_MainTex, i.uv[0].xy) * _Intensity; + half4 screencolor = tex2D(_ColorBuffer, i.uv[1]); + return 1-(1-addedbloom)*(1-screencolor); + } + + half4 fragAdd (v2f i) : SV_Target { + half4 addedbloom = tex2D(_MainTex, i.uv[0].xy); + half4 screencolor = tex2D(_ColorBuffer, i.uv[1]); + return _Intensity * addedbloom + screencolor; + } + + half4 fragAddCheap (v2f i) : SV_Target { + half4 addedbloom = tex2D(_MainTex, i.uv[0].xy); + half4 screencolor = tex2D(_ColorBuffer, i.uv[1]); + return _Intensity * addedbloom + screencolor; + } + + half4 fragVignetteMul (v2f i) : SV_Target { + return tex2D(_MainTex, i.uv[0].xy) * tex2D(_ColorBuffer, i.uv[0]); + } + + half4 fragVignetteBlend (v2f i) : SV_Target { + return half4(1,1,1, tex2D(_ColorBuffer, i.uv[0]).r); + } + + half4 fragClear (v2f i) : SV_Target { + return 0; + } + + half4 fragAddOneOne (v2f i) : SV_Target { + half4 addedColors = tex2D(_MainTex, i.uv[0].xy); + return addedColors * _Intensity; + } + + half4 frag1Tap (v2f i) : SV_Target { + return tex2D(_MainTex, i.uv[0].xy); + } + + half4 fragMultiTapMax (v2f_mt i) : SV_Target { + half4 outColor = tex2D(_MainTex, i.uv[4].xy); + outColor = max(outColor, tex2D(_MainTex, i.uv[0].xy)); + outColor = max(outColor, tex2D(_MainTex, i.uv[1].xy)); + outColor = max(outColor, tex2D(_MainTex, i.uv[2].xy)); + outColor = max(outColor, tex2D(_MainTex, i.uv[3].xy)); + return outColor; + } + + half4 fragMultiTapBlur (v2f_mt i) : SV_Target { + half4 outColor = 0; + outColor += tex2D(_MainTex, i.uv[0].xy); + outColor += tex2D(_MainTex, i.uv[1].xy); + outColor += tex2D(_MainTex, i.uv[2].xy); + outColor += tex2D(_MainTex, i.uv[3].xy); + return outColor/4; + } + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + + // 0: nicer & softer "screen" blend mode + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragScreen + ENDCG + } + + // 1: "add" blend mode + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAdd + ENDCG + } + // 2: several taps, maxxed + Pass { + + CGPROGRAM + #pragma vertex vertMultiTap + #pragma fragment fragMultiTapMax + ENDCG + } + // 3: vignette blending + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragVignetteMul + ENDCG + } + // 4: nicer & softer "screen" blend mode(cheapest) + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragScreenCheap + ENDCG + } + // 5: "add" blend mode (cheapest) + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAddCheap + ENDCG + } + // 6: used for "stable" downsampling (blur) + Pass { + + CGPROGRAM + #pragma vertex vertMultiTap + #pragma fragment fragMultiTapBlur + ENDCG + } + // 7: vignette blending (blend to dest) + Pass { + + Blend Zero SrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragVignetteBlend + ENDCG + } + // 8: clear + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragClear + ENDCG + } + // 9: fragAddOneOne + Pass { + + Blend One One + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAddOneOne + ENDCG + } + // 10: max blend + Pass { + + BlendOp Max + Blend One One + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag1Tap + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader.meta new file mode 100644 index 0000000..20bc416 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendForBloom.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 7856cbff0a0ca45c787d5431eb805bb0 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader new file mode 100644 index 0000000..a100015 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader @@ -0,0 +1,50 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BlendOneOne" { + Properties { + _MainTex ("-", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + half _Intensity; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + half4 frag(v2f i) : SV_Target { + return tex2D(_MainTex, i.uv) * _Intensity; + } + + ENDCG + +Subshader { + + Pass { + BlendOp Add + Blend One One + + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader.meta new file mode 100644 index 0000000..8bc33e9 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlendOneOne.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f7898d203e9b94c0dbe2bf9dd5cb32c0 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader new file mode 100644 index 0000000..6e799d1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader @@ -0,0 +1,204 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BlurAndFlares" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + _NonBlurredTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + struct v2f_opts { + half4 pos : SV_POSITION; + half2 uv[7] : TEXCOORD0; + }; + + struct v2f_blur { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 uv01 : TEXCOORD1; + half4 uv23 : TEXCOORD2; + half4 uv45 : TEXCOORD3; + half4 uv67 : TEXCOORD4; + }; + + half4 _Offsets; + half4 _TintColor; + + half _StretchWidth; + half2 _Threshhold; + half _Saturation; + + half4 _MainTex_TexelSize; + + sampler2D _MainTex; + sampler2D _NonBlurredTex; + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + v2f_blur vertWithMultiCoords2 (appdata_img v) { + v2f_blur o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + o.uv01 = v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1); + o.uv23 = v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 2.0; + o.uv45 = v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 3.0; + o.uv67 = v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 4.0; + o.uv67 = v.texcoord.xyxy + _Offsets.xyxy * half4(1,1, -1,-1) * 5.0; + return o; + } + + v2f_opts vertStretch (appdata_img v) { + v2f_opts o; + o.pos = UnityObjectToClipPos(v.vertex); + half b = _StretchWidth; + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy + b * 2.0 * _Offsets.xy; + o.uv[2] = v.texcoord.xy - b * 2.0 * _Offsets.xy; + o.uv[3] = v.texcoord.xy + b * 4.0 * _Offsets.xy; + o.uv[4] = v.texcoord.xy - b * 4.0 * _Offsets.xy; + o.uv[5] = v.texcoord.xy + b * 6.0 * _Offsets.xy; + o.uv[6] = v.texcoord.xy - b * 6.0 * _Offsets.xy; + return o; + } + + v2f_opts vertWithMultiCoords (appdata_img v) { + v2f_opts o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy + 0.5 * _MainTex_TexelSize.xy * _Offsets.xy; + o.uv[2] = v.texcoord.xy - 0.5 * _MainTex_TexelSize.xy * _Offsets.xy; + o.uv[3] = v.texcoord.xy + 1.5 * _MainTex_TexelSize.xy * _Offsets.xy; + o.uv[4] = v.texcoord.xy - 1.5 * _MainTex_TexelSize.xy * _Offsets.xy; + o.uv[5] = v.texcoord.xy + 2.5 * _MainTex_TexelSize.xy * _Offsets.xy; + o.uv[6] = v.texcoord.xy - 2.5 * _MainTex_TexelSize.xy * _Offsets.xy; + return o; + } + + half4 fragPostNoBlur (v2f i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv); + return color * 1.0/(1.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy + } + + half4 fragGaussBlur (v2f_blur i) : SV_Target { + half4 color = half4 (0,0,0,0); + color += 0.225 * tex2D (_MainTex, i.uv); + color += 0.150 * tex2D (_MainTex, i.uv01.xy); + color += 0.150 * tex2D (_MainTex, i.uv01.zw); + color += 0.110 * tex2D (_MainTex, i.uv23.xy); + color += 0.110 * tex2D (_MainTex, i.uv23.zw); + color += 0.075 * tex2D (_MainTex, i.uv45.xy); + color += 0.075 * tex2D (_MainTex, i.uv45.zw); + color += 0.0525 * tex2D (_MainTex, i.uv67.xy); + color += 0.0525 * tex2D (_MainTex, i.uv67.zw); + return color; + } + + half4 fragPreAndCut (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color += tex2D (_MainTex, i.uv[1]); + color += tex2D (_MainTex, i.uv[2]); + color += tex2D (_MainTex, i.uv[3]); + color += tex2D (_MainTex, i.uv[4]); + color += tex2D (_MainTex, i.uv[5]); + color += tex2D (_MainTex, i.uv[6]); + color = max(color / 7.0 - _Threshhold.xxxx, float4(0,0,0,0)); + half lum = Luminance(color.rgb); + color.rgb = lerp(half3(lum,lum,lum), color.rgb, _Saturation) * _TintColor.rgb; + return color; + } + + half4 fragStretch (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color = max (color, tex2D (_MainTex, i.uv[1])); + color = max (color, tex2D (_MainTex, i.uv[2])); + color = max (color, tex2D (_MainTex, i.uv[3])); + color = max (color, tex2D (_MainTex, i.uv[4])); + color = max (color, tex2D (_MainTex, i.uv[5])); + color = max (color, tex2D (_MainTex, i.uv[6])); + return color; + } + + half4 fragPost (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color += tex2D (_MainTex, i.uv[1]); + color += tex2D (_MainTex, i.uv[2]); + color += tex2D (_MainTex, i.uv[3]); + color += tex2D (_MainTex, i.uv[4]); + color += tex2D (_MainTex, i.uv[5]); + color += tex2D (_MainTex, i.uv[6]); + return color * 1.0/(7.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy + } + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragPostNoBlur + + ENDCG + } + + Pass { + + CGPROGRAM + + #pragma vertex vertStretch + #pragma fragment fragStretch + + ENDCG + } + + // 2 + Pass { + + CGPROGRAM + + #pragma vertex vertWithMultiCoords + #pragma fragment fragPreAndCut + + ENDCG + } + + // 3 + Pass { + + CGPROGRAM + + #pragma vertex vertWithMultiCoords + #pragma fragment fragPost + + ENDCG + } + // 4 + Pass { + + CGPROGRAM + + #pragma vertex vertWithMultiCoords2 + #pragma fragment fragGaussBlur + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta new file mode 100644 index 0000000..3b0d2ff --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: be6e39cf196f146d5be72fbefb18ed75 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader new file mode 100644 index 0000000..323dfc1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader @@ -0,0 +1,59 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BrightPassFilterForBloom" +{ + Properties + { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + + half4 threshhold; + half useSrcAlphaAsMask; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + half4 frag(v2f i) : SV_Target + { + half4 color = tex2D(_MainTex, i.uv); + //color = color * saturate((color-threshhold.x) * 75.0); // didn't go well with HDR and din't make sense + color = color * lerp(1.0, color.a, useSrcAlphaAsMask); + color = max(half4(0,0,0,0), color-threshhold.x); + return color; + } + + ENDCG + + Subshader + { + Pass + { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + ENDCG + } + } + Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta new file mode 100644 index 0000000..f65c903 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 186c4c0d31e314f049595dcbaf4ca129 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader new file mode 100644 index 0000000..445f420 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader @@ -0,0 +1,76 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/BrightPassFilter2" +{ + Properties + { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + + half4 _Threshhold; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + half4 fragScalarThresh(v2f i) : SV_Target + { + half4 color = tex2D(_MainTex, i.uv); + color.rgb = color.rgb; + color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.xxx); + return color; + } + + half4 fragColorThresh(v2f i) : SV_Target + { + half4 color = tex2D(_MainTex, i.uv); + color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.rgb); + return color; + } + + ENDCG + + Subshader + { + Pass + { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragScalarThresh + + ENDCG + } + + Pass + { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragColorThresh + + ENDCG + } + } + Fallback off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta new file mode 100644 index 0000000..dc6e446 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader new file mode 100644 index 0000000..e4e62c1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader @@ -0,0 +1,62 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/LensFlareCreate" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv[4] : TEXCOORD0; + }; + + fixed4 colorA; + fixed4 colorB; + fixed4 colorC; + fixed4 colorD; + + sampler2D _MainTex; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv[0] = ( ( v.texcoord.xy - 0.5 ) * -0.85 ) + 0.5; + o.uv[1] = ( ( v.texcoord.xy - 0.5 ) * -1.45 ) + 0.5; + o.uv[2] = ( ( v.texcoord.xy - 0.5 ) * -2.55 ) + 0.5; + o.uv[3] = ( ( v.texcoord.xy - 0.5 ) * -4.15 ) + 0.5; + return o; + } + + fixed4 frag(v2f i) : SV_Target { + fixed4 color = float4 (0,0,0,0); + color += tex2D(_MainTex, i.uv[0] ) * colorA; + color += tex2D(_MainTex, i.uv[1] ) * colorB; + color += tex2D(_MainTex, i.uv[2] ) * colorC; + color += tex2D(_MainTex, i.uv[3] ) * colorD; + return color; + } + + ENDCG + +Subshader { + Blend One One + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta new file mode 100644 index 0000000..786962b --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 459fe69d2f6d74ddb92f04dbf45a866b +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader new file mode 100644 index 0000000..e482878 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader @@ -0,0 +1,294 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/FastBloom" { + Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _Bloom ("Bloom (RGB)", 2D) = "black" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _Bloom; + + uniform half4 _MainTex_TexelSize; + + uniform half4 _Parameter; + uniform half4 _OffsetsA; + uniform half4 _OffsetsB; + + #define ONE_MINUS_THRESHHOLD_TIMES_INTENSITY _Parameter.w + #define THRESHHOLD _Parameter.z + + struct v2f_simple + { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + + #if UNITY_UV_STARTS_AT_TOP + half2 uv2 : TEXCOORD1; + #endif + }; + + v2f_simple vertBloom ( appdata_img v ) + { + v2f_simple o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord; + + #if UNITY_UV_STARTS_AT_TOP + o.uv2 = v.texcoord; + if (_MainTex_TexelSize.y < 0.0) + o.uv.y = 1.0 - o.uv.y; + #endif + + return o; + } + + struct v2f_tap + { + float4 pos : SV_POSITION; + half2 uv20 : TEXCOORD0; + half2 uv21 : TEXCOORD1; + half2 uv22 : TEXCOORD2; + half2 uv23 : TEXCOORD3; + }; + + v2f_tap vert4Tap ( appdata_img v ) + { + v2f_tap o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv20 = v.texcoord + _MainTex_TexelSize.xy; + o.uv21 = v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,-0.5h); + o.uv22 = v.texcoord + _MainTex_TexelSize.xy * half2(0.5h,-0.5h); + o.uv23 = v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,0.5h); + + return o; + } + + fixed4 fragBloom ( v2f_simple i ) : SV_Target + { + #if UNITY_UV_STARTS_AT_TOP + + fixed4 color = tex2D(_MainTex, i.uv); + return color + tex2D(_Bloom, i.uv2); + + #else + + fixed4 color = tex2D(_MainTex, i.uv); + return color + tex2D(_Bloom, i.uv); + + #endif + } + + fixed4 fragDownsample ( v2f_tap i ) : SV_Target + { + fixed4 color = tex2D (_MainTex, i.uv20); + color += tex2D (_MainTex, i.uv21); + color += tex2D (_MainTex, i.uv22); + color += tex2D (_MainTex, i.uv23); + return max(color/4 - THRESHHOLD, 0) * ONE_MINUS_THRESHHOLD_TIMES_INTENSITY; + } + + // weight curves + + static const half curve[7] = { 0.0205, 0.0855, 0.232, 0.324, 0.232, 0.0855, 0.0205 }; // gauss'ish blur weights + + static const half4 curve4[7] = { half4(0.0205,0.0205,0.0205,0), half4(0.0855,0.0855,0.0855,0), half4(0.232,0.232,0.232,0), + half4(0.324,0.324,0.324,1), half4(0.232,0.232,0.232,0), half4(0.0855,0.0855,0.0855,0), half4(0.0205,0.0205,0.0205,0) }; + + struct v2f_withBlurCoords8 + { + float4 pos : SV_POSITION; + half4 uv : TEXCOORD0; + half2 offs : TEXCOORD1; + }; + + struct v2f_withBlurCoordsSGX + { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 offs[3] : TEXCOORD1; + }; + + v2f_withBlurCoords8 vertBlurHorizontal (appdata_img v) + { + v2f_withBlurCoords8 o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + o.offs = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; + + return o; + } + + v2f_withBlurCoords8 vertBlurVertical (appdata_img v) + { + v2f_withBlurCoords8 o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + o.offs = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; + + return o; + } + + half4 fragBlur8 ( v2f_withBlurCoords8 i ) : SV_Target + { + half2 uv = i.uv.xy; + half2 netFilterWidth = i.offs; + half2 coords = uv - netFilterWidth * 3.0; + + half4 color = 0; + for( int l = 0; l < 7; l++ ) + { + half4 tap = tex2D(_MainTex, coords); + color += tap * curve4[l]; + coords += netFilterWidth; + } + return color; + } + + + v2f_withBlurCoordsSGX vertBlurHorizontalSGX (appdata_img v) + { + v2f_withBlurCoordsSGX o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = v.texcoord.xy; + half2 netFilterWidth = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; + half4 coords = -netFilterWidth.xyxy * 3.0; + + o.offs[0] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[1] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[2] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + + return o; + } + + v2f_withBlurCoordsSGX vertBlurVerticalSGX (appdata_img v) + { + v2f_withBlurCoordsSGX o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + half2 netFilterWidth = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; + half4 coords = -netFilterWidth.xyxy * 3.0; + + o.offs[0] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[1] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[2] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + + return o; + } + + half4 fragBlurSGX ( v2f_withBlurCoordsSGX i ) : SV_Target + { + half2 uv = i.uv.xy; + + half4 color = tex2D(_MainTex, i.uv) * curve4[3]; + + for( int l = 0; l < 3; l++ ) + { + half4 tapA = tex2D(_MainTex, i.offs[l].xy); + half4 tapB = tex2D(_MainTex, i.offs[l].zw); + color += (tapA + tapB) * curve4[l]; + } + + return color; + + } + + ENDCG + + SubShader { + ZTest Off Cull Off ZWrite Off Blend Off + + // 0 + Pass { + + CGPROGRAM + #pragma vertex vertBloom + #pragma fragment fragBloom + + ENDCG + + } + + // 1 + Pass { + + CGPROGRAM + + #pragma vertex vert4Tap + #pragma fragment fragDownsample + + ENDCG + + } + + // 2 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurVertical + #pragma fragment fragBlur8 + + ENDCG + } + + // 3 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurHorizontal + #pragma fragment fragBlur8 + + ENDCG + } + + // alternate blur + // 4 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurVerticalSGX + #pragma fragment fragBlurSGX + + ENDCG + } + + // 5 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurHorizontalSGX + #pragma fragment fragBlurSGX + + ENDCG + } + } + + FallBack Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader.meta new file mode 100644 index 0000000..0757c10 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBloom.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 68a00c837b82e4c6d92e7da765dc5f1d +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader new file mode 100644 index 0000000..60f1d58 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader @@ -0,0 +1,236 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "Hidden/FastBlur" { + Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _Bloom ("Bloom (RGB)", 2D) = "black" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _Bloom; + + uniform half4 _MainTex_TexelSize; + uniform half4 _Parameter; + + struct v2f_tap + { + float4 pos : SV_POSITION; + half2 uv20 : TEXCOORD0; + half2 uv21 : TEXCOORD1; + half2 uv22 : TEXCOORD2; + half2 uv23 : TEXCOORD3; + }; + + v2f_tap vert4Tap ( appdata_img v ) + { + v2f_tap o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv20 = v.texcoord + _MainTex_TexelSize.xy; + o.uv21 = v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,-0.5h); + o.uv22 = v.texcoord + _MainTex_TexelSize.xy * half2(0.5h,-0.5h); + o.uv23 = v.texcoord + _MainTex_TexelSize.xy * half2(-0.5h,0.5h); + + return o; + } + + fixed4 fragDownsample ( v2f_tap i ) : SV_Target + { + fixed4 color = tex2D (_MainTex, i.uv20); + color += tex2D (_MainTex, i.uv21); + color += tex2D (_MainTex, i.uv22); + color += tex2D (_MainTex, i.uv23); + return color / 4; + } + + // weight curves + + static const half curve[7] = { 0.0205, 0.0855, 0.232, 0.324, 0.232, 0.0855, 0.0205 }; // gauss'ish blur weights + + static const half4 curve4[7] = { half4(0.0205,0.0205,0.0205,0), half4(0.0855,0.0855,0.0855,0), half4(0.232,0.232,0.232,0), + half4(0.324,0.324,0.324,1), half4(0.232,0.232,0.232,0), half4(0.0855,0.0855,0.0855,0), half4(0.0205,0.0205,0.0205,0) }; + + struct v2f_withBlurCoords8 + { + float4 pos : SV_POSITION; + half4 uv : TEXCOORD0; + half2 offs : TEXCOORD1; + }; + + struct v2f_withBlurCoordsSGX + { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 offs[3] : TEXCOORD1; + }; + + v2f_withBlurCoords8 vertBlurHorizontal (appdata_img v) + { + v2f_withBlurCoords8 o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + o.offs = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; + + return o; + } + + v2f_withBlurCoords8 vertBlurVertical (appdata_img v) + { + v2f_withBlurCoords8 o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + o.offs = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; + + return o; + } + + half4 fragBlur8 ( v2f_withBlurCoords8 i ) : SV_Target + { + half2 uv = i.uv.xy; + half2 netFilterWidth = i.offs; + half2 coords = uv - netFilterWidth * 3.0; + + half4 color = 0; + for( int l = 0; l < 7; l++ ) + { + half4 tap = tex2D(_MainTex, coords); + color += tap * curve4[l]; + coords += netFilterWidth; + } + return color; + } + + + v2f_withBlurCoordsSGX vertBlurHorizontalSGX (appdata_img v) + { + v2f_withBlurCoordsSGX o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = v.texcoord.xy; + half2 netFilterWidth = _MainTex_TexelSize.xy * half2(1.0, 0.0) * _Parameter.x; + half4 coords = -netFilterWidth.xyxy * 3.0; + + o.offs[0] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[1] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[2] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + + return o; + } + + v2f_withBlurCoordsSGX vertBlurVerticalSGX (appdata_img v) + { + v2f_withBlurCoordsSGX o; + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = half4(v.texcoord.xy,1,1); + half2 netFilterWidth = _MainTex_TexelSize.xy * half2(0.0, 1.0) * _Parameter.x; + half4 coords = -netFilterWidth.xyxy * 3.0; + + o.offs[0] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[1] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + coords += netFilterWidth.xyxy; + o.offs[2] = v.texcoord.xyxy + coords * half4(1.0h,1.0h,-1.0h,-1.0h); + + return o; + } + + half4 fragBlurSGX ( v2f_withBlurCoordsSGX i ) : SV_Target + { + half2 uv = i.uv.xy; + + half4 color = tex2D(_MainTex, i.uv) * curve4[3]; + + for( int l = 0; l < 3; l++ ) + { + half4 tapA = tex2D(_MainTex, i.offs[l].xy); + half4 tapB = tex2D(_MainTex, i.offs[l].zw); + color += (tapA + tapB) * curve4[l]; + } + + return color; + + } + + ENDCG + + SubShader { + ZTest Off Cull Off ZWrite Off Blend Off + + // 0 + Pass { + + CGPROGRAM + + #pragma vertex vert4Tap + #pragma fragment fragDownsample + + ENDCG + + } + + // 1 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurVertical + #pragma fragment fragBlur8 + + ENDCG + } + + // 2 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurHorizontal + #pragma fragment fragBlur8 + + ENDCG + } + + // alternate blur + // 3 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurVerticalSGX + #pragma fragment fragBlurSGX + + ENDCG + } + + // 4 + Pass { + ZTest Always + Cull Off + + CGPROGRAM + + #pragma vertex vertBlurHorizontalSGX + #pragma fragment fragBlurSGX + + ENDCG + } + } + + FallBack Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader.meta new file mode 100644 index 0000000..952c297 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MobileBlur.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f9d5fa183cd6b45eeb1491f74863cd91 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader new file mode 100644 index 0000000..9c907f0 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader @@ -0,0 +1,156 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/MultipassHollywoodFlares" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + _NonBlurredTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + struct v2f_opts { + half4 pos : SV_POSITION; + half2 uv[7] : TEXCOORD0; + }; + + half4 offsets; + half4 tintColor; + + half stretchWidth; + half2 _Threshhold; + + half4 _MainTex_TexelSize; + + sampler2D _MainTex; + sampler2D _NonBlurredTex; + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord.xy; + return o; + } + + v2f_opts vertStretch (appdata_img v) { + v2f_opts o; + o.pos = UnityObjectToClipPos(v.vertex); + half b = stretchWidth; + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy + b * 2.0 * offsets.xy; + o.uv[2] = v.texcoord.xy - b * 2.0 * offsets.xy; + o.uv[3] = v.texcoord.xy + b * 4.0 * offsets.xy; + o.uv[4] = v.texcoord.xy - b * 4.0 * offsets.xy; + o.uv[5] = v.texcoord.xy + b * 6.0 * offsets.xy; + o.uv[6] = v.texcoord.xy - b * 6.0 * offsets.xy; + return o; + } + + v2f_opts vertVerticalCoords (appdata_img v) { + v2f_opts o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv[0] = v.texcoord.xy; + o.uv[1] = v.texcoord.xy + 0.5 * _MainTex_TexelSize.xy * half2(0,1); + o.uv[2] = v.texcoord.xy - 0.5 * _MainTex_TexelSize.xy * half2(0,1); + o.uv[3] = v.texcoord.xy + 1.5 * _MainTex_TexelSize.xy * half2(0,1); + o.uv[4] = v.texcoord.xy - 1.5 * _MainTex_TexelSize.xy * half2(0,1); + o.uv[5] = v.texcoord.xy + 2.5 * _MainTex_TexelSize.xy * half2(0,1); + o.uv[6] = v.texcoord.xy - 2.5 * _MainTex_TexelSize.xy * half2(0,1); + return o; + } + + // deprecated + half4 fragPrepare (v2f i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv); + half4 colorNb = tex2D (_NonBlurredTex, i.uv); + return color * tintColor * 0.5 + colorNb * normalize (tintColor) * 0.5; + } + + + half4 fragPreAndCut (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color += tex2D (_MainTex, i.uv[1]); + color += tex2D (_MainTex, i.uv[2]); + color += tex2D (_MainTex, i.uv[3]); + color += tex2D (_MainTex, i.uv[4]); + color += tex2D (_MainTex, i.uv[5]); + color += tex2D (_MainTex, i.uv[6]); + return max(color / 7.0 - _Threshhold.x, 0.0) * _Threshhold.y * tintColor; + } + + half4 fragStretch (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color = max (color, tex2D (_MainTex, i.uv[1])); + color = max (color, tex2D (_MainTex, i.uv[2])); + color = max (color, tex2D (_MainTex, i.uv[3])); + color = max (color, tex2D (_MainTex, i.uv[4])); + color = max (color, tex2D (_MainTex, i.uv[5])); + color = max (color, tex2D (_MainTex, i.uv[6])); + return color; + } + + half4 fragPost (v2f_opts i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv[0]); + color += tex2D (_MainTex, i.uv[1]); + color += tex2D (_MainTex, i.uv[2]); + color += tex2D (_MainTex, i.uv[3]); + color += tex2D (_MainTex, i.uv[4]); + color += tex2D (_MainTex, i.uv[5]); + color += tex2D (_MainTex, i.uv[6]); + return color * 1.0/(7.0 + Luminance(color.rgb) + 0.5); // this also makes it a little noisy + } + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragPrepare + + ENDCG + } + + Pass { + + CGPROGRAM + + #pragma vertex vertStretch + #pragma fragment fragStretch + + ENDCG + } + + Pass { + + CGPROGRAM + + #pragma vertex vertVerticalCoords + #pragma fragment fragPreAndCut + + ENDCG + } + + Pass { + + CGPROGRAM + + #pragma vertex vertVerticalCoords + #pragma fragment fragPost + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta new file mode 100644 index 0000000..02a653f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e2baf3cae8edc4daf94c9adc2154be00 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader new file mode 100644 index 0000000..f190e40 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader @@ -0,0 +1,71 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/SeparableBlurPlus" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 uv01 : TEXCOORD1; + half4 uv23 : TEXCOORD2; + half4 uv45 : TEXCOORD3; + half4 uv67 : TEXCOORD4; + }; + + half4 offsets; + + sampler2D _MainTex; + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv.xy = v.texcoord.xy; + + o.uv01 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1); + o.uv23 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 2.0; + o.uv45 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 3.0; + o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 4.5; + o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 6.5; + + return o; + } + + half4 frag (v2f i) : SV_Target { + half4 color = half4 (0,0,0,0); + + color += 0.225 * tex2D (_MainTex, i.uv); + color += 0.150 * tex2D (_MainTex, i.uv01.xy); + color += 0.150 * tex2D (_MainTex, i.uv01.zw); + color += 0.110 * tex2D (_MainTex, i.uv23.xy); + color += 0.110 * tex2D (_MainTex, i.uv23.zw); + color += 0.075 * tex2D (_MainTex, i.uv45.xy); + color += 0.075 * tex2D (_MainTex, i.uv45.zw); + color += 0.0525 * tex2D (_MainTex, i.uv67.xy); + color += 0.0525 * tex2D (_MainTex, i.uv67.zw); + + return color; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta new file mode 100644 index 0000000..ce96419 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: a9df009a214e24a5ebbf271595f8d5b6 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader new file mode 100644 index 0000000..cf3624f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader @@ -0,0 +1,59 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/VignetteShader" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + + float4 _MainTex_TexelSize; + float vignetteIntensity; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv = v.texcoord.xy; + return o; + } + + half4 frag(v2f i) : SV_Target { + half2 coords = i.uv; + half2 uv = i.uv; + + coords = (coords - 0.5) * 2.0; + half coordDot = dot (coords,coords); + half4 color = tex2D (_MainTex, uv); + + float mask = 1.0 - coordDot * vignetteIntensity; + return color * mask; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader.meta new file mode 100644 index 0000000..f41ffea --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_BloomAndFlares/VignetteShader.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 562f620336e024ac99992ff05725a89a +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField.meta new file mode 100644 index 0000000..10b1b71 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d9cccf980fcb7441d85b8b3b5c2d2c34 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader new file mode 100644 index 0000000..b691a11 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader @@ -0,0 +1,78 @@ + +Shader "Hidden/Dof/Bokeh34" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _Source ("Base (RGB)", 2D) = "black" {} +} + +SubShader { + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _Source; + + uniform half4 _ArScale; + uniform half _Intensity; + uniform half4 _Source_TexelSize; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv2 : TEXCOORD0; + half4 source : TEXCOORD1; + }; + + #define COC bokeh.a + + v2f vert (appdata_full v) + { + v2f o; + + o.pos = v.vertex; + + o.uv2.xy = v.texcoord.xy;// * 2.0; <- needed when using Triangles.js and not Quads.js + + #if UNITY_UV_STARTS_AT_TOP + float4 bokeh = tex2Dlod (_Source, half4 (v.texcoord1.xy * half2(1,-1) + half2(0,1), 0, 0)); + #else + float4 bokeh = tex2Dlod (_Source, half4 (v.texcoord1.xy, 0, 0)); + #endif + + o.source = bokeh; + + o.pos.xy += (v.texcoord.xy * 2.0 - 1.0) * _ArScale.xy * COC;// + _ArScale.zw * coc; + o.source.rgb *= _Intensity; + + return o; + } + + + half4 frag (v2f i) : SV_Target + { + half4 color = tex2D (_MainTex, i.uv2.xy); + color.rgb *= i.source.rgb; + color.a *= Luminance(i.source.rgb*0.25); + return color; + } + + ENDCG + + Pass { + Blend OneMinusDstColor One + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment frag + + ENDCG + } + +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader.meta new file mode 100644 index 0000000..da48e98 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/Bokeh34.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 57cdacf9b217546aaa18edf39a6151c0 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader new file mode 100644 index 0000000..626aa86 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader @@ -0,0 +1,488 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + Shader "Hidden/Dof/DepthOfField34" { + Properties { + _MainTex ("Base", 2D) = "" {} + _TapLowBackground ("TapLowBackground", 2D) = "" {} + _TapLowForeground ("TapLowForeground", 2D) = "" {} + _TapMedium ("TapMedium", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + half4 pos : SV_POSITION; + half2 uv1 : TEXCOORD0; + }; + + struct v2fDofApply { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + struct v2fRadius { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 uv1[4] : TEXCOORD1; + }; + + struct v2fDown { + half4 pos : SV_POSITION; + half2 uv0 : TEXCOORD0; + half2 uv[2] : TEXCOORD1; + }; + + sampler2D _MainTex; + sampler2D_float _CameraDepthTexture; + sampler2D _TapLowBackground; + sampler2D _TapLowForeground; + sampler2D _TapMedium; + + half4 _CurveParams; + half _ForegroundBlurExtrude; + uniform half3 _Threshhold; + uniform float4 _MainTex_TexelSize; + uniform float2 _InvRenderTargetSize; + + v2f vert( appdata_img v ) { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv1.xy = v.texcoord.xy; + return o; + } + + v2fRadius vertWithRadius( appdata_img v ) { + v2fRadius o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + + const half2 blurOffsets[4] = { + half2(-0.5, +1.5), + half2(+0.5, -1.5), + half2(+1.5, +0.5), + half2(-1.5, -0.5) + }; + + o.uv1[0].xy = v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[0]; + o.uv1[1].xy = v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[1]; + o.uv1[2].xy = v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[2]; + o.uv1[3].xy = v.texcoord.xy + 5.0 * _MainTex_TexelSize.xy * blurOffsets[3]; + + o.uv1[0].zw = v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[0]; + o.uv1[1].zw = v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[1]; + o.uv1[2].zw = v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[2]; + o.uv1[3].zw = v.texcoord.xy + 3.0 * _MainTex_TexelSize.xy * blurOffsets[3]; + + return o; + } + + v2fDofApply vertDofApply( appdata_img v ) { + v2fDofApply o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + return o; + } + + v2fDown vertDownsampleWithCocConserve(appdata_img v) { + v2fDown o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv0.xy = v.texcoord.xy; + o.uv[0].xy = v.texcoord.xy + half2(-1.0,-1.0) * _InvRenderTargetSize; + o.uv[1].xy = v.texcoord.xy + half2(1.0,-1.0) * _InvRenderTargetSize; + return o; + } + + half4 BokehPrereqs (sampler2D tex, half4 uv1[4], half4 center, half considerCoc) { + + // @NOTE 1: + // we are checking for 3 things in order to create a bokeh. + // goal is to get the highest bang for the buck. + // 1.) contrast/frequency should be very high (otherwise bokeh mostly unvisible) + // 2.) luminance should be high + // 3.) no occluder nearby (stored in alpha channel) + + // @NOTE 2: about the alpha channel in littleBlur: + // the alpha channel stores an heuristic on how likely it is + // that there is no bokeh occluder nearby. + // if we didn't' check for that, we'd get very noise bokeh + // popping because of the sudden contrast changes + + half4 sampleA = tex2D(tex, uv1[0].zw); + half4 sampleB = tex2D(tex, uv1[1].zw); + half4 sampleC = tex2D(tex, uv1[2].zw); + half4 sampleD = tex2D(tex, uv1[3].zw); + + half4 littleBlur = 0.125 * (sampleA + sampleB + sampleC + sampleD); + + sampleA = tex2D(tex, uv1[0].xy); + sampleB = tex2D(tex, uv1[1].xy); + sampleC = tex2D(tex, uv1[2].xy); + sampleD = tex2D(tex, uv1[3].xy); + + littleBlur += 0.125 * (sampleA + sampleB + sampleC + sampleD); + + littleBlur = lerp (littleBlur, center, saturate(100.0 * considerCoc * abs(littleBlur.a - center.a))); + + return littleBlur; + } + + half4 fragDownsampleWithCocConserve(v2fDown i) : SV_Target { + half2 rowOfs[4]; + + rowOfs[0] = half2(0.0, 0.0); + rowOfs[1] = half2(0.0, _InvRenderTargetSize.y); + rowOfs[2] = half2(0.0, _InvRenderTargetSize.y) * 2.0; + rowOfs[3] = half2(0.0, _InvRenderTargetSize.y) * 3.0; + + half4 color = tex2D(_MainTex, i.uv0.xy); + + half4 sampleA = tex2D(_MainTex, i.uv[0].xy + rowOfs[0]); + half4 sampleB = tex2D(_MainTex, i.uv[1].xy + rowOfs[0]); + half4 sampleC = tex2D(_MainTex, i.uv[0].xy + rowOfs[2]); + half4 sampleD = tex2D(_MainTex, i.uv[1].xy + rowOfs[2]); + + color += sampleA + sampleB + sampleC + sampleD; + color *= 0.2; + + // @NOTE we are doing max on the alpha channel for 2 reasons: + // 1) foreground blur likes a slightly bigger radius + // 2) otherwise we get an ugly outline between high blur- and medium blur-areas + // drawback: we get a little bit of color bleeding + + color.a = max(max(sampleA.a, sampleB.a), max(sampleC.a, sampleD.a)); + + return color; + } + + half4 fragDofApplyBg (v2fDofApply i) : SV_Target { + half4 tapHigh = tex2D (_MainTex, i.uv.xy); + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + i.uv.xy = i.uv.xy * half2(1,-1)+half2(0,1); + #endif + + half4 tapLow = tex2D (_TapLowBackground, i.uv.xy); // already mixed with medium blur + tapHigh = lerp (tapHigh, tapLow, tapHigh.a); + return tapHigh; + } + + half4 fragDofApplyBgDebug (v2fDofApply i) : SV_Target { + half4 tapHigh = tex2D (_MainTex, i.uv.xy); + + half4 tapLow = tex2D (_TapLowBackground, i.uv.xy); + + half4 tapMedium = tex2D (_TapMedium, i.uv.xy); + tapMedium.rgb = (tapMedium.rgb + half3 (1, 1, 0)) * 0.5; + tapLow.rgb = (tapLow.rgb + half3 (0, 1, 0)) * 0.5; + + tapLow = lerp (tapMedium, tapLow, saturate (tapLow.a * tapLow.a)); + tapLow = tapLow * 0.5 + tex2D (_TapLowBackground, i.uv.xy) * 0.5; + + return lerp (tapHigh, tapLow, tapHigh.a); + } + + half4 fragDofApplyFg (v2fDofApply i) : SV_Target { + half4 fgBlur = tex2D(_TapLowForeground, i.uv.xy); + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + i.uv.xy = i.uv.xy * half2(1,-1)+half2(0,1); + #endif + + half4 fgColor = tex2D(_MainTex,i.uv.xy); + + //fgBlur.a = saturate(fgBlur.a*_ForegroundBlurWeight+saturate(fgColor.a-fgBlur.a)); + //fgBlur.a = max (fgColor.a, (2.0 * fgBlur.a - fgColor.a)) * _ForegroundBlurExtrude; + fgBlur.a = max(fgColor.a, fgBlur.a * _ForegroundBlurExtrude); //max (fgColor.a, (2.0*fgBlur.a-fgColor.a)) * _ForegroundBlurExtrude; + + return lerp (fgColor, fgBlur, saturate(fgBlur.a)); + } + + half4 fragDofApplyFgDebug (v2fDofApply i) : SV_Target { + half4 fgBlur = tex2D(_TapLowForeground, i.uv.xy); + + half4 fgColor = tex2D(_MainTex,i.uv.xy); + + fgBlur.a = max(fgColor.a, fgBlur.a * _ForegroundBlurExtrude); //max (fgColor.a, (2.0*fgBlur.a-fgColor.a)) * _ForegroundBlurExtrude; + + half4 tapMedium = half4 (1, 1, 0, fgBlur.a); + tapMedium.rgb = 0.5 * (tapMedium.rgb + fgColor.rgb); + + fgBlur.rgb = 0.5 * (fgBlur.rgb + half3(0,1,0)); + fgBlur.rgb = lerp (tapMedium.rgb, fgBlur.rgb, saturate (fgBlur.a * fgBlur.a)); + + return lerp ( fgColor, fgBlur, saturate(fgBlur.a)); + } + + half4 fragCocBg (v2f i) : SV_Target { + + float d = SAMPLE_DEPTH_TEXTURE (_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + half coc = 0.0; + + half focalDistance01 = _CurveParams.w + _CurveParams.z; + + if (d > focalDistance01) + coc = (d - focalDistance01); + + coc = saturate (coc * _CurveParams.y); + return coc; + } + + half4 fragCocFg (v2f i) : SV_Target { + half4 color = tex2D (_MainTex, i.uv1.xy); + color.a = 0.0; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + i.uv1.xy = i.uv1.xy * half2(1,-1)+half2(0,1); + #endif + + float d = SAMPLE_DEPTH_TEXTURE (_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + + half focalDistance01 = (_CurveParams.w - _CurveParams.z); + + if (d < focalDistance01) + color.a = (focalDistance01 - d); + + color.a = saturate (color.a * _CurveParams.x); + return color; + } + + // not being used atm + + half4 fragMask (v2f i) : SV_Target { + return half4(0,0,0,0); + } + + // used for simple one one blend + + half4 fragAddBokeh (v2f i) : SV_Target { + half4 from = tex2D( _MainTex, i.uv1.xy ); + return from; + } + + half4 fragAddFgBokeh (v2f i) : SV_Target { + half4 from = tex2D( _MainTex, i.uv1.xy ); + return from; + } + + half4 fragDarkenForBokeh(v2fRadius i) : SV_Target { + half4 fromOriginal = tex2D(_MainTex, i.uv.xy); + half4 lowRez = BokehPrereqs (_MainTex, i.uv1, fromOriginal, _Threshhold.z); + half4 outColor = half4(0,0,0, fromOriginal.a); + half modulate = fromOriginal.a; + + // this code imitates the if-then-else conditions below + half2 conditionCheck = half2( dot(abs(fromOriginal.rgb-lowRez.rgb), half3(0.3,0.5,0.2)), Luminance(fromOriginal.rgb)); + conditionCheck *= fromOriginal.a; + conditionCheck = saturate(_Threshhold.xy - conditionCheck); + outColor = lerp (outColor, fromOriginal, saturate (dot(conditionCheck, half2(1000.0,1000.0)))); + + /* + if ( abs(dot(fromOriginal.rgb - lowRez.rgb, half3 (0.3,0.5,0.2))) * modulate < _Threshhold.x) + outColor = fromOriginal; // no darkening + if (Luminance(fromOriginal.rgb) * modulate < _Threshhold.y) + outColor = fromOriginal; // no darkening + if (lowRez.a < _Threshhold.z) // need to make foreground not cast false bokeh's + outColor = fromOriginal; // no darkenin + */ + + return outColor; + } + + half4 fragExtractAndAddToBokeh (v2fRadius i) : SV_Target { + half4 from = tex2D(_MainTex, i.uv.xy); + half4 lowRez = BokehPrereqs(_MainTex, i.uv1, from, _Threshhold.z); + half4 outColor = from; + + // this code imitates the if-then-else conditions below + half2 conditionCheck = half2( dot(abs(from.rgb-lowRez.rgb), half3(0.3,0.5,0.2)), Luminance(from.rgb)); + conditionCheck *= from.a; + conditionCheck = saturate(_Threshhold.xy - conditionCheck); + outColor = lerp (outColor, half4(0,0,0,0), saturate (dot(conditionCheck, half2(1000.0,1000.0)))); + + /* + if ( abs(dot(from.rgb - lowRez.rgb, half3 (0.3,0.5,0.2))) * modulate < _Threshhold.x) + outColor = half4(0,0,0,0); // don't add + if (Luminance(from.rgb) * modulate < _Threshhold.y) + outColor = half4(0,0,0,0); // don't add + if (lowRez.a < _Threshhold.z) // need to make foreground not cast false bokeh's + outColor = half4(0,0,0,0); // don't add + */ + + return outColor; + } + + ENDCG + +Subshader { + + // pass 0 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertDofApply + #pragma fragment fragDofApplyBg + + ENDCG + } + + // pass 1 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask RGB + + CGPROGRAM + #pragma vertex vertDofApply + #pragma fragment fragDofApplyFgDebug + + ENDCG + } + + // pass 2 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask RGB + + CGPROGRAM + #pragma vertex vertDofApply + #pragma fragment fragDofApplyBgDebug + + ENDCG + } + + + + // pass 3 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask A + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragCocBg + + ENDCG + } + + + // pass 4 + + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask RGB + //Blend One One + + CGPROGRAM + #pragma vertex vertDofApply + #pragma fragment fragDofApplyFg + + ENDCG + } + + // pass 5 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask ARGB + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragCocFg + + ENDCG + } + + // pass 6 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertDownsampleWithCocConserve + #pragma fragment fragDownsampleWithCocConserve + + ENDCG + } + + // pass 7 + // not being used atm + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask RGBA + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragMask + + ENDCG + } + + // pass 8 + + Pass { + ZTest Always Cull Off ZWrite Off + Blend SrcAlpha OneMinusSrcAlpha + ColorMask RGB + + CGPROGRAM + #pragma vertex vert + #pragma fragment fragAddBokeh + + ENDCG + } + + // pass 9 + + Pass { + ZTest Always Cull Off ZWrite Off + Blend One One + ColorMask RGB + + CGPROGRAM + #pragma vertex vertWithRadius + #pragma fragment fragExtractAndAddToBokeh + + ENDCG + } + + // pass 10 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertWithRadius + #pragma fragment fragDarkenForBokeh + + ENDCG + } + + // pass 11 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vertWithRadius + #pragma fragment fragExtractAndAddToBokeh + + ENDCG + } + } + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader.meta new file mode 100644 index 0000000..031a714 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfField34.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 987fb0677d01f43ce8a9dbf12271e668 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader new file mode 100644 index 0000000..056b2bd --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader @@ -0,0 +1,259 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +/* + DX11 Depth Of Field + pretty much just does bokeh texture splatting + + basic algorithm: + + * find bright spots + * verify high frequency (otherwise dont care) + * if possitive, replace with black pixel and add to append buffer + * box blur buffer (thus smearing black pixels) + * blend bokeh texture sprites via append buffer on top of box blurred buffer + * composite with frame buffer +*/ + +Shader "Hidden/Dof/DX11Dof" +{ + Properties + { + _MainTex ("", 2D) = "white" {} + _BlurredColor ("", 2D) = "white" {} + _FgCocMask ("", 2D) = "white" {} + } + + CGINCLUDE + + #define BOKEH_ZERO_VEC (float4(0,0,0,0)) + #define BOKEH_ONE_VEC (float4(1,1,1,1)) + + float4 _BokehParams; // legend: dx11BokehScale, dx11BokehIntensity,dx11BokehThreshhold, internalBlurWidth + float4 _MainTex_TexelSize; + float3 _Screen; + float _SpawnHeuristic; + + sampler2D_float _CameraDepthTexture; + sampler2D _BlurredColor; + sampler2D _MainTex; + sampler2D _FgCocMask; + + struct appendStruct { + float3 pos; + float4 color; + }; + + struct gs_out { + float4 pos : SV_POSITION; + float3 uv : TEXCOORD0; + float4 color : TEXCOORD1; + float4 misc : TEXCOORD2; + }; + + // TODO: activate border clamp tex sampler state instead? + inline float4 clampBorderColor(float2 uv) + { +#if 1 + if(uv.x<=0) return BOKEH_ZERO_VEC; if(uv.x>=1) return BOKEH_ZERO_VEC; + if(uv.y<=0) return BOKEH_ZERO_VEC; if(uv.y>=1) return BOKEH_ZERO_VEC; +#endif + return BOKEH_ONE_VEC; + } + + struct vs_out { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 color : TEXCOORD1; + float cocOverlap : TEXCOORD2; + }; + + StructuredBuffer pointBuffer; + + vs_out vertApply (uint id : SV_VertexID) + { + vs_out o; + float2 pos = pointBuffer[id].pos.xy ; + o.pos = float4(pos * 2.0 - 1.0, 0, 1); + o.color = pointBuffer[id].color; + #if UNITY_UV_STARTS_AT_TOP + o.pos.y *= -1; + #endif + o.cocOverlap = pointBuffer[id].pos.z; + + return o; + } + + [maxvertexcount(4)] + void geom (point vs_out input[1], inout TriangleStream outStream) + { + // NEW ENERGY CONSERVATION: + + float2 scale2 = _BokehParams.ww * input[0].color.aa * _BokehParams.xx; + float4 offs = 0; + offs.xy = float2(3.0, 3.0) + 2.0f * floor(scale2 + float2(0.5,0.5)); + + float2 rs = ((float2(1.0, 1.0) + 2.0f * (scale2 + float2(0.5,0.5))));; + float2 f2 = offs.xy / rs; + + float energyAdjustment = (_BokehParams.y) / (rs.x*rs.y); + offs.xy *= _Screen.xy; + + gs_out output; + + output.pos = input[0].pos + offs*float4(-1,1,0,0); + output.misc = float4(f2,0,0); + output.uv = float3(0, 1, input[0].cocOverlap); + output.color = input[0].color * energyAdjustment; + outStream.Append (output); + + output.pos = input[0].pos + offs*float4(1,1,0,0); + output.misc = float4(f2,0,0); + output.uv = float3(1, 1, input[0].cocOverlap); + output.color = input[0].color * energyAdjustment; + outStream.Append (output); + + output.pos = input[0].pos + offs*float4(-1,-1,0,0); + output.misc = float4(f2,0,0); + output.uv = float3(0, 0, input[0].cocOverlap); + output.color = input[0].color * energyAdjustment; + outStream.Append (output); + + output.pos = input[0].pos + offs*float4(1,-1,0,0); + output.misc = float4(f2,0,0); + output.uv = float3(1, 0, input[0].cocOverlap); + output.color = input[0].color * energyAdjustment; + outStream.Append (output); + + outStream.RestartStrip(); + } + +ENDCG + +SubShader +{ + +// pass 0: append buffer "collect" + +Pass +{ + ZWrite Off ZTest Always Cull Off + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma target 5.0 + + #include "UnityCG.cginc" + + struct appdata { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv_flip : TEXCOORD0; + float2 uv : TEXCOORD1; + }; + + v2f vert (appdata v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = v.texcoord; + o.uv_flip = v.texcoord; + #if UNITY_UV_STARTS_AT_TOP + if(_MainTex_TexelSize.y<0) + o.uv_flip.y = 1.0-o.uv_flip.y; + if(_MainTex_TexelSize.y<0) + o.pos.y *= -1.0; + #endif + return o; + } + + AppendStructuredBuffer pointBufferOutput : register(u1); + + float4 frag (v2f i) : SV_Target + { + float4 c = tex2D (_MainTex, i.uv_flip); + float lumc = Luminance (c.rgb); + + float4 cblurred = tex2D (_BlurredColor, i.uv); + float lumblurred = Luminance (cblurred.rgb); + + float fgCoc = tex2D(_FgCocMask, i.uv).a; + + [branch] + if (c.a * _BokehParams.w > 1 && cblurred.a > 0.1 && lumc > _BokehParams.z && abs(lumc-lumblurred) > _SpawnHeuristic) + { + appendStruct append; + append.pos = float3(i.uv, fgCoc); + append.color.rgba = float4(c.rgb * saturate(c.a*4), c.a); + pointBufferOutput.Append (append); + return float4(c.rgb * saturate(1-c.a*4), c.a); + } + + return c; + } + ENDCG +} + +// pass 1: bokeh splatting (low resolution) + +Pass { + + ZWrite Off ZTest Always Cull Off + Blend One One, One One + ColorMask RGBA + + CGPROGRAM + + #pragma target 5.0 + #pragma vertex vertApply + #pragma geometry geom + #pragma fragment frag + + #include "UnityCG.cginc" + + fixed4 frag (gs_out i) : SV_Target + { + float2 uv = (i.uv.xy) * i.misc.xy + (float2(1,1)-i.misc.xy) * 0.5; // smooth uv scale + return float4(i.color.rgb, 1) * float4(tex2D(_MainTex, uv.xy).rgb, i.uv.z) * clampBorderColor (uv); + } + + ENDCG +} + +// pass 2: bokeh splatting (high resolution) + +Pass { + + ZWrite Off ZTest Always Cull Off + BlendOp Add, Add + Blend DstAlpha One, Zero One + ColorMask RGBA + + CGPROGRAM + + #pragma target 5.0 + #pragma vertex vertApply + #pragma geometry geom + #pragma fragment frag + + #include "UnityCG.cginc" + + fixed4 frag (gs_out i) : SV_Target + { + float2 uv = (i.uv.xy) * i.misc.xy + (float2(1,1)-i.misc.xy) * 0.5; // smooth uv scale + return float4(i.color.rgb, 1) * float4(tex2D(_MainTex, uv.xy).rgb, i.uv.z) * clampBorderColor (uv); + } + + ENDCG +} + +} + +Fallback Off +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta new file mode 100644 index 0000000..64df317 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: d8e82664aa8686642a424c88ab10164a +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader new file mode 100644 index 0000000..296011c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader @@ -0,0 +1,936 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + Shader "Hidden/Dof/DepthOfFieldHdr" { + Properties { + _MainTex ("-", 2D) = "black" {} + _FgOverlap ("-", 2D) = "black" {} + _LowRez ("-", 2D) = "black" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + }; + + struct v2fRadius { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 uv1[4] : TEXCOORD1; + }; + + struct v2fBlur { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 uv01 : TEXCOORD1; + float4 uv23 : TEXCOORD2; + float4 uv45 : TEXCOORD3; + float4 uv67 : TEXCOORD4; + float4 uv89 : TEXCOORD5; + }; + + uniform sampler2D _MainTex; + uniform sampler2D_float _CameraDepthTexture; + uniform sampler2D _FgOverlap; + uniform sampler2D _LowRez; + uniform float4 _CurveParams; + uniform float4 _MainTex_TexelSize; + uniform float4 _Offsets; + + v2f vert( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv1.xy = v.texcoord.xy; + o.uv.xy = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv.y = 1-o.uv.y; + #endif + + return o; + } + + v2f vertFlip( appdata_img v ) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv1.xy = v.texcoord.xy; + o.uv.xy = v.texcoord.xy; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv.y = 1-o.uv.y; + if (_MainTex_TexelSize.y < 0) + o.uv1.y = 1-o.uv1.y; + #endif + + return o; + } + + v2fBlur vertBlurPlusMinus (appdata_img v) + { + v2fBlur o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + o.uv01 = v.texcoord.xyxy + _Offsets.xyxy * float4(1,1, -1,-1) * _MainTex_TexelSize.xyxy / 6.0; + o.uv23 = v.texcoord.xyxy + _Offsets.xyxy * float4(2,2, -2,-2) * _MainTex_TexelSize.xyxy / 6.0; + o.uv45 = v.texcoord.xyxy + _Offsets.xyxy * float4(3,3, -3,-3) * _MainTex_TexelSize.xyxy / 6.0; + o.uv67 = v.texcoord.xyxy + _Offsets.xyxy * float4(4,4, -4,-4) * _MainTex_TexelSize.xyxy / 6.0; + o.uv89 = v.texcoord.xyxy + _Offsets.xyxy * float4(5,5, -5,-5) * _MainTex_TexelSize.xyxy / 6.0; + return o; + } + + #define SCATTER_OVERLAP_SMOOTH (-0.265) + + inline float BokehWeightDisc(float4 theSample, float sampleDistance, float4 centerSample) + { + return smoothstep(SCATTER_OVERLAP_SMOOTH, 0.0, theSample.a - centerSample.a*sampleDistance); + } + + inline float2 BokehWeightDisc2(float4 sampleA, float4 sampleB, float2 sampleDistance2, float4 centerSample) + { + return smoothstep(float2(SCATTER_OVERLAP_SMOOTH, SCATTER_OVERLAP_SMOOTH), float2(0.0,0.0), float2(sampleA.a, sampleB.a) - centerSample.aa*sampleDistance2); } + + static const int SmallDiscKernelSamples = 12; + static const float2 SmallDiscKernel[SmallDiscKernelSamples] = + { + float2(-0.326212,-0.40581), + float2(-0.840144,-0.07358), + float2(-0.695914,0.457137), + float2(-0.203345,0.620716), + float2(0.96234,-0.194983), + float2(0.473434,-0.480026), + float2(0.519456,0.767022), + float2(0.185461,-0.893124), + float2(0.507431,0.064425), + float2(0.89642,0.412458), + float2(-0.32194,-0.932615), + float2(-0.791559,-0.59771) + }; + + static const int NumDiscSamples = 28; + static const float3 DiscKernel[NumDiscSamples] = + { + float3(0.62463,0.54337,0.82790), + float3(-0.13414,-0.94488,0.95435), + float3(0.38772,-0.43475,0.58253), + float3(0.12126,-0.19282,0.22778), + float3(-0.20388,0.11133,0.23230), + float3(0.83114,-0.29218,0.88100), + float3(0.10759,-0.57839,0.58831), + float3(0.28285,0.79036,0.83945), + float3(-0.36622,0.39516,0.53876), + float3(0.75591,0.21916,0.78704), + float3(-0.52610,0.02386,0.52664), + float3(-0.88216,-0.24471,0.91547), + float3(-0.48888,-0.29330,0.57011), + float3(0.44014,-0.08558,0.44838), + float3(0.21179,0.51373,0.55567), + float3(0.05483,0.95701,0.95858), + float3(-0.59001,-0.70509,0.91938), + float3(-0.80065,0.24631,0.83768), + float3(-0.19424,-0.18402,0.26757), + float3(-0.43667,0.76751,0.88304), + float3(0.21666,0.11602,0.24577), + float3(0.15696,-0.85600,0.87027), + float3(-0.75821,0.58363,0.95682), + float3(0.99284,-0.02904,0.99327), + float3(-0.22234,-0.57907,0.62029), + float3(0.55052,-0.66984,0.86704), + float3(0.46431,0.28115,0.54280), + float3(-0.07214,0.60554,0.60982), + }; + + float4 fragBlurInsaneMQ (v2f i) : SV_Target + { + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + float4 sum = centerTap; + float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w; + + float sampleCount = max(centerTap.a * 0.25, _Offsets.z); // <- weighing with 0.25 looks nicer for small high freq spec + sum *= sampleCount; + + float weights = 0; + + for(int l=0; l < NumDiscSamples; l++) + { + float2 sampleUV = i.uv1.xy + DiscKernel[l].xy * poissonScale.xy; + float4 sample0 = tex2D(_MainTex, sampleUV.xy); + + if( sample0.a > 0.0 ) + { + weights = BokehWeightDisc(sample0, DiscKernel[l].z, centerTap); + sum += sample0 * weights; + sampleCount += weights; + } + } + + float4 returnValue = sum / sampleCount; + returnValue.a = centerTap.a; + + return returnValue; + } + + float4 fragBlurInsaneHQ (v2f i) : SV_Target + { + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + float4 sum = centerTap; + float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w; + + float sampleCount = max(centerTap.a * 0.25, _Offsets.z); // <- weighing with 0.25 looks nicer for small high freq spec + sum *= sampleCount; + + float2 weights = 0; + + for(int l=0; l < NumDiscSamples; l++) + { + float4 sampleUV = i.uv1.xyxy + DiscKernel[l].xyxy * poissonScale.xyxy / float4(1.2,1.2,DiscKernel[l].zz); + + float4 sample0 = tex2D(_MainTex, sampleUV.xy); + float4 sample1 = tex2D(_MainTex, sampleUV.zw); + + if( (sample0.a + sample1.a) > 0.0 ) + { + weights = BokehWeightDisc2(sample0, sample1, float2(DiscKernel[l].z/1.2, 1.0), centerTap); + sum += sample0 * weights.x + sample1 * weights.y; + sampleCount += dot(weights, 1); + } + } + + float4 returnValue = sum / sampleCount; + returnValue.a = centerTap.a; + + return returnValue; + } + + inline float4 BlendLowWithHighHQ(float coc, float4 low, float4 high) + { + float blend = smoothstep(0.65,0.85, coc); + return lerp(low, high, blend); + } + + inline float4 BlendLowWithHighMQ(float coc, float4 low, float4 high) + { + float blend = smoothstep(0.4,0.6, coc); + return lerp(low, high, blend); + } + + float4 fragBlurUpsampleCombineHQ (v2f i) : SV_Target + { + float4 bigBlur = tex2D(_LowRez, i.uv1.xy); + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + + float4 smallBlur = centerTap; + float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w ; + + float sampleCount = max(centerTap.a * 0.25, 0.1f); // <- weighing with 0.25 looks nicer for small high freq spec + smallBlur *= sampleCount; + + for(int l=0; l < NumDiscSamples; l++) + { + float2 sampleUV = i.uv1.xy + DiscKernel[l].xy * poissonScale.xy; + + float4 sample0 = tex2D(_MainTex, sampleUV); + float weight0 = BokehWeightDisc(sample0, DiscKernel[l].z, centerTap); + smallBlur += sample0 * weight0; sampleCount += weight0; + } + + smallBlur /= (sampleCount+1e-5f); + smallBlur = BlendLowWithHighHQ(centerTap.a, smallBlur, bigBlur); + + return centerTap.a < 1e-2f ? centerTap : float4(smallBlur.rgb,centerTap.a); + } + + float4 fragBlurUpsampleCombineMQ (v2f i) : SV_Target + { + float4 bigBlur = tex2D(_LowRez, i.uv1.xy); + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + + float4 smallBlur = centerTap; + float4 poissonScale = _MainTex_TexelSize.xyxy * centerTap.a * _Offsets.w ; + + float sampleCount = max(centerTap.a * 0.25, 0.1f); // <- weighing with 0.25 looks nicer for small high freq spec + smallBlur *= sampleCount; + + for(int l=0; l < SmallDiscKernelSamples; l++) + { + float2 sampleUV = i.uv1.xy + SmallDiscKernel[l].xy * poissonScale.xy*1.1; + + float4 sample0 = tex2D(_MainTex, sampleUV); + float weight0 = BokehWeightDisc(sample0, length(SmallDiscKernel[l].xy*1.1), centerTap); + smallBlur += sample0 * weight0; sampleCount += weight0; + } + + smallBlur /= (sampleCount+1e-5f); + + smallBlur = BlendLowWithHighMQ(centerTap.a, smallBlur, bigBlur); + + return centerTap.a < 1e-2f ? centerTap : float4(smallBlur.rgb,centerTap.a); + } + + float4 fragBlurUpsampleCheap (v2f i) : SV_Target + { + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + float4 bigBlur = tex2D(_LowRez, i.uv1.xy); + + float fgCoc = tex2D(_FgOverlap, i.uv1.xy).a; + float4 smallBlur = lerp(centerTap, bigBlur, saturate( max(centerTap.a,fgCoc)*8.0 )); + + return float4(smallBlur.rgb, centerTap.a); + } + + float4 fragBlurBox (v2f i) : SV_Target + { + const int TAPS = 12; + + float4 centerTap = tex2D(_MainTex, i.uv1.xy); + + // TODO: important ? breaks when HR blur is being used + //centerTap.a = max(centerTap.a, 0.1f); + + float sampleCount = centerTap.a; + float4 sum = centerTap * sampleCount; + + float2 lenStep = centerTap.aa * (1.0 / (TAPS-1.0)); + float4 steps = (_Offsets.xyxy * _MainTex_TexelSize.xyxy) * lenStep.xyxy * float4(1,1, -1,-1); + + for(int l=1; l 1e-5f) outColor.rgb = color.rgb/sumWeights; + + return outColor; + } + + float4 fragCaptureColorAndSignedCoc (v2f i) : SV_Target + { + float4 color = tex2D (_MainTex, i.uv1.xy); + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); + color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x) * sign(d - _CurveParams.w); + + return color; + } + + float4 fragCaptureCoc (v2f i) : SV_Target + { + float4 color = float4(0,0,0,0); //tex2D (_MainTex, i.uv1.xy); + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); + color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); + + return color; + } + + float4 AddFgCoc (v2f i) : SV_Target + { + return tex2D (_MainTex, i.uv1.xy); + } + + float4 fragMergeCoc (v2f i) : SV_Target + { + float4 color = tex2D (_FgOverlap, i.uv1.xy); // this is the foreground overlap value + float fgCoc = color.a; + + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + color.a = _CurveParams.z * abs(d - _CurveParams.w) / (d + 1e-5f); + color.a = clamp( max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); + + return max(color.aaaa, float4(fgCoc,fgCoc,fgCoc,fgCoc)); + } + + float4 fragCombineCocWithMaskBlur (v2f i) : SV_Target + { + float bgAndFgCoc = tex2D (_MainTex, i.uv1.xy).a; + float fgOverlapCoc = tex2D (_FgOverlap, i.uv1.xy).a; + + return (bgAndFgCoc < 0.01) * saturate(fgOverlapCoc-bgAndFgCoc); + } + + float4 fragCaptureForegroundCoc (v2f i) : SV_Target + { + float4 color = float4(0,0,0,0); //tex2D (_MainTex, i.uv1.xy); + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + color.a = _CurveParams.z * (_CurveParams.w-d) / (d + 1e-5f); + color.a = clamp(max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); + + return color; + } + + float4 fragCaptureForegroundCocMask (v2f i) : SV_Target + { + float4 color = float4(0,0,0,0); + float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv1.xy); + d = Linear01Depth (d); + color.a = _CurveParams.z * (_CurveParams.w-d) / (d + 1e-5f); + color.a = clamp(max(0.0, color.a - _CurveParams.y), 0.0, _CurveParams.x); + + return color.a > 0; + } + + float4 fragBlendInHighRez (v2f i) : SV_Target + { + float4 tapHighRez = tex2D(_MainTex, i.uv.xy); + return float4(tapHighRez.rgb, 1.0-saturate(tapHighRez.a*5.0)); + } + + float4 fragBlendInLowRezParts (v2f i) : SV_Target + { + float4 from = tex2D(_MainTex, i.uv1.xy); + from.a = saturate(from.a * _Offsets.w) / (_CurveParams.x + 1e-5f); + float square = from.a * from.a; + from.a = square * square * _CurveParams.x; + return from; + } + + float4 fragUpsampleWithAlphaMask(v2f i) : SV_Target + { + float4 c = tex2D(_MainTex, i.uv1.xy); + return c; + } + + float4 fragAlphaMask(v2f i) : SV_Target + { + float4 c = tex2D(_MainTex, i.uv1.xy); + c.a = saturate(c.a*100.0); + return c; + } + + ENDCG + +Subshader +{ + + // pass 0 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask A + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragCaptureCoc + + ENDCG + } + + // pass 1 + + Pass + { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vertBlurPlusMinus + #pragma fragment fragGaussBlur + + ENDCG + } + + // pass 2 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vertBlurPlusMinus + #pragma fragment fragBlurForFgCoc + + ENDCG + } + + + // pass 3 + + Pass + { + ZTest Always Cull Off ZWrite Off + ColorMask A + BlendOp Max, Max + Blend One One, One One + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment AddFgCoc + + ENDCG + } + + + // pass 4 + + Pass + { + ZTest Always Cull Off ZWrite Off + ColorMask A + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragCaptureForegroundCoc + + ENDCG + } + + // pass 5 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurBox + + ENDCG + } + + // pass 6 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment frag4TapBlurForLRSpawn + + ENDCG + } + + // pass 7 + + Pass { + ZTest Always Cull Off ZWrite Off + ColorMask RGB + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlendInHighRez + + ENDCG + } + + // pass 8 + + Pass + { + ZTest Always Cull Off ZWrite Off + ColorMask A + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragCaptureForegroundCocMask + + ENDCG + } + + + // pass 9 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurUpsampleCheap + + ENDCG + } + + // pass 10 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragCaptureColorAndSignedCoc + + ENDCG + } + + // pass 11 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurInsaneMQ + + ENDCG + } + + // pass 12 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurUpsampleCombineMQ + + ENDCG + } + + // pass 13 + Pass { + ZTest Always Cull Off ZWrite Off + + ColorMask A + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragMergeCoc + + ENDCG + } + + // pass 14 + + Pass { + ZTest Always Cull Off ZWrite Off + + ColorMask A + BlendOp Max, Max + Blend One One, One One + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragCombineCocWithMaskBlur + + ENDCG + } + + // pass 15 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBoxDownsample + + ENDCG + } + + // pass 16 + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragVisualize + + ENDCG + } + + // pass 17 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurInsaneHQ + + ENDCG + } + + // pass 18 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragBlurUpsampleCombineHQ + + ENDCG + } + + // pass 19 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vertBlurPlusMinus + #pragma fragment fragBlurAlphaWeighted + + ENDCG + } + + // pass 20 + + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragAlphaMask + + ENDCG + } + + // pass 21 + + Pass { + ZTest Always Cull Off ZWrite Off + + BlendOp Add, Add + Blend DstAlpha OneMinusDstAlpha, Zero One + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vertFlip + #pragma fragment fragBlurBox + + ENDCG + } + + // pass 22 + + Pass { + ZTest Always Cull Off ZWrite Off + + // destination alpha needs to stay intact as we have layed alpha before + BlendOp Add, Add + Blend DstAlpha One, Zero One + + CGPROGRAM + + #pragma target 3.0 + #pragma vertex vert + #pragma fragment fragUpsampleWithAlphaMask + + ENDCG + } +} + +Fallback off + +} diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta new file mode 100644 index 0000000..acf31d0 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: acd613035ff3e455e8abf23fdc8c8c24 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader new file mode 100644 index 0000000..2ffca4b --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader @@ -0,0 +1,68 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/SeparableBlur" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + + float4 uv01 : TEXCOORD1; + float4 uv23 : TEXCOORD2; + float4 uv45 : TEXCOORD3; + }; + + float4 offsets; + + sampler2D _MainTex; + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + o.uv.xy = v.texcoord.xy; + + o.uv01 = v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1); + o.uv23 = v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 2.0; + o.uv45 = v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 3.0; + + return o; + } + + half4 frag (v2f i) : SV_Target { + half4 color = float4 (0,0,0,0); + + color += 0.40 * tex2D (_MainTex, i.uv); + color += 0.15 * tex2D (_MainTex, i.uv01.xy); + color += 0.15 * tex2D (_MainTex, i.uv01.zw); + color += 0.10 * tex2D (_MainTex, i.uv23.xy); + color += 0.10 * tex2D (_MainTex, i.uv23.zw); + color += 0.05 * tex2D (_MainTex, i.uv45.xy); + color += 0.05 * tex2D (_MainTex, i.uv45.zw); + + return color; + } + + ENDCG + +Subshader { + Pass { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } +} + +Fallback off + + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader.meta new file mode 100644 index 0000000..a6990b2 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableBlur.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e97c14fbb5ea04c3a902cc533d7fc5d1 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader new file mode 100644 index 0000000..e04f4ee --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader @@ -0,0 +1,244 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Hidden/SeparableWeightedBlurDof34" { + Properties { + _MainTex ("Base (RGB)", 2D) = "" {} + _TapMedium ("TapMedium (RGB)", 2D) = "" {} + _TapLow ("TapLow (RGB)", 2D) = "" {} + _TapHigh ("TapHigh (RGB)", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + half4 offsets; + half4 _Threshhold; + sampler2D _MainTex; + sampler2D _TapHigh; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 uv01 : TEXCOORD1; + half4 uv23 : TEXCOORD2; + half4 uv45 : TEXCOORD3; + }; + + struct v2fSingle { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + // + // VERT PROGRAMS + // + + v2f vert (appdata_img v) { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + o.uv01 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1); + o.uv23 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 2.0; + o.uv45 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 3.0; + + return o; + } + + v2fSingle vertSingleTex (appdata_img v) { + v2fSingle o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord.xy; + return o; + } + + // + // FRAG PROGRAMS + // + + // mostly used for foreground, so more gaussian-like + + half4 fragBlurUnweighted (v2f i) : SV_Target { + half4 blurredColor = half4 (0,0,0,0); + + half4 sampleA = tex2D(_MainTex, i.uv.xy); + half4 sampleB = tex2D(_MainTex, i.uv01.xy); + half4 sampleC = tex2D(_MainTex, i.uv01.zw); + half4 sampleD = tex2D(_MainTex, i.uv23.xy); + half4 sampleE = tex2D(_MainTex, i.uv23.zw); + + blurredColor += sampleA; + blurredColor += sampleB; + blurredColor += sampleC; + blurredColor += sampleD; + blurredColor += sampleE; + + blurredColor *= 0.2; + + blurredColor.a = max(UNITY_SAMPLE_1CHANNEL(_TapHigh, i.uv.xy), blurredColor.a); + + return blurredColor; + } + + // used for background, so more bone curve-like + + half4 fragBlurWeighted (v2f i) : SV_Target { + half4 blurredColor = half4 (0,0,0,0); + + half4 sampleA = tex2D(_MainTex, i.uv.xy); + half4 sampleB = tex2D(_MainTex, i.uv01.xy); + half4 sampleC = tex2D(_MainTex, i.uv01.zw); + half4 sampleD = tex2D(_MainTex, i.uv23.xy); + half4 sampleE = tex2D(_MainTex, i.uv23.zw); + + half sum = sampleA.a + dot (half4 (1.25, 1.25, 1.5, 1.5), half4 (sampleB.a,sampleC.a,sampleD.a,sampleE.a)); + + sampleA.rgb = sampleA.rgb * sampleA.a; + sampleB.rgb = sampleB.rgb * sampleB.a * 1.25; + sampleC.rgb = sampleC.rgb * sampleC.a * 1.25; + sampleD.rgb = sampleD.rgb * sampleD.a * 1.5; + sampleE.rgb = sampleE.rgb * sampleE.a * 1.5; + + blurredColor += sampleA; + blurredColor += sampleB; + blurredColor += sampleC; + blurredColor += sampleD; + blurredColor += sampleE; + + blurredColor /= sum; + half4 color = blurredColor; + + color.a = sampleA.a; + + return color; + } + + half4 fragBlurDark (v2f i) : SV_Target { + half4 blurredColor = half4 (0,0,0,0); + + half4 sampleA = tex2D(_MainTex, i.uv.xy); + half4 sampleB = tex2D(_MainTex, i.uv01.xy); + half4 sampleC = tex2D(_MainTex, i.uv01.zw); + half4 sampleD = tex2D(_MainTex, i.uv23.xy); + half4 sampleE = tex2D(_MainTex, i.uv23.zw); + + half sum = sampleA.a + dot (half4 (0.75, 0.75, 0.5, 0.5), half4 (sampleB.a,sampleC.a,sampleD.a,sampleE.a)); + + sampleA.rgb = sampleA.rgb * sampleA.a; + sampleB.rgb = sampleB.rgb * sampleB.a * 0.75; + sampleC.rgb = sampleC.rgb * sampleC.a * 0.75; + sampleD.rgb = sampleD.rgb * sampleD.a * 0.5; + sampleE.rgb = sampleE.rgb * sampleE.a * 0.5; + + blurredColor += sampleA; + blurredColor += sampleB; + blurredColor += sampleC; + blurredColor += sampleD; + blurredColor += sampleE; + + blurredColor /= sum; + half4 color = blurredColor; + + color.a = sampleA.a; + + return color; + } + + // not used atm + + half4 fragBlurUnweightedDark (v2f i) : SV_Target { + half4 blurredColor = half4 (0,0,0,0); + + half4 sampleA = tex2D(_MainTex, i.uv.xy); + half4 sampleB = tex2D(_MainTex, i.uv01.xy); + half4 sampleC = tex2D(_MainTex, i.uv01.zw); + half4 sampleD = tex2D(_MainTex, i.uv23.xy); + half4 sampleE = tex2D(_MainTex, i.uv23.zw); + + blurredColor += sampleA; + blurredColor += sampleB * 0.75; + blurredColor += sampleC * 0.75; + blurredColor += sampleD * 0.5; + blurredColor += sampleE * 0.5; + + blurredColor /= 3.5; + + blurredColor.a = max(UNITY_SAMPLE_1CHANNEL(_TapHigh, i.uv.xy), blurredColor.a); + + return blurredColor; + } + + // fragMixMediumAndLowTap + // happens before applying final coc/blur result to screen, + // mixes defocus buffers of different resolutions / bluriness + + sampler2D _TapMedium; + sampler2D _TapLow; + + half4 fragMixMediumAndLowTap (v2fSingle i) : SV_Target + { + half4 tapMedium = tex2D (_TapMedium, i.uv.xy); + half4 tapLow = tex2D (_TapLow, i.uv.xy); + tapMedium.a *= tapMedium.a; + + tapLow.rgb = lerp (tapMedium.rgb, tapLow.rgb, (tapMedium.a * tapMedium.a)); + return tapLow; + } + + ENDCG + +Subshader { + ZTest Always Cull Off ZWrite Off + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragBlurWeighted + + ENDCG + } + Pass { + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragBlurUnweighted + + ENDCG + } + + // 2 + + Pass { + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragBlurUnweightedDark + + ENDCG + } + Pass { + CGPROGRAM + + #pragma vertex vertSingleTex + #pragma fragment fragMixMediumAndLowTap + + ENDCG + } + + // 4 + + Pass { + CGPROGRAM + + #pragma vertex vert + #pragma fragment fragBlurDark + + ENDCG + } +} + +Fallback off + +} // shader diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta new file mode 100644 index 0000000..373b36d --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: bb4af680337344a4abad65a4e8873c50 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader new file mode 100644 index 0000000..73e8876 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader @@ -0,0 +1,311 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + + Shader "Hidden/Dof/TiltShiftHdrLensBlur" { + Properties { + _MainTex ("-", 2D) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + }; + + sampler2D _MainTex; + sampler2D _Blurred; + + float4 _MainTex_TexelSize; + float _BlurSize; + float _BlurArea; + + #ifdef SHADER_API_D3D11 + #define SAMPLE_TEX(sampler, uv) tex2Dlod(sampler, float4(uv,0,1)) + #else + #define SAMPLE_TEX(sampler, uv) tex2D(sampler, uv) + #endif + + v2f vert (appdata_img v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = v.texcoord; + o.uv1.xy = v.texcoord; + + #if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + o.uv1.y = 1-o.uv1.y; + #else + + #endif + + return o; + } + + static const int SmallDiscKernelSamples = 12; + static const float2 SmallDiscKernel[SmallDiscKernelSamples] = + { + float2(-0.326212,-0.40581), + float2(-0.840144,-0.07358), + float2(-0.695914,0.457137), + float2(-0.203345,0.620716), + float2(0.96234,-0.194983), + float2(0.473434,-0.480026), + float2(0.519456,0.767022), + float2(0.185461,-0.893124), + float2(0.507431,0.064425), + float2(0.89642,0.412458), + float2(-0.32194,-0.932615), + float2(-0.791559,-0.59771) + }; + + static const int NumDiscSamples = 28; + static const float3 DiscKernel[NumDiscSamples] = + { + float3(0.62463,0.54337,0.82790), + float3(-0.13414,-0.94488,0.95435), + float3(0.38772,-0.43475,0.58253), + float3(0.12126,-0.19282,0.22778), + float3(-0.20388,0.11133,0.23230), + float3(0.83114,-0.29218,0.88100), + float3(0.10759,-0.57839,0.58831), + float3(0.28285,0.79036,0.83945), + float3(-0.36622,0.39516,0.53876), + float3(0.75591,0.21916,0.78704), + float3(-0.52610,0.02386,0.52664), + float3(-0.88216,-0.24471,0.91547), + float3(-0.48888,-0.29330,0.57011), + float3(0.44014,-0.08558,0.44838), + float3(0.21179,0.51373,0.55567), + float3(0.05483,0.95701,0.95858), + float3(-0.59001,-0.70509,0.91938), + float3(-0.80065,0.24631,0.83768), + float3(-0.19424,-0.18402,0.26757), + float3(-0.43667,0.76751,0.88304), + float3(0.21666,0.11602,0.24577), + float3(0.15696,-0.85600,0.87027), + float3(-0.75821,0.58363,0.95682), + float3(0.99284,-0.02904,0.99327), + float3(-0.22234,-0.57907,0.62029), + float3(0.55052,-0.66984,0.86704), + float3(0.46431,0.28115,0.54280), + float3(-0.07214,0.60554,0.60982), + }; + + float WeightFieldMode (float2 uv) + { + float2 tapCoord = uv*2.0-1.0; + return (abs(tapCoord.y * _BlurArea)); + } + + float WeightIrisMode (float2 uv) + { + float2 tapCoord = (uv*2.0-1.0); + return dot(tapCoord, tapCoord) * _BlurArea; + } + + float4 fragIrisPreview (v2f i) : SV_Target + { + return WeightIrisMode(i.uv.xy) * 0.5; + } + + float4 fragFieldPreview (v2f i) : SV_Target + { + return WeightFieldMode(i.uv.xy) * 0.5; + } + + float4 fragUpsample (v2f i) : SV_Target + { + float4 blurred = tex2D(_Blurred, i.uv1.xy); + float4 frame = tex2D(_MainTex, i.uv.xy); + + return lerp(frame, blurred, saturate(blurred.a)); + } + + float4 fragIris (v2f i) : SV_Target + { + float4 centerTap = tex2D(_MainTex, i.uv.xy); + float4 sum = centerTap; + + float w = clamp(WeightIrisMode(i.uv.xy), 0, _BlurSize); + + float4 poissonScale = _MainTex_TexelSize.xyxy * w; + + #ifndef SHADER_API_D3D9 + if(w<1e-2f) + return sum; + #endif + + for(int l=0; l _Params.y) { + // This sample occludes, contribute to occlusion + occ += pow(1-zd,_Params.z); // sc2 + //occ += 1.0-saturate(pow(1.0 - zd, 11.0) + zd); // nullsq + //occ += 1.0/(1.0+zd*zd*10); // iq + } + } + occ /= sampleCount; + return 1-occ; +} + diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/frag_ao.cginc.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/frag_ao.cginc.meta new file mode 100644 index 0000000..5021733 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Shaders/frag_ao.cginc.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 51ae11a5cd82fda468a85179946d672a +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures.meta new file mode 100644 index 0000000..f926ce3 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: f9372f23586ef470b97d53856af88487 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png new file mode 100644 index 0000000..c112c75 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png.meta new file mode 100644 index 0000000..41d35b1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/ContrastEnhanced3D16.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: ecd9a2c463dcb476891e43d7c9f16ffa +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 1 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 5 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png new file mode 100644 index 0000000..a601a2e Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png.meta new file mode 100644 index 0000000..0e0201c --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/MotionBlurJitter.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 31f5a8611c4ed1245b18456206e798dc +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: 3 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png new file mode 100644 index 0000000..fc0f026 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png.meta new file mode 100644 index 0000000..d8bdb90 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Neutral3D16.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: a4b474cd484494a4aaa4bbf928219d09 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 1 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 5 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png new file mode 100644 index 0000000..a601a2e Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png.meta new file mode 100644 index 0000000..44cabd3 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/Noise.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: e80c3c84ea861404d8a427db8b7abf04 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: 3 + maxTextureSize: 64 + textureSettings: + filterMode: 2 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png new file mode 100644 index 0000000..9faabd4 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png.meta new file mode 100644 index 0000000..06696fe --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseAndGrain.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 7a632f967e8ad42f5bd275898151ab6a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 1 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 5 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png new file mode 100644 index 0000000..ba027b4 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png.meta new file mode 100644 index 0000000..affc2bb --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectGrain.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: ffa9c02760c2b4e8eb9814ec06c4b05b +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: 3 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png new file mode 100644 index 0000000..6ac0d53 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png.meta new file mode 100644 index 0000000..e54caed --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/NoiseEffectScratch.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 6205c27cc031f4e66b8ea90d1bfaa158 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png new file mode 100644 index 0000000..a601a2e Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png.meta new file mode 100644 index 0000000..1eca018 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/RandomVectors.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: a181ca8e3c62f3e4b8f183f6c586b032 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: 3 + maxTextureSize: 1024 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png new file mode 100644 index 0000000..3048937 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png.meta new file mode 100644 index 0000000..73ddaaa --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/VignetteMask.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 95ef4804fe0be4c999ddaa383536cde8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png new file mode 100644 index 0000000..328251e Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png.meta new file mode 100644 index 0000000..58ed65f --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/color correction ramp.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: d440902fad11e807d00044888d76c639 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png new file mode 100644 index 0000000..328251e Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png.meta new file mode 100644 index 0000000..908e220 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/grayscale ramp.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: e9a9781cad112c75d0008dfa8d76c639 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: 3 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd new file mode 100644 index 0000000..eef48cb Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd.meta new file mode 100644 index 0000000..2dce5d1 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/hexShape.psd.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: a4cdca73d61814d33ac1587f6c163bca +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd new file mode 100644 index 0000000..a100649 Binary files /dev/null and b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd differ diff --git a/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd.meta b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd.meta new file mode 100644 index 0000000..4f5c7f2 --- /dev/null +++ b/Assets/Standard Assets/Image Effects (Pro Only)/_Sources/Textures/sphereShape.psd.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: fc00ec05a89da4ff695a4273715cd5ce +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 64 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/TestScene.meta b/Assets/TestScene.meta new file mode 100644 index 0000000..12f8433 --- /dev/null +++ b/Assets/TestScene.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: c35d9614ebb852c46b29bb84aee41ffe +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/TestScene/DefaultReflection.asset b/Assets/TestScene/DefaultReflection.asset new file mode 100644 index 0000000..d32a03b Binary files /dev/null and b/Assets/TestScene/DefaultReflection.asset differ diff --git a/Assets/TestScene/DefaultReflection.asset.meta b/Assets/TestScene/DefaultReflection.asset.meta new file mode 100644 index 0000000..d539da7 --- /dev/null +++ b/Assets/TestScene/DefaultReflection.asset.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a946dcddc952b3747bec1f0822ba205a +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/bg.bmp b/Assets/bg.bmp new file mode 100644 index 0000000..b7f6212 Binary files /dev/null and b/Assets/bg.bmp differ diff --git a/Assets/bg.bmp.meta b/Assets/bg.bmp.meta new file mode 100644 index 0000000..18e4947 --- /dev/null +++ b/Assets/bg.bmp.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 7eb3b54003da60d49a2ce695aa001db3 +TextureImporter: + internalIDToNameTable: + - first: + 213: 21300000 + second: bg + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json new file mode 100644 index 0000000..2258d36 --- /dev/null +++ b/Packages/manifest.json @@ -0,0 +1,35 @@ +{ + "dependencies": { + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } +} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json new file mode 100644 index 0000000..58dcba5 --- /dev/null +++ b/Packages/packages-lock.json @@ -0,0 +1,247 @@ +{ + "dependencies": { + "com.unity.modules.ai": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.androidjni": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.animation": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.assetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.audio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.cloth": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.director": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.animation": "1.0.0" + } + }, + "com.unity.modules.imageconversion": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.particlesystem": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics2d": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.screencapture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.subsystems": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.terrain": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.terrainphysics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.terrain": "1.0.0" + } + }, + "com.unity.modules.tilemap": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics2d": "1.0.0" + } + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.umbra": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unityanalytics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.unitywebrequest": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unitywebrequestassetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestaudio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.audio": "1.0.0" + } + }, + "com.unity.modules.unitywebrequesttexture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestwww": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.vehicles": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.video": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.vr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } + }, + "com.unity.modules.wind": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.xr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.subsystems": "1.0.0" + } + } + } +} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..00b7855 Binary files /dev/null and b/ProjectSettings/AudioManager.asset differ diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..1cc0d5d Binary files /dev/null and b/ProjectSettings/DynamicsManager.asset differ diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..ce9dcc6 Binary files /dev/null and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..6c49351 Binary files /dev/null and b/ProjectSettings/EditorSettings.asset differ diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..fea6141 Binary files /dev/null and b/ProjectSettings/GraphicsSettings.asset differ diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..0ce91ba Binary files /dev/null and b/ProjectSettings/InputManager.asset differ diff --git a/ProjectSettings/MemorySettings.asset b/ProjectSettings/MemorySettings.asset new file mode 100644 index 0000000..5b5face --- /dev/null +++ b/ProjectSettings/MemorySettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!387306366 &1 +MemorySettings: + m_ObjectHideFlags: 0 + m_EditorMemorySettings: + m_MainAllocatorBlockSize: -1 + m_ThreadAllocatorBlockSize: -1 + m_MainGfxBlockSize: -1 + m_ThreadGfxBlockSize: -1 + m_CacheBlockSize: -1 + m_TypetreeBlockSize: -1 + m_ProfilerBlockSize: -1 + m_ProfilerEditorBlockSize: -1 + m_BucketAllocatorGranularity: -1 + m_BucketAllocatorBucketsCount: -1 + m_BucketAllocatorBlockSize: -1 + m_BucketAllocatorBlockCount: -1 + m_ProfilerBucketAllocatorGranularity: -1 + m_ProfilerBucketAllocatorBucketsCount: -1 + m_ProfilerBucketAllocatorBlockSize: -1 + m_ProfilerBucketAllocatorBlockCount: -1 + m_TempAllocatorSizeMain: -1 + m_JobTempAllocatorBlockSize: -1 + m_BackgroundJobTempAllocatorBlockSize: -1 + m_JobTempAllocatorReducedBlockSize: -1 + m_TempAllocatorSizeGIBakingWorker: -1 + m_TempAllocatorSizeNavMeshWorker: -1 + m_TempAllocatorSizeAudioWorker: -1 + m_TempAllocatorSizeCloudWorker: -1 + m_TempAllocatorSizeGfx: -1 + m_TempAllocatorSizeJobWorker: -1 + m_TempAllocatorSizeBackgroundWorker: -1 + m_TempAllocatorSizePreloadManager: -1 + m_PlatformMemorySettings: {} diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..dfe5550 Binary files /dev/null and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000..facc962 Binary files /dev/null and b/ProjectSettings/NetworkManager.asset differ diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000..69631ef --- /dev/null +++ b/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_EnablePreReleasePackages: 0 + m_AdvancedSettingsExpanded: 1 + m_ScopedRegistriesSettingsExpanded: 1 + m_SeeAllPackageVersions: 0 + m_DismissPreviewPackagesInUse: 0 + oneTimeWarningShown: 0 + m_Registries: + - m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + m_Capabilities: 7 + m_ConfigSource: 0 + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_Modified: 0 + m_ErrorMessage: + m_UserModificationsInstanceId: -854 + m_OriginalInstanceId: -856 + m_LoadAssets: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..9dbca71 Binary files /dev/null and b/ProjectSettings/Physics2DSettings.asset differ diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..17abcca Binary files /dev/null and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..9785246 --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2022.3.8f1 +m_EditorVersionWithRevision: 2022.3.8f1 (b5eafc012955) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..2bd9c8c Binary files /dev/null and b/ProjectSettings/QualitySettings.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..1b82fe4 Binary files /dev/null and b/ProjectSettings/TagManager.asset differ diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..a2a5e39 Binary files /dev/null and b/ProjectSettings/TimeManager.asset differ diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..a88bee0 --- /dev/null +++ b/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + m_PackageRequiringCoreStatsPresent: 0 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..2c7e4fb --- /dev/null +++ b/ProjectSettings/VFXManager.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 + m_MaxScrubTime: 30 + m_CompiledVersion: 0 + m_RuntimeVersion: 0 + m_RuntimeResources: {fileID: 0} + m_BatchEmptyLifetime: 300 diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/notepaper.png b/notepaper.png new file mode 100644 index 0000000..0f027e7 Binary files /dev/null and b/notepaper.png differ diff --git a/notepaper_small.png b/notepaper_small.png new file mode 100644 index 0000000..7ddf357 Binary files /dev/null and b/notepaper_small.png differ