├── .gitattributes ├── .gitignore ├── Assets ├── Ray Trace Demo.meta ├── Ray Trace Demo │ ├── DemoScene.unity │ ├── DemoScene.unity.meta │ ├── Mats.meta │ ├── Mats │ │ ├── Reflective.mat │ │ ├── Reflective.mat.meta │ │ ├── diffuse blue.mat │ │ ├── diffuse blue.mat.meta │ │ ├── diffuse green.mat │ │ ├── diffuse green.mat.meta │ │ ├── diffuse grey.mat │ │ ├── diffuse grey.mat.meta │ │ ├── diffuse orange.mat │ │ ├── diffuse orange.mat.meta │ │ ├── diffuse red.mat │ │ ├── diffuse red.mat.meta │ │ ├── tex1.mat │ │ ├── tex1.mat.meta │ │ ├── tex2.mat │ │ ├── tex2.mat.meta │ │ ├── transparent.mat │ │ └── transparent.mat.meta │ ├── Notes.cs │ ├── Notes.cs.meta │ ├── Textures.meta │ ├── Textures │ │ ├── Ceiling1-ColorMap.jpg │ │ ├── Ceiling1-ColorMap.jpg.meta │ │ ├── UvIMG2.jpg │ │ └── UvIMG2.jpg.meta │ ├── Tracer.cs │ └── Tracer.cs.meta ├── Standard Assets.meta └── Standard Assets │ ├── Editor.meta │ ├── Editor │ ├── ImageEffects.meta │ └── ImageEffects │ │ ├── AntialiasingEditor.cs │ │ ├── AntialiasingEditor.cs.meta │ │ ├── BloomAndFlaresEditor.cs │ │ ├── BloomAndFlaresEditor.cs.meta │ │ ├── BloomEditor.cs │ │ ├── BloomEditor.cs.meta │ │ ├── CameraMotionBlurEditor.cs │ │ ├── CameraMotionBlurEditor.cs.meta │ │ ├── ColorCorrectionCurvesEditor.cs │ │ ├── ColorCorrectionCurvesEditor.cs.meta │ │ ├── ColorCorrectionLookupEditor.cs │ │ ├── ColorCorrectionLookupEditor.cs.meta │ │ ├── CreaseShadingEditor.cs │ │ ├── CreaseShadingEditor.cs.meta │ │ ├── DepthOfFieldDeprecatedEditor.cs │ │ ├── DepthOfFieldDeprecatedEditor.cs.meta │ │ ├── DepthOfFieldEditor.cs │ │ ├── DepthOfFieldEditor.cs.meta │ │ ├── EdgeDetectionEditor.cs │ │ ├── EdgeDetectionEditor.cs.meta │ │ ├── NoiseAndGrainEditor.cs │ │ ├── NoiseAndGrainEditor.cs.meta │ │ ├── SunShaftsEditor.cs │ │ ├── SunShaftsEditor.cs.meta │ │ ├── TonemappingEditor.cs │ │ ├── TonemappingEditor.cs.meta │ │ ├── VignetteAndChromaticAberrationEditor.cs │ │ └── VignetteAndChromaticAberrationEditor.cs.meta │ ├── Effects.meta │ └── Effects │ ├── ImageEffects.meta │ └── ImageEffects │ ├── Scripts.meta │ ├── Scripts │ ├── Antialiasing.cs │ ├── Antialiasing.cs.meta │ ├── Bloom.cs │ ├── Bloom.cs.meta │ ├── BloomAndFlares.cs │ ├── BloomAndFlares.cs.meta │ ├── BloomOptimized.cs │ ├── BloomOptimized.cs.meta │ ├── Blur.cs │ ├── Blur.cs.meta │ ├── BlurOptimized.cs │ ├── BlurOptimized.cs.meta │ ├── CameraMotionBlur.cs │ ├── CameraMotionBlur.cs.meta │ ├── ColorCorrectionCurves.cs │ ├── ColorCorrectionCurves.cs.meta │ ├── ColorCorrectionLookup.cs │ ├── ColorCorrectionLookup.cs.meta │ ├── ColorCorrectionRamp.cs │ ├── ColorCorrectionRamp.cs.meta │ ├── ContrastEnhance.cs │ ├── ContrastEnhance.cs.meta │ ├── ContrastStretch.cs │ ├── ContrastStretch.cs.meta │ ├── CreaseShading.cs │ ├── CreaseShading.cs.meta │ ├── DepthOfField.cs │ ├── DepthOfField.cs.meta │ ├── DepthOfFieldDeprecated.cs │ ├── DepthOfFieldDeprecated.cs.meta │ ├── EdgeDetection.cs │ ├── EdgeDetection.cs.meta │ ├── Fisheye.cs │ ├── Fisheye.cs.meta │ ├── GlobalFog.cs │ ├── GlobalFog.cs.meta │ ├── Grayscale.cs │ ├── Grayscale.cs.meta │ ├── ImageEffectBase.cs │ ├── ImageEffectBase.cs.meta │ ├── ImageEffects.cs │ ├── ImageEffects.cs.meta │ ├── MotionBlur.cs │ ├── MotionBlur.cs.meta │ ├── NoiseAndGrain.cs │ ├── NoiseAndGrain.cs.meta │ ├── NoiseAndScratches.cs │ ├── NoiseAndScratches.cs.meta │ ├── PostEffectsBase.cs │ ├── PostEffectsBase.cs.meta │ ├── PostEffectsHelper.cs │ ├── PostEffectsHelper.cs.meta │ ├── Quads.cs │ ├── Quads.cs.meta │ ├── ScreenOverlay.cs │ ├── ScreenOverlay.cs.meta │ ├── ScreenSpaceAmbientObscurance.cs │ ├── ScreenSpaceAmbientObscurance.cs.meta │ ├── ScreenSpaceAmbientOcclusion.cs │ ├── ScreenSpaceAmbientOcclusion.cs.meta │ ├── SepiaTone.cs │ ├── SepiaTone.cs.meta │ ├── SunShafts.cs │ ├── SunShafts.cs.meta │ ├── TiltShift.cs │ ├── TiltShift.cs.meta │ ├── Tonemapping.cs │ ├── Tonemapping.cs.meta │ ├── Triangles.cs │ ├── Triangles.cs.meta │ ├── Twirl.cs │ ├── Twirl.cs.meta │ ├── VignetteAndChromaticAberration.cs │ ├── VignetteAndChromaticAberration.cs.meta │ ├── Vortex.cs │ └── Vortex.cs.meta │ ├── Shaders.meta │ ├── Shaders │ ├── BlendModesOverlay.shader │ ├── BlendModesOverlay.shader.meta │ ├── BlurEffectConeTaps.shader │ ├── BlurEffectConeTaps.shader.meta │ ├── CameraMotionBlur.shader │ ├── CameraMotionBlur.shader.meta │ ├── CameraMotionBlurDX11.shader │ ├── CameraMotionBlurDX11.shader.meta │ ├── ChromaticAberrationShader.shader │ ├── ChromaticAberrationShader.shader.meta │ ├── ColorCorrection3DLut.shader │ ├── ColorCorrection3DLut.shader.meta │ ├── ColorCorrectionCurves.shader │ ├── ColorCorrectionCurves.shader.meta │ ├── ColorCorrectionCurvesSimple.shader │ ├── ColorCorrectionCurvesSimple.shader.meta │ ├── ColorCorrectionEffect.shader │ ├── ColorCorrectionEffect.shader.meta │ ├── ColorCorrectionSelective.shader │ ├── ColorCorrectionSelective.shader.meta │ ├── Contrast Stretch.meta │ ├── Contrast Stretch │ │ ├── Adaptation.shader │ │ ├── Adaptation.shader.meta │ │ ├── Apply.shader │ │ ├── Apply.shader.meta │ │ ├── Luminance.shader │ │ ├── Luminance.shader.meta │ │ ├── MinMaxReduction.shader │ │ └── MinMaxReduction.shader.meta │ ├── ContrastComposite.shader │ ├── ContrastComposite.shader.meta │ ├── ConvertDepth.shader │ ├── ConvertDepth.shader.meta │ ├── CreaseApply.shader │ ├── CreaseApply.shader.meta │ ├── EdgeDetectNormals.shader │ ├── EdgeDetectNormals.shader.meta │ ├── FisheyeShader.shader │ ├── FisheyeShader.shader.meta │ ├── GlobalFog.shader │ ├── GlobalFog.shader.meta │ ├── GrayscaleEffect.shader │ ├── GrayscaleEffect.shader.meta │ ├── MotionBlur.shader │ ├── MotionBlur.shader.meta │ ├── MotionBlurClear.shader │ ├── MotionBlurClear.shader.meta │ ├── NoiseAndGrain.shader │ ├── NoiseAndGrain.shader.meta │ ├── NoiseAndGrainDX11.shader │ ├── NoiseAndGrainDX11.shader.meta │ ├── NoiseEffectShaderRGB.shader │ ├── NoiseEffectShaderRGB.shader.meta │ ├── NoiseEffectShaderYUV.shader │ ├── NoiseEffectShaderYUV.shader.meta │ ├── PrepareSunShaftsBlur.shader │ ├── PrepareSunShaftsBlur.shader.meta │ ├── RadialBlur.shader │ ├── RadialBlur.shader.meta │ ├── SSAOShader.shader │ ├── SSAOShader.shader.meta │ ├── ScreenSpaceAmbientObscurance.shader │ ├── ScreenSpaceAmbientObscurance.shader.meta │ ├── ScreenSpaceRaytrace.cginc │ ├── ScreenSpaceRaytrace.cginc.meta │ ├── SepiaToneEffect.shader │ ├── SepiaToneEffect.shader.meta │ ├── ShowAlphaChannel.shader │ ├── ShowAlphaChannel.shader.meta │ ├── SimpleClear.shader │ ├── SimpleClear.shader.meta │ ├── SunShaftsComposite.shader │ ├── SunShaftsComposite.shader.meta │ ├── Tonemapper.shader │ ├── Tonemapper.shader.meta │ ├── TwirlEffect.shader │ ├── TwirlEffect.shader.meta │ ├── VignettingShader.shader │ ├── VignettingShader.shader.meta │ ├── VortexEffect.shader │ ├── VortexEffect.shader.meta │ ├── _Antialiasing.meta │ ├── _Antialiasing │ │ ├── DLAA.shader │ │ ├── DLAA.shader.meta │ │ ├── FXAA2.shader │ │ ├── FXAA2.shader.meta │ │ ├── FXAA3Console.shader │ │ ├── FXAA3Console.shader.meta │ │ ├── FXAAPreset2.shader │ │ ├── FXAAPreset2.shader.meta │ │ ├── FXAAPreset3.shader │ │ ├── FXAAPreset3.shader.meta │ │ ├── NFAA.shader │ │ ├── NFAA.shader.meta │ │ ├── SSAA.shader │ │ └── SSAA.shader.meta │ ├── _BloomAndFlares.meta │ ├── _BloomAndFlares │ │ ├── Blend.shader │ │ ├── Blend.shader.meta │ │ ├── BlendForBloom.shader │ │ ├── BlendForBloom.shader.meta │ │ ├── BlendOneOne.shader │ │ ├── BlendOneOne.shader.meta │ │ ├── BlurAndFlares.shader │ │ ├── BlurAndFlares.shader.meta │ │ ├── BrightPassFilter.shader │ │ ├── BrightPassFilter.shader.meta │ │ ├── BrightPassFilter2.shader │ │ ├── BrightPassFilter2.shader.meta │ │ ├── LensFlareCreate.shader │ │ ├── LensFlareCreate.shader.meta │ │ ├── MobileBloom.shader │ │ ├── MobileBloom.shader.meta │ │ ├── MobileBlur.shader │ │ ├── MobileBlur.shader.meta │ │ ├── MultiPassHollywoodFlares.shader │ │ ├── MultiPassHollywoodFlares.shader.meta │ │ ├── SeparableBlurPlus.shader │ │ ├── SeparableBlurPlus.shader.meta │ │ ├── VignetteShader.shader │ │ └── VignetteShader.shader.meta │ ├── _DepthOfField.meta │ ├── _DepthOfField │ │ ├── Bokeh34.shader │ │ ├── Bokeh34.shader.meta │ │ ├── DepthOfField34.shader │ │ ├── DepthOfField34.shader.meta │ │ ├── DepthOfFieldDX11.shader │ │ ├── DepthOfFieldDX11.shader.meta │ │ ├── DepthOfFieldScatter.shader │ │ ├── DepthOfFieldScatter.shader.meta │ │ ├── SeparableBlur.shader │ │ ├── SeparableBlur.shader.meta │ │ ├── SeparableWeightedBlurDof34.shader │ │ ├── SeparableWeightedBlurDof34.shader.meta │ │ ├── TiltShiftHdrLensBlur.shader │ │ └── TiltShiftHdrLensBlur.shader.meta │ ├── frag_ao.cginc │ └── frag_ao.cginc.meta │ ├── Textures.meta │ └── Textures │ ├── ContrastEnhanced3D16.png │ ├── ContrastEnhanced3D16.png.meta │ ├── HexShape.psd │ ├── HexShape.psd.meta │ ├── MotionBlurJitter.png │ ├── MotionBlurJitter.png.meta │ ├── Neutral3D16.png │ ├── Neutral3D16.png.meta │ ├── Noise.png │ ├── Noise.png.meta │ ├── NoiseAndGrain.png │ ├── NoiseAndGrain.png.meta │ ├── NoiseEffectGrain.png │ ├── NoiseEffectGrain.png.meta │ ├── NoiseEffectScratch.png │ ├── NoiseEffectScratch.png.meta │ ├── RandomVectors.png │ ├── RandomVectors.png.meta │ ├── SphereShape.psd │ ├── SphereShape.psd.meta │ ├── VignetteMask.png │ ├── VignetteMask.png.meta │ ├── color correction ramp.png │ ├── color correction ramp.png.meta │ ├── grayscale ramp.png │ └── grayscale ramp.png.meta ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Never ignore Asset meta data 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # TextMesh Pro files 20 | [Aa]ssets/TextMesh*Pro/ 21 | 22 | # Autogenerated Jetbrains Rider plugin 23 | [Aa]ssets/Plugins/Editor/JetBrains* 24 | 25 | # Visual Studio cache directory 26 | .vs/ 27 | 28 | # Gradle cache directory 29 | .gradle/ 30 | 31 | # Autogenerated VS/MD/Consulo solution and project files 32 | ExportedObj/ 33 | .consulo/ 34 | *.csproj 35 | *.unityproj 36 | *.sln 37 | *.suo 38 | *.tmp 39 | *.user 40 | *.userprefs 41 | *.pidb 42 | *.booproj 43 | *.svd 44 | *.pdb 45 | *.mdb 46 | *.opendb 47 | *.VC.db 48 | 49 | # Unity3D generated meta files 50 | *.pidb.meta 51 | *.pdb.meta 52 | *.mdb.meta 53 | 54 | # Unity3D generated file on crash reports 55 | sysinfo.txt 56 | 57 | # Builds 58 | *.apk 59 | *.unitypackage 60 | 61 | # Crashlytics generated file 62 | crashlytics-build.properties 63 | 64 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f42e8fc53001eae4f88440bf4088c881 3 | folderAsset: yes 4 | timeCreated: 1496129302 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/DemoScene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/DemoScene.unity -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/DemoScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaf6ee91f9a5da04a9b06187f3589cd3 3 | timeCreated: 1496129754 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43058d20f475c5b4d82df0bdc92058ec 3 | folderAsset: yes 4 | timeCreated: 1496129563 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/Reflective.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/Reflective.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/Reflective.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40f842bdbb9876d4ba9c17afab85de78 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse blue.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/diffuse blue.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f253245cd7007d4eb3ac9ca331d6827 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse green.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/diffuse green.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 071c6a7cfa93fc04fb4ba1b78c1fcd2a 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse grey.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/diffuse grey.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse grey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2caa1e98a7aa71a458c0e25c3bdbc333 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse orange.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/diffuse orange.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse orange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd06e0f5b8aebe44f8669dbfab54f9c4 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse red.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/diffuse red.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/diffuse red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37f329de0c064bc4f8b28b37c73ccd30 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/tex1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/tex1.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/tex1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 174309ec83086d14e9d9b7a52fc429bb 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/tex2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/tex2.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/tex2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0641d670d6af414d903dfeb2ae101a7 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/transparent.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Mats/transparent.mat -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Mats/transparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca635ff9a8439674b997169afe3e2efe 3 | timeCreated: 1496129588 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Notes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | public class Notes : MonoBehaviour { 8 | 9 | [TextArea(4, 999)] 10 | public string notes; 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Notes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 192c36da0fa379a4093e1555f7fe292f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f7ef1dfbb0ddcb4b8816393066956cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Textures/Ceiling1-ColorMap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Textures/Ceiling1-ColorMap.jpg -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Textures/Ceiling1-ColorMap.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2d5def38c8a63c4aa2185b048939af0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 1 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | - serializedVersion: 3 74 | buildTarget: Standalone 75 | maxTextureSize: 2048 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | androidETC2FallbackOverride: 0 84 | forceMaximumCompressionQuality_BC6H_BC7: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | physicsShape: [] 90 | bones: [] 91 | spriteID: 92 | internalID: 0 93 | vertices: [] 94 | indices: 95 | edges: [] 96 | weights: [] 97 | secondaryTextures: [] 98 | spritePackingTag: 99 | pSDRemoveMatte: 0 100 | pSDShowRemoveMatteOption: 0 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Textures/UvIMG2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Ray Trace Demo/Textures/UvIMG2.jpg -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Textures/UvIMG2.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae663219118db2e429254d7fbf1f321f 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 1 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | - serializedVersion: 3 74 | buildTarget: Standalone 75 | maxTextureSize: 2048 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | androidETC2FallbackOverride: 0 84 | forceMaximumCompressionQuality_BC6H_BC7: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | physicsShape: [] 90 | bones: [] 91 | spriteID: 92 | internalID: 0 93 | vertices: [] 94 | indices: 95 | edges: [] 96 | weights: [] 97 | secondaryTextures: [] 98 | spritePackingTag: 99 | pSDRemoveMatte: 0 100 | pSDShowRemoveMatteOption: 0 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ray Trace Demo/Tracer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3decddb5477fcd438ac308cc098f5d5 3 | timeCreated: 1496129366 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 160b8755a9c869d4a86c2c233bc17929 3 | folderAsset: yes 4 | timeCreated: 1496097480 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f7308500f322e644817ccfc3e0a17a5 3 | folderAsset: yes 4 | timeCreated: 1436977287 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 225198e07aaae3547a6d1f6e7177555f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.ImageEffects 6 | { 7 | [CustomEditor(typeof (Antialiasing))] 8 | public class AntialiasingEditor : Editor 9 | { 10 | private SerializedObject serObj; 11 | 12 | private SerializedProperty mode; 13 | 14 | private SerializedProperty showGeneratedNormals; 15 | private SerializedProperty offsetScale; 16 | private SerializedProperty blurRadius; 17 | private SerializedProperty dlaaSharp; 18 | 19 | private SerializedProperty edgeThresholdMin; 20 | private SerializedProperty edgeThreshold; 21 | private SerializedProperty edgeSharpness; 22 | 23 | 24 | private void OnEnable() 25 | { 26 | serObj = new SerializedObject(target); 27 | 28 | mode = serObj.FindProperty("mode"); 29 | 30 | showGeneratedNormals = serObj.FindProperty("showGeneratedNormals"); 31 | offsetScale = serObj.FindProperty("offsetScale"); 32 | blurRadius = serObj.FindProperty("blurRadius"); 33 | dlaaSharp = serObj.FindProperty("dlaaSharp"); 34 | 35 | edgeThresholdMin = serObj.FindProperty("edgeThresholdMin"); 36 | edgeThreshold = serObj.FindProperty("edgeThreshold"); 37 | edgeSharpness = serObj.FindProperty("edgeSharpness"); 38 | } 39 | 40 | 41 | public override void OnInspectorGUI() 42 | { 43 | serObj.Update(); 44 | 45 | GUILayout.Label("Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel); 46 | 47 | EditorGUILayout.PropertyField(mode, new GUIContent("Technique")); 48 | 49 | Material mat = (target as Antialiasing).CurrentAAMaterial(); 50 | if (null == mat && (target as Antialiasing).enabled) 51 | { 52 | EditorGUILayout.HelpBox("This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning); 53 | } 54 | 55 | if (mode.enumValueIndex == (int) AAMode.NFAA) 56 | { 57 | EditorGUILayout.PropertyField(offsetScale, new GUIContent("Edge Detect Ofs")); 58 | EditorGUILayout.PropertyField(blurRadius, new GUIContent("Blur Radius")); 59 | EditorGUILayout.PropertyField(showGeneratedNormals, new GUIContent("Show Normals")); 60 | } 61 | else if (mode.enumValueIndex == (int) AAMode.DLAA) 62 | { 63 | EditorGUILayout.PropertyField(dlaaSharp, new GUIContent("Sharp")); 64 | } 65 | else if (mode.enumValueIndex == (int) AAMode.FXAA3Console) 66 | { 67 | EditorGUILayout.PropertyField(edgeThresholdMin, new GUIContent("Edge Min Threshhold")); 68 | EditorGUILayout.PropertyField(edgeThreshold, new GUIContent("Edge Threshhold")); 69 | EditorGUILayout.PropertyField(edgeSharpness, new GUIContent("Edge Sharpness")); 70 | } 71 | 72 | serObj.ApplyModifiedProperties(); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba15fa37442517749a3c4640a4ad4054 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4deca87cb459d1642ac8f734856ca84e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/BloomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43fcc28c40e404d4eabfc88b1dbda7b5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80cbbe1c107bf5e43a96347d3dfc2658 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4a9489f73e4f0344ab3fc97bdf5170b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.ImageEffects 6 | { 7 | [CustomEditor (typeof(ColorCorrectionLookup))] 8 | class ColorCorrectionLookupEditor : Editor 9 | { 10 | SerializedObject serObj; 11 | 12 | void OnEnable () { 13 | serObj = new SerializedObject (target); 14 | } 15 | 16 | private Texture2D tempClutTex2D; 17 | 18 | 19 | public override void OnInspectorGUI () { 20 | serObj.Update (); 21 | 22 | EditorGUILayout.LabelField("Converts textures into color lookup volumes (for grading)", EditorStyles.miniLabel); 23 | 24 | //EditorGUILayout.LabelField("Change Lookup Texture (LUT):"); 25 | //EditorGUILayout.BeginHorizontal (); 26 | //Rect r = GUILayoutUtility.GetAspectRect(1.0ff); 27 | 28 | Rect r; Texture2D t; 29 | 30 | //EditorGUILayout.Space(); 31 | tempClutTex2D = EditorGUILayout.ObjectField (" Based on", tempClutTex2D, typeof(Texture2D), false) as Texture2D; 32 | if (tempClutTex2D == null) { 33 | t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; 34 | if (t) tempClutTex2D = t; 35 | } 36 | 37 | Texture2D tex = tempClutTex2D; 38 | 39 | if (tex && (target as ColorCorrectionLookup).basedOnTempTex != AssetDatabase.GetAssetPath(tex)) 40 | { 41 | EditorGUILayout.Separator(); 42 | if (!(target as ColorCorrectionLookup).ValidDimensions(tex)) 43 | { 44 | EditorGUILayout.HelpBox ("Invalid texture dimensions!\nPick another texture or adjust dimension to e.g. 256x16.", MessageType.Warning); 45 | } 46 | else if (GUILayout.Button ("Convert and Apply")) 47 | { 48 | string path = AssetDatabase.GetAssetPath (tex); 49 | TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; 50 | bool doImport = textureImporter.isReadable == false; 51 | if (textureImporter.mipmapEnabled == true) { 52 | doImport = true; 53 | } 54 | if (textureImporter.textureCompression != TextureImporterCompression.Uncompressed) { 55 | doImport = true; 56 | } 57 | 58 | if (doImport) 59 | { 60 | textureImporter.isReadable = true; 61 | textureImporter.mipmapEnabled = false; 62 | textureImporter.textureCompression = TextureImporterCompression.Uncompressed; 63 | AssetDatabase.ImportAsset (path, ImportAssetOptions.ForceUpdate); 64 | //tex = AssetDatabase.LoadMainAssetAtPath(path); 65 | } 66 | 67 | (target as ColorCorrectionLookup).Convert(tex, path); 68 | } 69 | } 70 | 71 | if ((target as ColorCorrectionLookup).basedOnTempTex != "") 72 | { 73 | EditorGUILayout.HelpBox("Using " + (target as ColorCorrectionLookup).basedOnTempTex, MessageType.Info); 74 | t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; 75 | if (t) { 76 | r = GUILayoutUtility.GetLastRect(); 77 | r = GUILayoutUtility.GetRect(r.width, 20); 78 | r.x += r.width * 0.05f/2.0f; 79 | r.width *= 0.95f; 80 | GUI.DrawTexture (r, t); 81 | GUILayoutUtility.GetRect(r.width, 4); 82 | } 83 | } 84 | 85 | //EditorGUILayout.EndHorizontal (); 86 | 87 | serObj.ApplyModifiedProperties(); 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66c17be95fbf398439ea09f8892a8b43 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEditor.AnimatedValues; 4 | using UnityEngine; 5 | 6 | namespace UnityStandardAssets.ImageEffects 7 | { 8 | [CustomEditor(typeof(CreaseShading))] 9 | class CreaseShadingEditor : Editor { 10 | SerializedObject serObj; 11 | 12 | SerializedProperty m_intensity; 13 | SerializedProperty m_softness; 14 | SerializedProperty m_spread; 15 | 16 | AnimBool m_showSoftnessWarning = new AnimBool(); 17 | AnimBool m_showSpreadWarning = new AnimBool(); 18 | 19 | private bool softnessWarningValue { get { return m_softness.intValue > 4; } } 20 | private bool spreadWarningValue { get { return m_spread.floatValue > 4; } } 21 | 22 | void OnEnable () { 23 | serObj = new SerializedObject (target); 24 | 25 | m_intensity = serObj.FindProperty("intensity"); 26 | m_softness = serObj.FindProperty("softness"); 27 | m_spread = serObj.FindProperty("spread"); 28 | 29 | m_showSoftnessWarning.valueChanged.AddListener(Repaint); 30 | m_showSpreadWarning.valueChanged.AddListener(Repaint); 31 | 32 | m_showSoftnessWarning.value = softnessWarningValue; 33 | m_showSpreadWarning.value = spreadWarningValue; 34 | } 35 | 36 | public override void OnInspectorGUI () { 37 | serObj.Update (); 38 | 39 | EditorGUILayout.Slider(m_intensity, -5.0f, 5.0f, new GUIContent("Intensity")); 40 | 41 | EditorGUILayout.IntSlider(m_softness, 0, 15, new GUIContent("Softness")); 42 | m_showSoftnessWarning.target = softnessWarningValue; 43 | if (EditorGUILayout.BeginFadeGroup(m_showSoftnessWarning.faded)) 44 | { 45 | EditorGUILayout.HelpBox("High Softness value might reduce performance.", MessageType.Warning, false); 46 | } 47 | EditorGUILayout.EndFadeGroup(); 48 | 49 | EditorGUILayout.Slider(m_spread, 0.0f, 50.0f, new GUIContent("Spread")); 50 | m_showSpreadWarning.target = spreadWarningValue; 51 | if (EditorGUILayout.BeginFadeGroup(m_showSpreadWarning.faded)) 52 | { 53 | EditorGUILayout.HelpBox("High Spread value might introduce visual artifacts.", MessageType.Warning, false); 54 | } 55 | EditorGUILayout.EndFadeGroup(); 56 | 57 | serObj.ApplyModifiedProperties (); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6788af605d2f1244789565913bb4e7f6 3 | timeCreated: 1434032656 4 | licenseType: Store 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 943c59645eb905144a0990b57e13a6f9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 427fdf36119bab44a9131abd19b90f57 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.ImageEffects 6 | { 7 | [CustomEditor (typeof(EdgeDetection))] 8 | class EdgeDetectionEditor : Editor 9 | { 10 | SerializedObject serObj; 11 | 12 | SerializedProperty mode; 13 | SerializedProperty sensitivityDepth; 14 | SerializedProperty sensitivityNormals; 15 | 16 | SerializedProperty lumThreshold; 17 | 18 | SerializedProperty edgesOnly; 19 | SerializedProperty edgesOnlyBgColor; 20 | 21 | SerializedProperty edgeExp; 22 | SerializedProperty sampleDist; 23 | 24 | 25 | void OnEnable () { 26 | serObj = new SerializedObject (target); 27 | 28 | mode = serObj.FindProperty("mode"); 29 | 30 | sensitivityDepth = serObj.FindProperty("sensitivityDepth"); 31 | sensitivityNormals = serObj.FindProperty("sensitivityNormals"); 32 | 33 | lumThreshold = serObj.FindProperty("lumThreshold"); 34 | 35 | edgesOnly = serObj.FindProperty("edgesOnly"); 36 | edgesOnlyBgColor = serObj.FindProperty("edgesOnlyBgColor"); 37 | 38 | edgeExp = serObj.FindProperty("edgeExp"); 39 | sampleDist = serObj.FindProperty("sampleDist"); 40 | } 41 | 42 | 43 | public override void OnInspectorGUI () { 44 | serObj.Update (); 45 | 46 | GUILayout.Label("Detects spatial differences and converts into black outlines", EditorStyles.miniBoldLabel); 47 | EditorGUILayout.PropertyField (mode, new GUIContent("Mode")); 48 | 49 | if (mode.intValue < 2) { 50 | EditorGUILayout.PropertyField (sensitivityDepth, new GUIContent(" Depth Sensitivity")); 51 | EditorGUILayout.PropertyField (sensitivityNormals, new GUIContent(" Normals Sensitivity")); 52 | } 53 | else if (mode.intValue < 4) { 54 | EditorGUILayout.PropertyField (edgeExp, new GUIContent(" Edge Exponent")); 55 | } 56 | else { 57 | // lum based mode 58 | EditorGUILayout.PropertyField (lumThreshold, new GUIContent(" Luminance Threshold")); 59 | } 60 | 61 | EditorGUILayout.PropertyField (sampleDist, new GUIContent(" Sample Distance")); 62 | 63 | EditorGUILayout.Separator (); 64 | 65 | GUILayout.Label ("Background Options"); 66 | edgesOnly.floatValue = EditorGUILayout.Slider (" Edges only", edgesOnly.floatValue, 0.0f, 1.0f); 67 | EditorGUILayout.PropertyField (edgesOnlyBgColor, new GUIContent (" Color")); 68 | 69 | serObj.ApplyModifiedProperties(); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5f1618d14cd80f4da910f00b04af37f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abd63abcc46fbcb4588164b671b52d3b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54f6f6313f2aecc4d81035ec0031e313 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/TonemappingEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f7cab214f141f642b87a5bdbd14653e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.ImageEffects 6 | { 7 | [CustomEditor (typeof(VignetteAndChromaticAberration))] 8 | class VignetteAndChromaticAberrationEditor : Editor 9 | { 10 | private SerializedObject m_SerObj; 11 | private SerializedProperty m_Mode; 12 | private SerializedProperty m_Intensity; // intensity == 0 disables pre pass (optimization) 13 | private SerializedProperty m_ChromaticAberration; 14 | private SerializedProperty m_AxialAberration; 15 | private SerializedProperty m_Blur; // blur == 0 disables blur pass (optimization) 16 | private SerializedProperty m_BlurSpread; 17 | private SerializedProperty m_BlurDistance; 18 | private SerializedProperty m_LuminanceDependency; 19 | 20 | 21 | void OnEnable () 22 | { 23 | m_SerObj = new SerializedObject (target); 24 | m_Mode = m_SerObj.FindProperty ("mode"); 25 | m_Intensity = m_SerObj.FindProperty ("intensity"); 26 | m_ChromaticAberration = m_SerObj.FindProperty ("chromaticAberration"); 27 | m_AxialAberration = m_SerObj.FindProperty ("axialAberration"); 28 | m_Blur = m_SerObj.FindProperty ("blur"); 29 | m_BlurSpread = m_SerObj.FindProperty ("blurSpread"); 30 | m_LuminanceDependency = m_SerObj.FindProperty ("luminanceDependency"); 31 | m_BlurDistance = m_SerObj.FindProperty ("blurDistance"); 32 | } 33 | 34 | 35 | public override void OnInspectorGUI () 36 | { 37 | m_SerObj.Update (); 38 | 39 | EditorGUILayout.LabelField("Simulates the common lens artifacts 'Vignette' and 'Aberration'", EditorStyles.miniLabel); 40 | 41 | EditorGUILayout.Slider(m_Intensity, 0.0f, 1.0f, new GUIContent("Vignetting")); 42 | EditorGUILayout.Slider(m_Blur, 0.0f, 1.0f, new GUIContent(" Blurred Corners")); 43 | if (m_Blur.floatValue>0.0f) 44 | EditorGUILayout.Slider(m_BlurSpread, 0.0f, 1.0f, new GUIContent(" Blur Distance")); 45 | 46 | EditorGUILayout.Separator (); 47 | 48 | EditorGUILayout.PropertyField (m_Mode, new GUIContent("Aberration")); 49 | if (m_Mode.intValue>0) 50 | { 51 | EditorGUILayout.Slider(m_ChromaticAberration, 0.0f, 5.0f, new GUIContent(" Tangential Aberration")); 52 | EditorGUILayout.Slider(m_AxialAberration, 0.0f, 5.0f, new GUIContent(" Axial Aberration")); 53 | m_LuminanceDependency.floatValue = EditorGUILayout.Slider(" Contrast Dependency", m_LuminanceDependency.floatValue, 0.001f, 1.0f); 54 | m_BlurDistance.floatValue = EditorGUILayout.Slider(" Blur Distance", m_BlurDistance.floatValue, 0.001f, 5.0f); 55 | } 56 | else 57 | EditorGUILayout.PropertyField (m_ChromaticAberration, new GUIContent(" Chromatic Aberration")); 58 | 59 | m_SerObj.ApplyModifiedProperties(); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08126bf2baa528c4cb9c60340a24e5d6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 115d1f9d9bd29064ab981e57c8fc8cdf 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6e0c95a128e14227939c51b5d9ad74e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd3e1490c3d9a7a498538315414d5129 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Antialiasing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 646b5bc27a658f447b1d929fd5ffbd70 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - ssaaShader: {fileID: 4800000, guid: b3728d1488b02490cbd196c7941bf1f8, type: 3} 7 | - dlaaShader: {fileID: 4800000, guid: 017ca72b9e8a749058d13ebd527e98fa, type: 3} 8 | - nfaaShader: {fileID: 4800000, guid: ce0cb2621f6d84e21a87414e471a3cce, type: 3} 9 | - shaderFXAAPreset2: {fileID: 4800000, guid: 6f1418cffd12146f2a83be795f6fa5a7, type: 3} 10 | - shaderFXAAPreset3: {fileID: 4800000, guid: c182fa94a5a0a4c02870641efcd38cd5, type: 3} 11 | - shaderFXAAII: {fileID: 4800000, guid: cd5b323dcc592457790ff18b528f5e67, type: 3} 12 | - shaderFXAAIII: {fileID: 4800000, guid: c547503fff0e8482ea5793727057041c, type: 3} 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Bloom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fceaeb339b971b429c4cc600acabd13 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, 7 | type: 3} 8 | - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} 9 | - screenBlendShader: {fileID: 4800000, guid: 7856cbff0a0ca45c787d5431eb805bb0, type: 3} 10 | - blurAndFlaresShader: {fileID: 4800000, guid: be6e39cf196f146d5be72fbefb18ed75, 11 | type: 3} 12 | - brightPassFilterShader: {fileID: 4800000, guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c, 13 | type: 3} 14 | executionOrder: 0 15 | icon: {instanceID: 0} 16 | userData: 17 | assetBundleName: 18 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/BloomAndFlares.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02536f33053638549ab5c50ff3ecc0de 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - lensFlareVignetteMask: {fileID: 2800000, guid: 95ef4804fe0be4c999ddaa383536cde8, 7 | type: 3} 8 | - lensFlareShader: {fileID: 4800000, guid: 459fe69d2f6d74ddb92f04dbf45a866b, type: 3} 9 | - vignetteShader: {fileID: 4800000, guid: 627943dc7a9a74286b70a4f694a0acd5, type: 3} 10 | - separableBlurShader: {fileID: 4800000, guid: a9df009a214e24a5ebbf271595f8d5b6, 11 | type: 3} 12 | - addBrightStuffOneOneShader: {fileID: 4800000, guid: f7898d203e9b94c0dbe2bf9dd5cb32c0, 13 | type: 3} 14 | - screenBlendShader: {fileID: 4800000, guid: 53b3960ee3d3d4a5caa8d5473d120187, type: 3} 15 | - hollywoodFlaresShader: {fileID: 4800000, guid: e2baf3cae8edc4daf94c9adc2154be00, 16 | type: 3} 17 | - brightPassFilterShader: {fileID: 4800000, guid: 186c4c0d31e314f049595dcbaf4ca129, 18 | type: 3} 19 | executionOrder: 0 20 | icon: {instanceID: 0} 21 | userData: 22 | assetBundleName: 23 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | [AddComponentMenu ("Image Effects/Bloom and Glow/Bloom (Optimized)")] 9 | public class BloomOptimized : PostEffectsBase 10 | { 11 | 12 | public enum Resolution 13 | { 14 | Low = 0, 15 | High = 1, 16 | } 17 | 18 | public enum BlurType 19 | { 20 | Standard = 0, 21 | Sgx = 1, 22 | } 23 | 24 | [Range(0.0f, 1.5f)] 25 | public float threshold = 0.25f; 26 | [Range(0.0f, 2.5f)] 27 | public float intensity = 0.75f; 28 | 29 | [Range(0.25f, 5.5f)] 30 | public float blurSize = 1.0f; 31 | 32 | Resolution resolution = Resolution.Low; 33 | [Range(1, 4)] 34 | public int blurIterations = 1; 35 | 36 | public BlurType blurType= BlurType.Standard; 37 | 38 | public Shader fastBloomShader = null; 39 | private Material fastBloomMaterial = null; 40 | 41 | 42 | public override bool CheckResources () 43 | { 44 | CheckSupport (false); 45 | 46 | fastBloomMaterial = CheckShaderAndCreateMaterial (fastBloomShader, fastBloomMaterial); 47 | 48 | if (!isSupported) 49 | ReportAutoDisable (); 50 | return isSupported; 51 | } 52 | 53 | void OnDisable () 54 | { 55 | if (fastBloomMaterial) 56 | DestroyImmediate (fastBloomMaterial); 57 | } 58 | 59 | void OnRenderImage (RenderTexture source, RenderTexture destination) 60 | { 61 | if (CheckResources() == false) 62 | { 63 | Graphics.Blit (source, destination); 64 | return; 65 | } 66 | 67 | int divider = resolution == Resolution.Low ? 4 : 2; 68 | float widthMod = resolution == Resolution.Low ? 0.5f : 1.0f; 69 | 70 | fastBloomMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod, 0.0f, threshold, intensity)); 71 | source.filterMode = FilterMode.Bilinear; 72 | 73 | var rtW= source.width/divider; 74 | var rtH= source.height/divider; 75 | 76 | // downsample 77 | RenderTexture rt = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 78 | rt.filterMode = FilterMode.Bilinear; 79 | Graphics.Blit (source, rt, fastBloomMaterial, 1); 80 | 81 | var passOffs= blurType == BlurType.Standard ? 0 : 2; 82 | 83 | for(int i = 0; i < blurIterations; i++) 84 | { 85 | fastBloomMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod + (i*1.0f), 0.0f, threshold, intensity)); 86 | 87 | // vertical blur 88 | RenderTexture rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 89 | rt2.filterMode = FilterMode.Bilinear; 90 | Graphics.Blit (rt, rt2, fastBloomMaterial, 2 + passOffs); 91 | RenderTexture.ReleaseTemporary (rt); 92 | rt = rt2; 93 | 94 | // horizontal blur 95 | rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 96 | rt2.filterMode = FilterMode.Bilinear; 97 | Graphics.Blit (rt, rt2, fastBloomMaterial, 3 + passOffs); 98 | RenderTexture.ReleaseTemporary (rt); 99 | rt = rt2; 100 | } 101 | 102 | fastBloomMaterial.SetTexture ("_Bloom", rt); 103 | 104 | Graphics.Blit (source, destination, fastBloomMaterial, 0); 105 | 106 | RenderTexture.ReleaseTemporary (rt); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/BloomOptimized.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4975a6e437fc3b149a8cd508ce5bdd69 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - fastBloomShader: {fileID: 4800000, guid: 68a00c837b82e4c6d92e7da765dc5f1d, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Blur.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34382083ad114a07d000fbfb8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - blurShader: {fileID: 4800000, guid: 57e6deea7c2924e22a5138e2b70bb4dc, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | [AddComponentMenu ("Image Effects/Blur/Blur (Optimized)")] 9 | public class BlurOptimized : PostEffectsBase 10 | { 11 | 12 | [Range(0, 2)] 13 | public int downsample = 1; 14 | 15 | public enum BlurType { 16 | StandardGauss = 0, 17 | SgxGauss = 1, 18 | } 19 | 20 | [Range(0.0f, 10.0f)] 21 | public float blurSize = 3.0f; 22 | 23 | [Range(1, 4)] 24 | public int blurIterations = 2; 25 | 26 | public BlurType blurType= BlurType.StandardGauss; 27 | 28 | public Shader blurShader = null; 29 | private Material blurMaterial = null; 30 | 31 | 32 | public override bool CheckResources () { 33 | CheckSupport (false); 34 | 35 | blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); 36 | 37 | if (!isSupported) 38 | ReportAutoDisable (); 39 | return isSupported; 40 | } 41 | 42 | public void OnDisable () { 43 | if (blurMaterial) 44 | DestroyImmediate (blurMaterial); 45 | } 46 | 47 | public void OnRenderImage (RenderTexture source, RenderTexture destination) { 48 | if (CheckResources() == false) { 49 | Graphics.Blit (source, destination); 50 | return; 51 | } 52 | 53 | float widthMod = 1.0f / (1.0f * (1<> downsample; 59 | int rtH = source.height >> downsample; 60 | 61 | // downsample 62 | RenderTexture rt = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 63 | 64 | rt.filterMode = FilterMode.Bilinear; 65 | Graphics.Blit (source, rt, blurMaterial, 0); 66 | 67 | var passOffs= blurType == BlurType.StandardGauss ? 0 : 2; 68 | 69 | for(int i = 0; i < blurIterations; i++) { 70 | float iterationOffs = (i*1.0f); 71 | blurMaterial.SetVector ("_Parameter", new Vector4 (blurSize * widthMod + iterationOffs, -blurSize * widthMod - iterationOffs, 0.0f, 0.0f)); 72 | 73 | // vertical blur 74 | RenderTexture rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 75 | rt2.filterMode = FilterMode.Bilinear; 76 | Graphics.Blit (rt, rt2, blurMaterial, 1 + passOffs); 77 | RenderTexture.ReleaseTemporary (rt); 78 | rt = rt2; 79 | 80 | // horizontal blur 81 | rt2 = RenderTexture.GetTemporary (rtW, rtH, 0, source.format); 82 | rt2.filterMode = FilterMode.Bilinear; 83 | Graphics.Blit (rt, rt2, blurMaterial, 2 + passOffs); 84 | RenderTexture.ReleaseTemporary (rt); 85 | rt = rt2; 86 | } 87 | 88 | Graphics.Blit (rt, destination); 89 | 90 | RenderTexture.ReleaseTemporary (rt); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/BlurOptimized.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fc6bde01469c7b4badee5362f191d96 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - blurShader: {fileID: 4800000, guid: f9d5fa183cd6b45eeb1491f74863cd91, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/CameraMotionBlur.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97e9b95cf609d96409b6c40519432957 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: 85a88efa8c871af4a9d17c64791b6f4f, type: 3} 7 | - dx11MotionBlurShader: {fileID: 4800000, guid: f1b13d7a80660504a858ea24cfa418c6, 8 | type: 3} 9 | - replacementClear: {fileID: 4800000, guid: 7699c5fbfa27745a1abe111ab7bf9785, type: 3} 10 | - noiseTexture: {fileID: 2800000, guid: 31f5a8611c4ed1245b18456206e798dc, type: 3} 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionCurves.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fd999d1b2cf94a45a5b0a47ce074bef 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - colorCorrectionCurvesShader: {fileID: 4800000, guid: 62bcade1028c24ca1a39760ed84b9487, 7 | type: 3} 8 | - simpleColorCorrectionCurvesShader: {fileID: 4800000, guid: 438ddd58d82c84d9eb1fdc56111702e1, 9 | type: 3} 10 | - colorCorrectionSelectiveShader: {fileID: 4800000, guid: e515e0f94cefc4c0db54b45cba621544, 11 | type: 3} 12 | executionOrder: 0 13 | icon: {instanceID: 0} 14 | userData: 15 | assetBundleName: 16 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionLookup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cde8c0fd649d9b46bb403ba5e157391 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: b61f0d8d8244b4b28aa66b0c8cb46a8d, type: 3} 7 | - converted3DLut: {instanceID: 0} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Color Adjustments/Color Correction (Ramp)")] 8 | public class ColorCorrectionRamp : ImageEffectBase { 9 | public Texture textureRamp; 10 | 11 | // Called by camera to apply image effect 12 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 13 | material.SetTexture ("_RampTex", textureRamp); 14 | Graphics.Blit (source, destination, material); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ColorCorrectionRamp.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea59781cad112c75d0008dfa8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: 67f8781cad112c75d0008dfa8d76c639, type: 3} 7 | - textureRamp: {fileID: 2800000, guid: d440902fad11e807d00044888d76c639, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent(typeof(Camera))] 8 | [AddComponentMenu("Image Effects/Color Adjustments/Contrast Enhance (Unsharp Mask)")] 9 | public class ContrastEnhance : PostEffectsBase 10 | { 11 | [Range(0.0f, 1.0f)] 12 | public float intensity = 0.5f; 13 | [Range(0.0f,0.999f)] 14 | public float threshold = 0.0f; 15 | 16 | private Material separableBlurMaterial; 17 | private Material contrastCompositeMaterial; 18 | 19 | [Range(0.0f,1.0f)] 20 | public float blurSpread = 1.0f; 21 | 22 | public Shader separableBlurShader = null; 23 | public Shader contrastCompositeShader = null; 24 | 25 | 26 | public override bool CheckResources () 27 | { 28 | CheckSupport (false); 29 | 30 | contrastCompositeMaterial = CheckShaderAndCreateMaterial (contrastCompositeShader, contrastCompositeMaterial); 31 | separableBlurMaterial = CheckShaderAndCreateMaterial (separableBlurShader, separableBlurMaterial); 32 | 33 | if (!isSupported) 34 | ReportAutoDisable (); 35 | return isSupported; 36 | } 37 | 38 | void OnRenderImage (RenderTexture source, RenderTexture destination) 39 | { 40 | if (CheckResources()==false) 41 | { 42 | Graphics.Blit (source, destination); 43 | return; 44 | } 45 | 46 | int rtW = source.width; 47 | int rtH = source.height; 48 | 49 | RenderTexture color2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); 50 | 51 | // downsample 52 | 53 | Graphics.Blit (source, color2); 54 | RenderTexture color4a = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); 55 | Graphics.Blit (color2, color4a); 56 | RenderTexture.ReleaseTemporary (color2); 57 | 58 | // blur 59 | 60 | separableBlurMaterial.SetVector ("offsets", new Vector4 (0.0f, (blurSpread * 1.0f) / color4a.height, 0.0f, 0.0f)); 61 | RenderTexture color4b = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); 62 | Graphics.Blit (color4a, color4b, separableBlurMaterial); 63 | RenderTexture.ReleaseTemporary (color4a); 64 | 65 | separableBlurMaterial.SetVector ("offsets", new Vector4 ((blurSpread * 1.0f) / color4a.width, 0.0f, 0.0f, 0.0f)); 66 | color4a = RenderTexture.GetTemporary (rtW/4, rtH/4, 0); 67 | Graphics.Blit (color4b, color4a, separableBlurMaterial); 68 | RenderTexture.ReleaseTemporary (color4b); 69 | 70 | // composite 71 | 72 | contrastCompositeMaterial.SetTexture ("_MainTexBlurred", color4a); 73 | contrastCompositeMaterial.SetFloat ("intensity", intensity); 74 | contrastCompositeMaterial.SetFloat ("threshold", threshold); 75 | Graphics.Blit (source, destination, contrastCompositeMaterial); 76 | 77 | RenderTexture.ReleaseTemporary (color4a); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ContrastEnhance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3309686a9fbbe6e42a182d5e0257704c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, 7 | type: 3} 8 | - contrastCompositeShader: {fileID: 4800000, guid: 273404942eede4ea1883ca1fb2942507, 9 | type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ContrastStretch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec92b071d2d424aecb3e46f28eb63174 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shaderLum: {fileID: 4800000, guid: befbb4b9c320b4b18a08ef7afb93b6c9, type: 3} 7 | - shaderReduce: {fileID: 4800000, guid: 57b33a14b6d5347c5a85c36f6cb3b280, type: 3} 8 | - shaderAdapt: {fileID: 4800000, guid: 257bc83cbeb544540bd0e558aa9b1383, type: 3} 9 | - shaderApply: {fileID: 4800000, guid: f4901f25d4e1542589348bbb89563d8e, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | [AddComponentMenu ("Image Effects/Edge Detection/Crease Shading")] 9 | public class CreaseShading : PostEffectsBase 10 | { 11 | public float intensity = 0.5f; 12 | public int softness = 1; 13 | public float spread = 1.0f; 14 | 15 | public Shader blurShader = null; 16 | private Material blurMaterial = null; 17 | 18 | public Shader depthFetchShader = null; 19 | private Material depthFetchMaterial = null; 20 | 21 | public Shader creaseApplyShader = null; 22 | private Material creaseApplyMaterial = null; 23 | 24 | 25 | public override bool CheckResources () 26 | { 27 | CheckSupport (true); 28 | 29 | blurMaterial = CheckShaderAndCreateMaterial (blurShader, blurMaterial); 30 | depthFetchMaterial = CheckShaderAndCreateMaterial (depthFetchShader, depthFetchMaterial); 31 | creaseApplyMaterial = CheckShaderAndCreateMaterial (creaseApplyShader, creaseApplyMaterial); 32 | 33 | if (!isSupported) 34 | ReportAutoDisable (); 35 | return isSupported; 36 | } 37 | 38 | void OnRenderImage (RenderTexture source, RenderTexture destination) 39 | { 40 | if (CheckResources()==false) 41 | { 42 | Graphics.Blit (source, destination); 43 | return; 44 | } 45 | 46 | int rtW = source.width; 47 | int rtH = source.height; 48 | 49 | float widthOverHeight = (1.0f * rtW) / (1.0f * rtH); 50 | float oneOverBaseSize = 1.0f / 512.0f; 51 | 52 | RenderTexture hrTex = RenderTexture.GetTemporary (rtW, rtH, 0); 53 | RenderTexture lrTex1 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); 54 | 55 | Graphics.Blit (source,hrTex, depthFetchMaterial); 56 | Graphics.Blit (hrTex, lrTex1); 57 | 58 | for(int i = 0; i < softness; i++) 59 | { 60 | RenderTexture lrTex2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); 61 | blurMaterial.SetVector ("offsets", new Vector4 (0.0f, spread * oneOverBaseSize, 0.0f, 0.0f)); 62 | Graphics.Blit (lrTex1, lrTex2, blurMaterial); 63 | RenderTexture.ReleaseTemporary (lrTex1); 64 | lrTex1 = lrTex2; 65 | 66 | lrTex2 = RenderTexture.GetTemporary (rtW/2, rtH/2, 0); 67 | blurMaterial.SetVector ("offsets", new Vector4 (spread * oneOverBaseSize / widthOverHeight, 0.0f, 0.0f, 0.0f)); 68 | Graphics.Blit (lrTex1, lrTex2, blurMaterial); 69 | RenderTexture.ReleaseTemporary (lrTex1); 70 | lrTex1 = lrTex2; 71 | } 72 | 73 | creaseApplyMaterial.SetTexture ("_HrDepthTex", hrTex); 74 | creaseApplyMaterial.SetTexture ("_LrDepthTex", lrTex1); 75 | creaseApplyMaterial.SetFloat ("intensity", intensity); 76 | Graphics.Blit (source,destination, creaseApplyMaterial); 77 | 78 | RenderTexture.ReleaseTemporary (hrTex); 79 | RenderTexture.ReleaseTemporary (lrTex1); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/CreaseShading.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d64b4f3a592f28b44bf19223ac8b6cd2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - blurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, type: 3} 7 | - depthFetchShader: {fileID: 4800000, guid: 14768d3865b1342e3a861fbe19ba2db2, type: 3} 8 | - creaseApplyShader: {fileID: 4800000, guid: b59984d82af624bd3b0c777f038276f2, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd70d448b18cfbc46af26466f752332c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - focalTransform: {instanceID: 0} 7 | - dofHdrShader: {fileID: 4800000, guid: acd613035ff3e455e8abf23fdc8c8c24, type: 3} 8 | - dx11BokehShader: {fileID: 4800000, guid: d8e82664aa8686642a424c88ab10164a, type: 3} 9 | - dx11BokehTexture: {fileID: 2800000, guid: a4cdca73d61814d33ac1587f6c163bca, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/DepthOfFieldDeprecated.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83d8db0ec466c14429f58c68c16398a1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - objectFocus: {instanceID: 0} 7 | - dofBlurShader: {fileID: 4800000, guid: bb4af680337344a4abad65a4e8873c50, type: 3} 8 | - dofShader: {fileID: 4800000, guid: 987fb0677d01f43ce8a9dbf12271e668, type: 3} 9 | - bokehShader: {fileID: 4800000, guid: 57cdacf9b217546aaa18edf39a6151c0, type: 3} 10 | - bokehTexture: {fileID: 2800000, guid: fc00ec05a89da4ff695a4273715cd5ce, type: 3} 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof (Camera))] 8 | [AddComponentMenu ("Image Effects/Edge Detection/Edge Detection")] 9 | public class EdgeDetection : PostEffectsBase 10 | { 11 | public enum EdgeDetectMode 12 | { 13 | TriangleDepthNormals = 0, 14 | RobertsCrossDepthNormals = 1, 15 | SobelDepth = 2, 16 | SobelDepthThin = 3, 17 | TriangleLuminance = 4, 18 | } 19 | 20 | 21 | public EdgeDetectMode mode = EdgeDetectMode.SobelDepthThin; 22 | public float sensitivityDepth = 1.0f; 23 | public float sensitivityNormals = 1.0f; 24 | public float lumThreshold = 0.2f; 25 | public float edgeExp = 1.0f; 26 | public float sampleDist = 1.0f; 27 | public float edgesOnly = 0.0f; 28 | public Color edgesOnlyBgColor = Color.white; 29 | 30 | public Shader edgeDetectShader; 31 | private Material edgeDetectMaterial = null; 32 | private EdgeDetectMode oldMode = EdgeDetectMode.SobelDepthThin; 33 | 34 | 35 | public override bool CheckResources () 36 | { 37 | CheckSupport (true); 38 | 39 | edgeDetectMaterial = CheckShaderAndCreateMaterial (edgeDetectShader,edgeDetectMaterial); 40 | if (mode != oldMode) 41 | SetCameraFlag (); 42 | 43 | oldMode = mode; 44 | 45 | if (!isSupported) 46 | ReportAutoDisable (); 47 | return isSupported; 48 | } 49 | 50 | 51 | new void Start () 52 | { 53 | oldMode = mode; 54 | } 55 | 56 | void SetCameraFlag () 57 | { 58 | if (mode == EdgeDetectMode.SobelDepth || mode == EdgeDetectMode.SobelDepthThin) 59 | GetComponent().depthTextureMode |= DepthTextureMode.Depth; 60 | else if (mode == EdgeDetectMode.TriangleDepthNormals || mode == EdgeDetectMode.RobertsCrossDepthNormals) 61 | GetComponent().depthTextureMode |= DepthTextureMode.DepthNormals; 62 | } 63 | 64 | void OnEnable () 65 | { 66 | SetCameraFlag(); 67 | } 68 | 69 | [ImageEffectOpaque] 70 | void OnRenderImage (RenderTexture source, RenderTexture destination) 71 | { 72 | if (CheckResources () == false) 73 | { 74 | Graphics.Blit (source, destination); 75 | return; 76 | } 77 | 78 | Vector2 sensitivity = new Vector2 (sensitivityDepth, sensitivityNormals); 79 | edgeDetectMaterial.SetVector ("_Sensitivity", new Vector4 (sensitivity.x, sensitivity.y, 1.0f, sensitivity.y)); 80 | edgeDetectMaterial.SetFloat ("_BgFade", edgesOnly); 81 | edgeDetectMaterial.SetFloat ("_SampleDistance", sampleDist); 82 | edgeDetectMaterial.SetVector ("_BgColor", edgesOnlyBgColor); 83 | edgeDetectMaterial.SetFloat ("_Exponent", edgeExp); 84 | edgeDetectMaterial.SetFloat ("_Threshold", lumThreshold); 85 | 86 | Graphics.Blit (source, destination, edgeDetectMaterial, (int) mode); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/EdgeDetection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 730475ee64f9a894bbac0d9e6f22e813 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - edgeDetectShader: {fileID: 4800000, guid: 0d1644bdf064147baa97f235fc5b4903, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | [AddComponentMenu ("Image Effects/Displacement/Fisheye")] 9 | public class Fisheye : PostEffectsBase 10 | { 11 | [Range(0.0f, 1.5f)] 12 | public float strengthX = 0.05f; 13 | [Range(0.0f, 1.5f)] 14 | public float strengthY = 0.05f; 15 | 16 | public Shader fishEyeShader = null; 17 | private Material fisheyeMaterial = null; 18 | 19 | 20 | public override bool CheckResources () 21 | { 22 | CheckSupport (false); 23 | fisheyeMaterial = CheckShaderAndCreateMaterial(fishEyeShader,fisheyeMaterial); 24 | 25 | if (!isSupported) 26 | ReportAutoDisable (); 27 | return isSupported; 28 | } 29 | 30 | void OnRenderImage (RenderTexture source, RenderTexture destination) 31 | { 32 | if (CheckResources()==false) 33 | { 34 | Graphics.Blit (source, destination); 35 | return; 36 | } 37 | 38 | float oneOverBaseSize = 80.0f / 512.0f; // to keep values more like in the old version of fisheye 39 | 40 | float ar = (source.width * 1.0f) / (source.height * 1.0f); 41 | 42 | fisheyeMaterial.SetVector ("intensity", new Vector4 (strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize, strengthX * ar * oneOverBaseSize, strengthY * oneOverBaseSize)); 43 | Graphics.Blit (source, destination, fisheyeMaterial); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Fisheye.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4739c22ef73ad62488fe344c8fe9addd 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - fishEyeShader: {fileID: 4800000, guid: 874ceab4425f64bccb1d14032f4452b1, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/GlobalFog.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76b5ec6153a1d55438228df10fe66844 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - fogShader: {fileID: 4800000, guid: 70d8568987ac0499f952b54c7c13e265, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Color Adjustments/Grayscale")] 8 | public class Grayscale : ImageEffectBase { 9 | public Texture textureRamp; 10 | 11 | [Range(-1.0f,1.0f)] 12 | public float rampOffset; 13 | 14 | // Called by camera to apply image effect 15 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 16 | material.SetTexture("_RampTex", textureRamp); 17 | material.SetFloat("_RampOffset", rampOffset); 18 | Graphics.Blit (source, destination, material); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Grayscale.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243a781cad112c75d0008dfa8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: daf9781cad112c75d0008dfa8d76c639, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [RequireComponent(typeof (Camera))] 7 | [AddComponentMenu("")] 8 | public class ImageEffectBase : MonoBehaviour 9 | { 10 | /// Provides a shader property that is set in the inspector 11 | /// and a material instantiated from the shader 12 | public Shader shader; 13 | 14 | private Material m_Material; 15 | 16 | 17 | protected virtual void Start() 18 | { 19 | // Disable if we don't support image effects 20 | if (!SystemInfo.supportsImageEffects) 21 | { 22 | enabled = false; 23 | return; 24 | } 25 | 26 | // Disable the image effect if the shader can't 27 | // run on the users graphics card 28 | if (!shader || !shader.isSupported) 29 | enabled = false; 30 | } 31 | 32 | 33 | protected Material material 34 | { 35 | get 36 | { 37 | if (m_Material == null) 38 | { 39 | m_Material = new Material(shader); 40 | m_Material.hideFlags = HideFlags.HideAndDontSave; 41 | } 42 | return m_Material; 43 | } 44 | } 45 | 46 | 47 | protected virtual void OnDisable() 48 | { 49 | if (m_Material) 50 | { 51 | DestroyImmediate(m_Material); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ImageEffectBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6469eb0ad1119d6d00011d98d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | /// A Utility class for performing various image based rendering tasks. 7 | [AddComponentMenu("")] 8 | public class ImageEffects 9 | { 10 | public static void RenderDistortion(Material material, RenderTexture source, RenderTexture destination, float angle, Vector2 center, Vector2 radius) 11 | { 12 | bool invertY = source.texelSize.y < 0.0f; 13 | if (invertY) 14 | { 15 | center.y = 1.0f - center.y; 16 | angle = -angle; 17 | } 18 | 19 | Matrix4x4 rotationMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, angle), Vector3.one); 20 | 21 | material.SetMatrix("_RotationMatrix", rotationMatrix); 22 | material.SetVector("_CenterRadius", new Vector4(center.x, center.y, radius.x, radius.y)); 23 | material.SetFloat("_Angle", angle*Mathf.Deg2Rad); 24 | 25 | Graphics.Blit(source, destination, material); 26 | } 27 | 28 | 29 | [Obsolete("Use Graphics.Blit(source,dest) instead")] 30 | public static void Blit(RenderTexture source, RenderTexture dest) 31 | { 32 | Graphics.Blit(source, dest); 33 | } 34 | 35 | 36 | [Obsolete("Use Graphics.Blit(source, destination, material) instead")] 37 | public static void BlitWithMaterial(Material material, RenderTexture source, RenderTexture dest) 38 | { 39 | Graphics.Blit(source, dest, material); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ImageEffects.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89a037199d11087f1100e2b844295342 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - blitCopyShader: {fileID: 4800000, guid: 3338b5ea2f3cb594698fae65cf060346, type: 3} 7 | - blitMultiplyShader: {fileID: 4800000, guid: 7034c801b78acab448cdcf845f7c352d, 8 | type: 3} 9 | - blitMultiply2XShader: {fileID: 4800000, guid: cde82987e0a884c4788c65f7b54390e8, 10 | type: 3} 11 | - blitAddShader: {fileID: 4800000, guid: c7515f214a63bdb42b6ae6335a00a8a4, type: 3} 12 | - blitAddSmoothShader: {fileID: 4800000, guid: 7741a77a7c455d0418bc429bd508dc87, 13 | type: 3} 14 | - blitBlendShader: {fileID: 4800000, guid: f1cf7e9c98754c4429ff0f7cc1d9dd7b, type: 3} 15 | executionOrder: 0 16 | icon: {instanceID: 0} 17 | userData: 18 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | // This class implements simple ghosting type Motion Blur. 5 | // If Extra Blur is selected, the scene will allways be a little blurred, 6 | // as it is scaled to a smaller resolution. 7 | // The effect works by accumulating the previous frames in an accumulation 8 | // texture. 9 | namespace UnityStandardAssets.ImageEffects 10 | { 11 | [ExecuteInEditMode] 12 | [AddComponentMenu("Image Effects/Blur/Motion Blur (Color Accumulation)")] 13 | [RequireComponent(typeof(Camera))] 14 | public class MotionBlur : ImageEffectBase 15 | { 16 | [Range(0.0f, 0.92f)] 17 | public float blurAmount = 0.8f; 18 | public bool extraBlur = false; 19 | 20 | private RenderTexture accumTexture; 21 | 22 | override protected void Start() 23 | { 24 | base.Start(); 25 | } 26 | 27 | override protected void OnDisable() 28 | { 29 | base.OnDisable(); 30 | DestroyImmediate(accumTexture); 31 | } 32 | 33 | // Called by camera to apply image effect 34 | void OnRenderImage (RenderTexture source, RenderTexture destination) 35 | { 36 | // Create the accumulation texture 37 | if (accumTexture == null || accumTexture.width != source.width || accumTexture.height != source.height) 38 | { 39 | DestroyImmediate(accumTexture); 40 | accumTexture = new RenderTexture(source.width, source.height, 0); 41 | accumTexture.hideFlags = HideFlags.HideAndDontSave; 42 | Graphics.Blit( source, accumTexture ); 43 | } 44 | 45 | // If Extra Blur is selected, downscale the texture to 4x4 smaller resolution. 46 | if (extraBlur) 47 | { 48 | RenderTexture blurbuffer = RenderTexture.GetTemporary(source.width/4, source.height/4, 0); 49 | accumTexture.MarkRestoreExpected(); 50 | Graphics.Blit(accumTexture, blurbuffer); 51 | Graphics.Blit(blurbuffer,accumTexture); 52 | RenderTexture.ReleaseTemporary(blurbuffer); 53 | } 54 | 55 | // Clamp the motion blur variable, so it can never leave permanent trails in the image 56 | blurAmount = Mathf.Clamp( blurAmount, 0.0f, 0.92f ); 57 | 58 | // Setup the texture and floating point values in the shader 59 | material.SetTexture("_MainTex", accumTexture); 60 | material.SetFloat("_AccumOrig", 1.0F-blurAmount); 61 | 62 | // We are accumulating motion over frames without clear/discard 63 | // by design, so silence any performance warnings from Unity 64 | accumTexture.MarkRestoreExpected(); 65 | 66 | // Render the image using the motion blur shader 67 | Graphics.Blit (source, accumTexture, material); 68 | Graphics.Blit (accumTexture, destination); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 478a2083ad114a07d000fbfb8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: e9ba2083ad114a07d000fbfb8d76c639, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndGrain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9191284b058eef549b7108b5f04e1117 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - noiseTexture: {fileID: 2800000, guid: 7a632f967e8ad42f5bd275898151ab6a, type: 3} 7 | - noiseShader: {fileID: 4800000, guid: b0249d8c935344451aa4de6db76f0688, type: 3} 8 | - dx11NoiseShader: {fileID: 4800000, guid: 8b30686bb4322ab42ad5eb50a0210b58, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/NoiseAndScratches.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a88a26a276b4e47619ce2c5adad33fab 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - grainTexture: {fileID: 2800000, guid: ffa9c02760c2b4e8eb9814ec06c4b05b, type: 3} 7 | - scratchTexture: {fileID: 2800000, guid: 6205c27cc031f4e66b8ea90d1bfaa158, type: 3} 8 | - shaderRGB: {fileID: 4800000, guid: 5d7f4c401ae8946bcb0d6ff68a9e7466, type: 3} 9 | - shaderYUV: {fileID: 4800000, guid: 0e447868506ba49f0a73235b8a8b647a, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6f4318ec6c2bf643a0f9edfeeaba0ec 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50b03df8f04b5c441aaac5b7fccb4734 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Quads.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a20852ce049f64e4695a48b6a354be83 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [RequireComponent (typeof(Camera))] 8 | [AddComponentMenu ("Image Effects/Other/Screen Overlay")] 9 | public class ScreenOverlay : PostEffectsBase 10 | { 11 | public enum OverlayBlendMode 12 | { 13 | Additive = 0, 14 | ScreenBlend = 1, 15 | Multiply = 2, 16 | Overlay = 3, 17 | AlphaBlend = 4, 18 | } 19 | 20 | public OverlayBlendMode blendMode = OverlayBlendMode.Overlay; 21 | public float intensity = 1.0f; 22 | public Texture2D texture = null; 23 | 24 | public Shader overlayShader = null; 25 | private Material overlayMaterial = null; 26 | 27 | 28 | public override bool CheckResources () 29 | { 30 | CheckSupport (false); 31 | 32 | overlayMaterial = CheckShaderAndCreateMaterial (overlayShader, overlayMaterial); 33 | 34 | if (!isSupported) 35 | ReportAutoDisable (); 36 | return isSupported; 37 | } 38 | 39 | void OnRenderImage (RenderTexture source, RenderTexture destination) 40 | { 41 | if (CheckResources() == false) 42 | { 43 | Graphics.Blit (source, destination); 44 | return; 45 | } 46 | 47 | Vector4 UV_Transform = new Vector4(1, 0, 0, 1); 48 | 49 | #if UNITY_WP8 50 | // WP8 has no OS support for rotating screen with device orientation, 51 | // so we do those transformations ourselves. 52 | if (Screen.orientation == ScreenOrientation.LandscapeLeft) { 53 | UV_Transform = new Vector4(0, -1, 1, 0); 54 | } 55 | if (Screen.orientation == ScreenOrientation.LandscapeRight) { 56 | UV_Transform = new Vector4(0, 1, -1, 0); 57 | } 58 | if (Screen.orientation == ScreenOrientation.PortraitUpsideDown) { 59 | UV_Transform = new Vector4(-1, 0, 0, -1); 60 | } 61 | #endif 62 | 63 | overlayMaterial.SetVector("_UV_Transform", UV_Transform); 64 | overlayMaterial.SetFloat ("_Intensity", intensity); 65 | overlayMaterial.SetTexture ("_Overlay", texture); 66 | Graphics.Blit (source, destination, overlayMaterial, (int) blendMode); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ScreenOverlay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f19108706fdce9469603d07980eb8ad 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - texture: {instanceID: 0} 7 | - overlayShader: {fileID: 4800000, guid: 8c81db0e527d24acc9bcec04e87781bd, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientObscurance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75febd242c999f04d9654522a10c006b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - rand: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} 7 | - aoShader: {fileID: 4800000, guid: 95616c020c5604dda96cf76afbbc0272, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/ScreenSpaceAmbientOcclusion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0923359e9e352a4b9b11c7b7161ad67 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - m_SSAOShader: {fileID: 4800000, guid: 43ca18288c424f645aaa1e9e07f04c50, type: 3} 7 | - m_RandomTexture: {fileID: 2800000, guid: a181ca8e3c62f3e4b8f183f6c586b032, type: 3} 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Color Adjustments/Sepia Tone")] 8 | public class SepiaTone : ImageEffectBase 9 | { 10 | // Called by camera to apply image effect 11 | void OnRenderImage (RenderTexture source, RenderTexture destination) 12 | { 13 | Graphics.Blit (source, destination, material); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/SepiaTone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a07a781cad112c75d0008dfa8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: b6aa781cad112c75d0008dfa8d76c639, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/SunShafts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60e318a6043c1cb4a8ce1c8805bab930 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - sunTransform: {instanceID: 0} 7 | - sunShaftsShader: {fileID: 4800000, guid: d3b1c8c1036784176946f5cfbfb7fe4c, type: 3} 8 | - simpleClearShader: {fileID: 4800000, guid: f688f89ed5eb847c5b19c934a0f1e772, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [RequireComponent (typeof(Camera))] 7 | [AddComponentMenu ("Image Effects/Camera/Tilt Shift (Lens Blur)")] 8 | class TiltShift : PostEffectsBase { 9 | public enum TiltShiftMode 10 | { 11 | TiltShiftMode, 12 | IrisMode, 13 | } 14 | public enum TiltShiftQuality 15 | { 16 | Preview, 17 | Low, 18 | Normal, 19 | High, 20 | } 21 | 22 | public TiltShiftMode mode = TiltShiftMode.TiltShiftMode; 23 | public TiltShiftQuality quality = TiltShiftQuality.Normal; 24 | 25 | [Range(0.0f, 15.0f)] 26 | public float blurArea = 1.0f; 27 | 28 | [Range(0.0f, 25.0f)] 29 | public float maxBlurSize = 5.0f; 30 | 31 | [Range(0, 1)] 32 | public int downsample = 0; 33 | 34 | public Shader tiltShiftShader = null; 35 | private Material tiltShiftMaterial = null; 36 | 37 | 38 | public override bool CheckResources () { 39 | CheckSupport (false); 40 | 41 | tiltShiftMaterial = CheckShaderAndCreateMaterial (tiltShiftShader, tiltShiftMaterial); 42 | 43 | if (!isSupported) 44 | ReportAutoDisable (); 45 | return isSupported; 46 | } 47 | 48 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 49 | if (CheckResources() == false) { 50 | Graphics.Blit (source, destination); 51 | return; 52 | } 53 | 54 | tiltShiftMaterial.SetFloat("_BlurSize", maxBlurSize < 0.0f ? 0.0f : maxBlurSize); 55 | tiltShiftMaterial.SetFloat("_BlurArea", blurArea); 56 | source.filterMode = FilterMode.Bilinear; 57 | 58 | RenderTexture rt = destination; 59 | if (downsample > 0f) { 60 | rt = RenderTexture.GetTemporary (source.width>>downsample, source.height>>downsample, 0, source.format); 61 | rt.filterMode = FilterMode.Bilinear; 62 | } 63 | 64 | int basePassNr = (int) quality; basePassNr *= 2; 65 | Graphics.Blit (source, rt, tiltShiftMaterial, mode == TiltShiftMode.TiltShiftMode ? basePassNr : basePassNr + 1); 66 | 67 | if (downsample > 0) { 68 | tiltShiftMaterial.SetTexture ("_Blurred", rt); 69 | Graphics.Blit (source, destination, tiltShiftMaterial, 8); 70 | } 71 | 72 | if (rt != destination) 73 | RenderTexture.ReleaseTemporary (rt); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/TiltShift.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a22b3a7095a744a428c134b5e26ad68e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - tiltShiftShader: {fileID: 4800000, guid: bf34d2a25450349699e8ae6456fa7ca9, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Tonemapping.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e50e925fb93c78246bf995d9dc3a2330 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - tonemapper: {fileID: 4800000, guid: 003377fc2620a44939dadde6fe3f8190, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using Object = UnityEngine.Object; 4 | 5 | namespace UnityStandardAssets.ImageEffects 6 | { 7 | class Triangles 8 | { 9 | private static Mesh[] meshes; 10 | private static int currentTris = 0; 11 | 12 | static bool HasMeshes() 13 | { 14 | if (meshes == null) 15 | return false; 16 | for (int i = 0; i < meshes.Length; i++) 17 | if (null == meshes[i]) 18 | return false; 19 | 20 | return true; 21 | } 22 | 23 | static void Cleanup() 24 | { 25 | if (meshes == null) 26 | return; 27 | 28 | for (int i = 0; i < meshes.Length; i++) 29 | { 30 | if (null != meshes[i]) 31 | { 32 | Object.DestroyImmediate(meshes[i]); 33 | meshes[i] = null; 34 | } 35 | } 36 | meshes = null; 37 | } 38 | 39 | static Mesh[] GetMeshes(int totalWidth, int totalHeight) 40 | { 41 | if (HasMeshes() && (currentTris == (totalWidth * totalHeight))) 42 | { 43 | return meshes; 44 | } 45 | 46 | int maxTris = 65000 / 3; 47 | int totalTris = totalWidth * totalHeight; 48 | currentTris = totalTris; 49 | 50 | int meshCount = Mathf.CeilToInt((1.0f * totalTris) / (1.0f * maxTris)); 51 | 52 | meshes = new Mesh[meshCount]; 53 | 54 | int i = 0; 55 | int index = 0; 56 | for (i = 0; i < totalTris; i += maxTris) 57 | { 58 | int tris = Mathf.FloorToInt(Mathf.Clamp((totalTris - i), 0, maxTris)); 59 | 60 | meshes[index] = GetMesh(tris, i, totalWidth, totalHeight); 61 | index++; 62 | } 63 | 64 | return meshes; 65 | } 66 | 67 | static Mesh GetMesh(int triCount, int triOffset, int totalWidth, int totalHeight) 68 | { 69 | var mesh = new Mesh(); 70 | mesh.hideFlags = HideFlags.DontSave; 71 | 72 | var verts = new Vector3[triCount * 3]; 73 | var uvs = new Vector2[triCount * 3]; 74 | var uvs2 = new Vector2[triCount * 3]; 75 | var tris = new int[triCount * 3]; 76 | 77 | for (int i = 0; i < triCount; i++) 78 | { 79 | int i3 = i * 3; 80 | int vertexWithOffset = triOffset + i; 81 | 82 | float x = Mathf.Floor(vertexWithOffset % totalWidth) / totalWidth; 83 | float y = Mathf.Floor(vertexWithOffset / totalWidth) / totalHeight; 84 | 85 | Vector3 position = new Vector3(x * 2 - 1, y * 2 - 1, 1.0f); 86 | 87 | verts[i3 + 0] = position; 88 | verts[i3 + 1] = position; 89 | verts[i3 + 2] = position; 90 | 91 | uvs[i3 + 0] = new Vector2(0.0f, 0.0f); 92 | uvs[i3 + 1] = new Vector2(1.0f, 0.0f); 93 | uvs[i3 + 2] = new Vector2(0.0f, 1.0f); 94 | 95 | uvs2[i3 + 0] = new Vector2(x, y); 96 | uvs2[i3 + 1] = new Vector2(x, y); 97 | uvs2[i3 + 2] = new Vector2(x, y); 98 | 99 | tris[i3 + 0] = i3 + 0; 100 | tris[i3 + 1] = i3 + 1; 101 | tris[i3 + 2] = i3 + 2; 102 | } 103 | 104 | mesh.vertices = verts; 105 | mesh.triangles = tris; 106 | mesh.uv = uvs; 107 | mesh.uv2 = uvs2; 108 | 109 | return mesh; 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Triangles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18b91636de2ba3445913e4cf38528dc8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Displacement/Twirl")] 8 | public class Twirl : ImageEffectBase 9 | { 10 | public Vector2 radius = new Vector2(0.3F,0.3F); 11 | [Range(0.0f,360.0f)] 12 | public float angle = 50; 13 | public Vector2 center = new Vector2 (0.5F, 0.5F); 14 | 15 | 16 | // Called by camera to apply image effect 17 | void OnRenderImage (RenderTexture source, RenderTexture destination) 18 | { 19 | ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Twirl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdda781cad112c75d0008dfa8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: 641b781cad112c75d0008dfa8d76c639, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/VignetteAndChromaticAberration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd6d4281e5d7cd44d8c6e38bc2c1b8d8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - vignetteShader: {fileID: 4800000, guid: 627943dc7a9a74286b70a4f694a0acd5, type: 3} 7 | - separableBlurShader: {fileID: 4800000, guid: e97c14fbb5ea04c3a902cc533d7fc5d1, 8 | type: 3} 9 | - chromAberrationShader: {fileID: 4800000, guid: 2b4f29398d9484ccfa9fd220449f5eee, 10 | type: 3} 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.ImageEffects 5 | { 6 | [ExecuteInEditMode] 7 | [AddComponentMenu("Image Effects/Displacement/Vortex")] 8 | public class Vortex : ImageEffectBase 9 | { 10 | public Vector2 radius = new Vector2(0.4F,0.4F); 11 | public float angle = 50; 12 | public Vector2 center = new Vector2(0.5F, 0.5F); 13 | 14 | // Called by camera to apply image effect 15 | void OnRenderImage (RenderTexture source, RenderTexture destination) 16 | { 17 | ImageEffects.RenderDistortion (material, source, destination, angle, center, radius); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Scripts/Vortex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a94b781cad112c75d0008dfa8d76c639 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - shader: {fileID: 4800000, guid: 708b781cad112c75d0008dfa8d76c639, type: 3} 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2145489f7c704db8acb14a52bddeee9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BlendModesOverlay" { 2 | Properties { 3 | _MainTex ("Screen Blended", 2D) = "" {} 4 | _Overlay ("Color", 2D) = "grey" {} 5 | } 6 | 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv[2] : TEXCOORD0; 14 | }; 15 | 16 | sampler2D _Overlay; 17 | half4 _Overlay_ST; 18 | 19 | sampler2D _MainTex; 20 | half4 _MainTex_ST; 21 | 22 | half _Intensity; 23 | half4 _MainTex_TexelSize; 24 | half4 _UV_Transform = half4(1, 0, 0, 1); 25 | 26 | v2f vert( appdata_img v ) { 27 | v2f o; 28 | o.pos = UnityObjectToClipPos(v.vertex); 29 | 30 | o.uv[0] = UnityStereoScreenSpaceUVAdjust(float2( 31 | dot(v.texcoord.xy, _UV_Transform.xy), 32 | dot(v.texcoord.xy, _UV_Transform.zw) 33 | ), _Overlay_ST); 34 | 35 | #if UNITY_UV_STARTS_AT_TOP 36 | if(_MainTex_TexelSize.y<0.0) 37 | o.uv[0].y = 1.0-o.uv[0].y; 38 | #endif 39 | 40 | o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 41 | return o; 42 | } 43 | 44 | half4 fragAddSub (v2f i) : SV_Target { 45 | half4 toAdd = tex2D(_Overlay, i.uv[0]) * _Intensity; 46 | return tex2D(_MainTex, i.uv[1]) + toAdd; 47 | } 48 | 49 | half4 fragMultiply (v2f i) : SV_Target { 50 | half4 toBlend = tex2D(_Overlay, i.uv[0]) * _Intensity; 51 | return tex2D(_MainTex, i.uv[1]) * toBlend; 52 | } 53 | 54 | half4 fragScreen (v2f i) : SV_Target { 55 | half4 toBlend = (tex2D(_Overlay, i.uv[0]) * _Intensity); 56 | return 1-(1-toBlend)*(1-(tex2D(_MainTex, i.uv[1]))); 57 | } 58 | 59 | half4 fragOverlay (v2f i) : SV_Target { 60 | half4 m = (tex2D(_Overlay, i.uv[0]));// * 255.0; 61 | half4 color = (tex2D(_MainTex, i.uv[1]));//* 255.0; 62 | 63 | // overlay blend mode 64 | //color.rgb = (color.rgb/255.0) * (color.rgb + ((2*m.rgb)/( 255.0 )) * (255.0-color.rgb)); 65 | //color.rgb /= 255.0; 66 | 67 | /* 68 | if (Target > ½) R = 1 - (1-2x(Target-½)) x (1-Blend) 69 | if (Target <= ½) R = (2xTarget) x Blend 70 | */ 71 | 72 | float3 check = step(half3(0.5,0.5,0.5), color.rgb); 73 | float3 result = 0; 74 | 75 | result = check * (half3(1,1,1) - ( (half3(1,1,1) - 2*(color.rgb-0.5)) * (1-m.rgb))); 76 | result += (1-check) * (2*color.rgb) * m.rgb; 77 | 78 | return half4(lerp(color.rgb, result.rgb, (_Intensity)), color.a); 79 | } 80 | 81 | half4 fragAlphaBlend (v2f i) : SV_Target { 82 | half4 toAdd = tex2D(_Overlay, i.uv[0]) ; 83 | return lerp(tex2D(_MainTex, i.uv[1]), toAdd, toAdd.a * _Intensity); 84 | } 85 | 86 | 87 | ENDCG 88 | 89 | Subshader { 90 | ZTest Always Cull Off ZWrite Off 91 | ColorMask RGB 92 | 93 | Pass { 94 | 95 | CGPROGRAM 96 | #pragma vertex vert 97 | #pragma fragment fragAddSub 98 | ENDCG 99 | } 100 | 101 | Pass { 102 | 103 | CGPROGRAM 104 | #pragma vertex vert 105 | #pragma fragment fragScreen 106 | ENDCG 107 | } 108 | 109 | Pass { 110 | 111 | CGPROGRAM 112 | #pragma vertex vert 113 | #pragma fragment fragMultiply 114 | ENDCG 115 | } 116 | 117 | Pass { 118 | 119 | CGPROGRAM 120 | #pragma vertex vert 121 | #pragma fragment fragOverlay 122 | ENDCG 123 | } 124 | 125 | Pass { 126 | 127 | CGPROGRAM 128 | #pragma vertex vert 129 | #pragma fragment fragAlphaBlend 130 | ENDCG 131 | } 132 | } 133 | 134 | Fallback off 135 | 136 | } // shader 137 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/BlendModesOverlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c81db0e527d24acc9bcec04e87781bd 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BlurEffectConeTap" { 2 | Properties { _MainTex ("", any) = "" {} } 3 | CGINCLUDE 4 | #include "UnityCG.cginc" 5 | struct v2f { 6 | float4 pos : SV_POSITION; 7 | half2 uv : TEXCOORD0; 8 | half2 taps[4] : TEXCOORD1; 9 | }; 10 | sampler2D _MainTex; 11 | half4 _MainTex_TexelSize; 12 | half4 _MainTex_ST; 13 | half4 _BlurOffsets; 14 | v2f vert( appdata_img v ) { 15 | v2f o; 16 | o.pos = UnityObjectToClipPos(v.vertex); 17 | 18 | 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 19 | #ifdef UNITY_SINGLE_PASS_STEREO 20 | // we need to keep texel size correct after the uv adjustment. 21 | o.taps[0] = UnityStereoScreenSpaceUVAdjust(o.uv + _MainTex_TexelSize * _BlurOffsets.xy * (1.0f / _MainTex_ST.xy), _MainTex_ST); 22 | o.taps[1] = UnityStereoScreenSpaceUVAdjust(o.uv - _MainTex_TexelSize * _BlurOffsets.xy * (1.0f / _MainTex_ST.xy), _MainTex_ST); 23 | o.taps[2] = UnityStereoScreenSpaceUVAdjust(o.uv + _MainTex_TexelSize * _BlurOffsets.xy * half2(1, -1) * (1.0f / _MainTex_ST.xy), _MainTex_ST); 24 | o.taps[3] = UnityStereoScreenSpaceUVAdjust(o.uv - _MainTex_TexelSize * _BlurOffsets.xy * half2(1, -1) * (1.0f / _MainTex_ST.xy), _MainTex_ST); 25 | #else 26 | o.taps[0] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy; 27 | o.taps[1] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy; 28 | o.taps[2] = o.uv + _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); 29 | o.taps[3] = o.uv - _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); 30 | #endif 31 | return o; 32 | } 33 | half4 frag(v2f i) : SV_Target { 34 | half4 color = tex2D(_MainTex, i.taps[0]); 35 | color += tex2D(_MainTex, i.taps[1]); 36 | color += tex2D(_MainTex, i.taps[2]); 37 | color += tex2D(_MainTex, i.taps[3]); 38 | return color * 0.25; 39 | } 40 | ENDCG 41 | SubShader { 42 | Pass { 43 | ZTest Always Cull Off ZWrite Off 44 | 45 | CGPROGRAM 46 | #pragma vertex vert 47 | #pragma fragment frag 48 | ENDCG 49 | } 50 | } 51 | Fallback off 52 | } 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/BlurEffectConeTaps.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57e6deea7c2924e22a5138e2b70bb4dc 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85a88efa8c871af4a9d17c64791b6f4f 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/CameraMotionBlurDX11.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1b13d7a80660504a858ea24cfa418c6 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ChromaticAberrationShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b4f29398d9484ccfa9fd220449f5eee 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrection3DLut.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ColorCorrection3DLut" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | _ClutTex ("-", 3D) = "" {} 5 | } 6 | 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv : TEXCOORD0; 14 | }; 15 | 16 | sampler2D _MainTex; 17 | sampler3D _ClutTex; 18 | 19 | half4 _MainTex_ST; 20 | 21 | float _Scale; 22 | float _Offset; 23 | 24 | v2f vert( appdata_img v ) 25 | { 26 | v2f o; 27 | o.pos = UnityObjectToClipPos(v.vertex); 28 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 29 | return o; 30 | } 31 | 32 | float4 frag(v2f i) : SV_Target 33 | { 34 | float4 c = tex2D(_MainTex, i.uv); 35 | c.rgb = tex3D(_ClutTex, c.rgb * _Scale + _Offset).rgb; 36 | return c; 37 | } 38 | 39 | float4 fragLinear(v2f i) : SV_Target 40 | { 41 | float4 c = tex2D(_MainTex, i.uv); 42 | c.rgb= sqrt(c.rgb); 43 | c.rgb = tex3D(_ClutTex, c.rgb * _Scale + _Offset).rgb; 44 | c.rgb = c.rgb*c.rgb; 45 | return c; 46 | } 47 | 48 | ENDCG 49 | 50 | 51 | Subshader 52 | { 53 | Pass 54 | { 55 | ZTest Always Cull Off ZWrite Off 56 | 57 | CGPROGRAM 58 | #pragma vertex vert 59 | #pragma fragment frag 60 | #pragma target 3.0 61 | ENDCG 62 | } 63 | 64 | Pass 65 | { 66 | ZTest Always Cull Off ZWrite Off 67 | 68 | CGPROGRAM 69 | #pragma vertex vert 70 | #pragma fragment fragLinear 71 | #pragma target 3.0 72 | ENDCG 73 | } 74 | } 75 | 76 | Fallback off 77 | } 78 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrection3DLut.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b61f0d8d8244b4b28aa66b0c8cb46a8d 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionCurves.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ColorCorrectionCurves" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | 5 | _RgbTex ("_RgbTex (RGB)", 2D) = "" {} 6 | 7 | _ZCurve ("_ZCurve (RGB)", 2D) = "" {} 8 | 9 | _RgbDepthTex ("_RgbDepthTex (RGB)", 2D) = "" {} 10 | } 11 | 12 | // note: also have a look at ColorCorrectionCurvesSimple 13 | // for a much simpler color correction without use of 14 | // depth texture lookups 15 | 16 | // Shader code pasted into all further CGPROGRAM blocks 17 | CGINCLUDE 18 | 19 | #include "UnityCG.cginc" 20 | 21 | struct v2f { 22 | float4 pos : SV_POSITION; 23 | float2 uv : TEXCOORD0; 24 | float2 uv2 : TEXCOORD1; 25 | }; 26 | 27 | sampler2D _MainTex; 28 | sampler2D_float _CameraDepthTexture; 29 | 30 | float4 _CameraDepthTexture_ST; 31 | uniform float4 _MainTex_TexelSize; 32 | half4 _MainTex_ST; 33 | 34 | sampler2D _RgbTex; 35 | sampler2D _ZCurve; 36 | sampler2D _RgbDepthTex; 37 | 38 | fixed _Saturation; 39 | 40 | v2f vert( appdata_img v ) 41 | { 42 | v2f o; 43 | o.pos = UnityObjectToClipPos(v.vertex); 44 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 45 | o.uv2 = TRANSFORM_TEX(v.texcoord, _CameraDepthTexture); 46 | 47 | #if UNITY_UV_STARTS_AT_TOP 48 | if (_MainTex_TexelSize.y < 0) 49 | o.uv2.y = 1-o.uv2.y; 50 | #endif 51 | 52 | return o; 53 | } 54 | 55 | half4 frag(v2f i) : SV_Target 56 | { 57 | half4 color = tex2D(_MainTex, i.uv); 58 | 59 | half3 ycoords = half3(0.5,1.5,2.5) * 0.25; 60 | 61 | half3 red = tex2D(_RgbTex, half2(color.r, ycoords.x)).rgb * half3(1,0,0); 62 | half3 green = tex2D(_RgbTex, half2(color.g, ycoords.y)).rgb * half3(0,1,0); 63 | half3 blue = tex2D(_RgbTex, half2(color.b, ycoords.z)).rgb * half3(0,0,1); 64 | 65 | half theDepth = SAMPLE_DEPTH_TEXTURE( _CameraDepthTexture, i.uv2) ; 66 | half zval = tex2D(_ZCurve, half2( Linear01Depth (theDepth), 0.5)); 67 | 68 | half3 depthRed = tex2D(_RgbDepthTex, half2(color.r, ycoords.x)).rgb * half3(1,0,0); 69 | half3 depthGreen = tex2D(_RgbDepthTex, half2(color.g, ycoords.y)).rgb * half3(0,1,0); 70 | half3 depthBlue = tex2D(_RgbDepthTex, half2(color.b, ycoords.z)).rgb * half3(0,0,1); 71 | 72 | color = half4( lerp(red+green+blue, depthRed+depthBlue+depthGreen, zval), color.a); 73 | 74 | half lum = Luminance(color.rgb); 75 | color.rgb = lerp(half3(lum,lum,lum), color.rgb, _Saturation); 76 | return color; 77 | } 78 | 79 | ENDCG 80 | 81 | Subshader { 82 | Pass { 83 | ZTest Always Cull Off ZWrite Off 84 | 85 | CGPROGRAM 86 | #pragma vertex vert 87 | #pragma fragment frag 88 | ENDCG 89 | } 90 | } 91 | 92 | Fallback off 93 | 94 | } // shader 95 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionCurves.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62bcade1028c24ca1a39760ed84b9487 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionCurvesSimple.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ColorCorrectionCurvesSimple" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | _RgbTex ("_RgbTex (RGB)", 2D) = "" {} 5 | } 6 | 7 | // Shader code pasted into all further CGPROGRAM blocks 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f { 13 | float4 pos : SV_POSITION; 14 | half2 uv : TEXCOORD0; 15 | }; 16 | 17 | sampler2D _MainTex; 18 | sampler2D _RgbTex; 19 | fixed _Saturation; 20 | 21 | half4 _MainTex_ST; 22 | 23 | v2f vert( appdata_img v ) 24 | { 25 | v2f o; 26 | o.pos = UnityObjectToClipPos(v.vertex); 27 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 28 | return o; 29 | } 30 | 31 | fixed4 frag(v2f i) : SV_Target 32 | { 33 | fixed4 color = tex2D(_MainTex, i.uv); 34 | 35 | fixed3 red = tex2D(_RgbTex, half2(color.r, 0.5/4.0)).rgb * fixed3(1,0,0); 36 | fixed3 green = tex2D(_RgbTex, half2(color.g, 1.5/4.0)).rgb * fixed3(0,1,0); 37 | fixed3 blue = tex2D(_RgbTex, half2(color.b, 2.5/4.0)).rgb * fixed3(0,0,1); 38 | 39 | color = fixed4(red+green+blue, color.a); 40 | 41 | fixed lum = Luminance(color.rgb); 42 | color.rgb = lerp(fixed3(lum,lum,lum), color.rgb, _Saturation); 43 | return color; 44 | } 45 | 46 | ENDCG 47 | 48 | Subshader { 49 | Pass { 50 | ZTest Always Cull Off ZWrite Off 51 | 52 | CGPROGRAM 53 | #pragma vertex vert 54 | #pragma fragment frag 55 | ENDCG 56 | } 57 | } 58 | 59 | Fallback off 60 | 61 | } // shader 62 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionCurvesSimple.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 438ddd58d82c84d9eb1fdc56111702e1 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionEffect.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Color Correction Effect" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _RampTex ("Base (RGB)", 2D) = "grayscaleRamp" {} 5 | } 6 | 7 | SubShader { 8 | Pass { 9 | ZTest Always Cull Off ZWrite Off 10 | 11 | CGPROGRAM 12 | #pragma vertex vert_img 13 | #pragma fragment frag 14 | #include "UnityCG.cginc" 15 | 16 | uniform sampler2D _MainTex; 17 | uniform sampler2D _RampTex; 18 | 19 | half4 _MainTex_ST; 20 | 21 | fixed4 frag (v2f_img i) : SV_Target 22 | { 23 | fixed4 orig = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 24 | 25 | fixed rr = tex2D(_RampTex, orig.rr).r; 26 | fixed gg = tex2D(_RampTex, orig.gg).g; 27 | fixed bb = tex2D(_RampTex, orig.bb).b; 28 | 29 | fixed4 color = fixed4(rr, gg, bb, orig.a); 30 | 31 | return color; 32 | } 33 | ENDCG 34 | 35 | } 36 | } 37 | 38 | Fallback off 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionEffect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67f8781cad112c75d0008dfa8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionSelective.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ColorCorrectionSelective" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | float4 pos : SV_POSITION; 12 | float2 uv : TEXCOORD0; 13 | }; 14 | 15 | sampler2D _MainTex; 16 | half4 _MainTex_ST; 17 | 18 | float4 selColor; 19 | float4 targetColor; 20 | 21 | v2f vert( appdata_img v ) { 22 | v2f o; 23 | o.pos = UnityObjectToClipPos(v.vertex); 24 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 25 | return o; 26 | } 27 | 28 | fixed4 frag(v2f i) : SV_Target { 29 | fixed4 color = tex2D (_MainTex, i.uv); 30 | 31 | fixed diff = saturate (2.0 * length (color.rgb - selColor.rgb)); 32 | color = lerp (targetColor, color, diff); 33 | return color; 34 | } 35 | 36 | ENDCG 37 | 38 | Subshader { 39 | Pass { 40 | ZTest Always Cull Off ZWrite Off 41 | 42 | CGPROGRAM 43 | 44 | #pragma vertex vert 45 | #pragma fragment frag 46 | 47 | ENDCG 48 | } 49 | } 50 | 51 | Fallback off 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ColorCorrectionSelective.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e515e0f94cefc4c0db54b45cba621544 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a40c1b84cf7fe418bae97a29041b85a4 3 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Adaptation.shader: -------------------------------------------------------------------------------- 1 | // Calculates adaptation to minimum/maximum luminance values, 2 | // based on "currently adapted" and "new values to adapt to" 3 | // textures (both 1x1). 4 | 5 | Shader "Hidden/Contrast Stretch Adaptation" { 6 | Properties { 7 | _MainTex ("Base (RGB)", 2D) = "white" {} 8 | _CurTex ("Base (RGB)", 2D) = "white" {} 9 | } 10 | 11 | Category { 12 | SubShader { 13 | Pass { 14 | ZTest Always Cull Off ZWrite Off 15 | 16 | CGPROGRAM 17 | #pragma vertex vert_img 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | 21 | uniform sampler2D _MainTex; // currently adapted to 22 | uniform sampler2D _CurTex; // new value to adapt to 23 | uniform float4 _AdaptParams; // x=adaptLerp, y=limitMinimum, z=limitMaximum 24 | half4 _MainTex_ST; 25 | half4 _CurTex_ST; 26 | 27 | float4 frag (v2f_img i) : SV_Target { 28 | // value is: max, min 29 | float2 valAdapted = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)).xy; 30 | float2 valCur = tex2D(_CurTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)).xy; 31 | 32 | // Calculate new adapted values: interpolate 33 | // from valAdapted to valCur by script-supplied amount. 34 | // 35 | // Because we store adaptation levels in a simple 8 bit/channel 36 | // texture, we might not have enough precision - the interpolation 37 | // amount might be too small to change anything, and we'll never 38 | // arrive at the needed values. 39 | // 40 | // So we make sure the change we do is at least 1/255th of the 41 | // color range - this way we'll always change the value. 42 | const float kMinChange = 1.0/255.0; 43 | float2 delta = (valCur-valAdapted) * _AdaptParams.x; 44 | delta.x = sign(delta.x) * max( kMinChange, abs(delta.x) ); 45 | delta.y = sign(delta.y) * max( kMinChange, abs(delta.y) ); 46 | 47 | float4 valNew; 48 | valNew.xy = valAdapted + delta; 49 | 50 | // Impose user limits on maximum/minimum values 51 | valNew.x = max( valNew.x, _AdaptParams.z ); 52 | valNew.y = min( valNew.y, _AdaptParams.y ); 53 | 54 | // Optimization so that our final apply pass is faster: 55 | // z = max-min (plus a small amount to prevent division by zero) 56 | valNew.z = valNew.x - valNew.y + 0.01; 57 | // w = min/(max-min) 58 | valNew.w = valNew.y / valNew.z; 59 | 60 | return valNew; 61 | } 62 | ENDCG 63 | 64 | } 65 | } 66 | } 67 | 68 | Fallback off 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Adaptation.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 257bc83cbeb544540bd0e558aa9b1383 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Apply.shader: -------------------------------------------------------------------------------- 1 | // Final pass in the contrast stretch effect: apply 2 | // color stretch to the original image, based on currently 3 | // adapted to minimum/maximum luminances. 4 | 5 | Shader "Hidden/Contrast Stretch Apply" { 6 | Properties { 7 | _MainTex ("Base (RGB)", 2D) = "white" {} 8 | _AdaptTex ("Base (RGB)", 2D) = "white" {} 9 | } 10 | 11 | Category { 12 | SubShader { 13 | Pass { 14 | ZTest Always Cull Off ZWrite Off 15 | 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | 21 | struct v2f { 22 | float4 pos : SV_POSITION; 23 | float2 uv[2] : TEXCOORD0; 24 | }; 25 | 26 | uniform sampler2D _MainTex; 27 | uniform sampler2D _AdaptTex; 28 | half4 _MainTex_ST; 29 | 30 | v2f vert (appdata_img v) 31 | { 32 | v2f o; 33 | o.pos = UnityObjectToClipPos(v.vertex); 34 | o.uv[0] = MultiplyUV (UNITY_MATRIX_TEXTURE0, UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST)); 35 | o.uv[1] = float2(0.5,0.5); 36 | return o; 37 | } 38 | 39 | float4 frag (v2f i) : SV_Target 40 | { 41 | float4 col = tex2D(_MainTex, i.uv[0]); 42 | float4 adapted = tex2D(_AdaptTex, i.uv[1]); 43 | float vmul = 1.0 / adapted.z; 44 | float vadd = -adapted.w; 45 | col.rgb = col.rgb * vmul + vadd; 46 | return col; 47 | } 48 | ENDCG 49 | 50 | } 51 | } 52 | } 53 | 54 | Fallback off 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Apply.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4901f25d4e1542589348bbb89563d8e 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Luminance.shader: -------------------------------------------------------------------------------- 1 | // Outputs luminance (grayscale) of the input image _MainTex 2 | 3 | Shader "Hidden/Contrast Stretch Luminance" { 4 | 5 | Properties { 6 | _MainTex ("Base (RGB)", 2D) = "white" {} 7 | } 8 | 9 | Category { 10 | SubShader { 11 | Pass { 12 | ZTest Always Cull Off ZWrite Off 13 | 14 | CGPROGRAM 15 | #pragma vertex vert_img 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | uniform sampler2D _MainTex; 20 | half4 _MainTex_ST; 21 | 22 | float4 frag (v2f_img i) : SV_Target 23 | { 24 | float4 col = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 25 | col.rgb = Luminance(col.rgb) * (1+col.a*2); 26 | return col; 27 | } 28 | ENDCG 29 | 30 | } 31 | } 32 | } 33 | 34 | Fallback off 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/Luminance.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: befbb4b9c320b4b18a08ef7afb93b6c9 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/MinMaxReduction.shader: -------------------------------------------------------------------------------- 1 | // Reduces input image (_MainTex) by 2x2. 2 | // Outputs maximum value in R, minimum in G. 3 | Shader "Hidden/Contrast Stretch Reduction" { 4 | 5 | Properties { 6 | _MainTex ("Base (RGB)", 2D) = "white" {} 7 | } 8 | 9 | Category { 10 | SubShader { 11 | Pass { 12 | ZTest Always Cull Off ZWrite Off 13 | 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | struct v2f { 20 | float4 position : SV_POSITION; 21 | float2 uv[4] : TEXCOORD0; 22 | }; 23 | 24 | uniform sampler2D _MainTex; 25 | half4 _MainTex_ST; 26 | 27 | v2f vert (appdata_img v) { 28 | v2f o; 29 | o.position = UnityObjectToClipPos(v.vertex); 30 | float2 uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord); 31 | 32 | // Compute UVs to sample 2x2 pixel block. 33 | o.uv[0] = UnityStereoScreenSpaceUVAdjust(uv + float2(0,0), _MainTex_ST); 34 | o.uv[1] = UnityStereoScreenSpaceUVAdjust(uv + float2(0,1), _MainTex_ST); 35 | o.uv[2] = UnityStereoScreenSpaceUVAdjust(uv + float2(1,0), _MainTex_ST); 36 | o.uv[3] = UnityStereoScreenSpaceUVAdjust(uv + float2(1,1), _MainTex_ST); 37 | return o; 38 | } 39 | 40 | float4 frag (v2f i) : SV_Target 41 | { 42 | // Sample pixel block 43 | float4 v00 = tex2D(_MainTex, i.uv[0]); 44 | float2 v01 = tex2D(_MainTex, i.uv[1]).xy; 45 | float2 v10 = tex2D(_MainTex, i.uv[2]).xy; 46 | float2 v11 = tex2D(_MainTex, i.uv[3]).xy; 47 | 48 | float4 res; 49 | // output x: maximum of the four values 50 | res.x = max( max(v00.x,v01.x), max(v10.x,v11.x) ); 51 | // output y: minimum of the four values 52 | res.y = min( min(v00.y,v01.y), min(v10.y,v11.y) ); 53 | // output zw unchanged from the first pixel 54 | res.zw = v00.zw; 55 | 56 | return res; 57 | } 58 | ENDCG 59 | 60 | } 61 | } 62 | } 63 | 64 | Fallback off 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Contrast Stretch/MinMaxReduction.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57b33a14b6d5347c5a85c36f6cb3b280 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ContrastComposite.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ContrastComposite" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | _MainTexBlurred ("Base Blurred (RGB)", 2D) = "" {} 5 | } 6 | 7 | // Shader code pasted into all further CGPROGRAM blocks 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f { 13 | float4 pos : SV_POSITION; 14 | float2 uv[2] : TEXCOORD0; 15 | }; 16 | 17 | sampler2D _MainTex; 18 | sampler2D _MainTexBlurred; 19 | 20 | float4 _MainTex_TexelSize; 21 | half4 _MainTex_ST; 22 | 23 | half4 _MainTexBlurred_ST; 24 | 25 | float intensity; 26 | float threshold; 27 | 28 | v2f vert( appdata_img v ) { 29 | v2f o; 30 | o.pos = UnityObjectToClipPos(v.vertex); 31 | 32 | o.uv[0] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTexBlurred_ST); 33 | o.uv[1] = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 34 | #if UNITY_UV_STARTS_AT_TOP 35 | if (_MainTex_TexelSize.y < 0) 36 | o.uv[0].y = 1-o.uv[0].y; 37 | #endif 38 | return o; 39 | } 40 | 41 | half4 frag(v2f i) : SV_Target 42 | { 43 | half4 color = tex2D (_MainTex, i.uv[1]); 44 | half4 blurred = tex2D (_MainTexBlurred, (i.uv[0])); 45 | 46 | half4 difference = color - blurred; 47 | half4 signs = sign (difference); 48 | 49 | half4 enhancement = saturate (abs(difference) - threshold) * signs * 1.0/(1.0-threshold); 50 | color += enhancement * intensity; 51 | 52 | return color; 53 | } 54 | 55 | ENDCG 56 | 57 | Subshader { 58 | Pass { 59 | ZTest Always Cull Off ZWrite Off 60 | 61 | CGPROGRAM 62 | #pragma vertex vert 63 | #pragma fragment frag 64 | ENDCG 65 | } 66 | } 67 | 68 | Fallback off 69 | 70 | } // shader 71 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ContrastComposite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 273404942eede4ea1883ca1fb2942507 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ConvertDepth.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/ConvertDepth" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | // Shader code pasted into all further CGPROGRAM blocks 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv : TEXCOORD0; 14 | }; 15 | 16 | sampler2D _MainTex; 17 | sampler2D_float _CameraDepthTexture; 18 | 19 | half4 _CameraDepthTexture_ST; 20 | 21 | v2f vert( appdata_img v ) 22 | { 23 | v2f o; 24 | o.pos = UnityObjectToClipPos(v.vertex); 25 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _CameraDepthTexture_ST); 26 | return o; 27 | } 28 | 29 | half4 frag(v2f i) : SV_Target 30 | { 31 | float d = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv.xy); 32 | d = Linear01Depth(d); 33 | 34 | if(d>0.99999) 35 | return half4(1,1,1,1); 36 | else 37 | return EncodeFloatRGBA(d); 38 | } 39 | 40 | ENDCG 41 | 42 | Subshader { 43 | 44 | Pass { 45 | ZTest Always Cull Off ZWrite Off 46 | 47 | CGPROGRAM 48 | #pragma vertex vert 49 | #pragma fragment frag 50 | ENDCG 51 | } 52 | } 53 | 54 | Fallback off 55 | 56 | } // shader 57 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ConvertDepth.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14768d3865b1342e3a861fbe19ba2db2 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shader "Hidden/CreaseApply" { 4 | Properties { 5 | _MainTex ("Base (RGB)", 2D) = "white" {} 6 | _HrDepthTex ("Base (RGB)", 2D) = "white" {} 7 | _LrDepthTex ("Base (RGB)", 2D) = "white" {} 8 | } 9 | 10 | SubShader { 11 | Pass { 12 | ZTest Always Cull Off ZWrite Off 13 | 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #include "UnityCG.cginc" 18 | 19 | sampler2D _MainTex; 20 | sampler2D _HrDepthTex; 21 | sampler2D _LrDepthTex; 22 | 23 | uniform float4 _MainTex_TexelSize; 24 | half4 _MainTex_ST; 25 | half4 _HrDepthTex_ST; 26 | half4 _LrDepthTex_ST; 27 | uniform float intensity; 28 | 29 | struct v2f { 30 | float4 pos : SV_POSITION; 31 | float2 uv : TEXCOORD0; 32 | }; 33 | 34 | v2f vert( appdata_img v ) 35 | { 36 | v2f o; 37 | o.pos = UnityObjectToClipPos(v.vertex); 38 | o.uv.xy = v.texcoord.xy; 39 | return o; 40 | } 41 | 42 | half4 frag (v2f i) : SV_Target 43 | { 44 | float4 hrDepth = tex2D(_HrDepthTex, UnityStereoScreenSpaceUVAdjust(i.uv, _HrDepthTex_ST)); 45 | float4 lrDepth = tex2D(_LrDepthTex, UnityStereoScreenSpaceUVAdjust(i.uv, _LrDepthTex_ST)); 46 | 47 | hrDepth.a = DecodeFloatRGBA(hrDepth); 48 | lrDepth.a = DecodeFloatRGBA(lrDepth); 49 | 50 | float4 color = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 51 | 52 | return color * (1.0-abs(hrDepth.a-lrDepth.a)*intensity); 53 | } 54 | 55 | ENDCG 56 | 57 | 58 | } 59 | } 60 | 61 | Fallback off 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/CreaseApply.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b59984d82af624bd3b0c777f038276f2 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/EdgeDetectNormals.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d1644bdf064147baa97f235fc5b4903 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/FisheyeShader" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | // Shader code pasted into all further CGPROGRAM blocks 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv : TEXCOORD0; 14 | }; 15 | 16 | sampler2D _MainTex; 17 | half4 _MainTex_ST; 18 | 19 | float2 intensity; 20 | 21 | v2f vert( appdata_img v ) 22 | { 23 | v2f o; 24 | o.pos = UnityObjectToClipPos(v.vertex); 25 | o.uv = v.texcoord.xy; 26 | return o; 27 | } 28 | 29 | half4 frag(v2f i) : SV_Target 30 | { 31 | half2 coords = i.uv; 32 | coords = (coords - 0.5) * 2.0; 33 | 34 | half2 realCoordOffs; 35 | realCoordOffs.x = (1-coords.y * coords.y) * intensity.y * (coords.x); 36 | realCoordOffs.y = (1-coords.x * coords.x) * intensity.x * (coords.y); 37 | 38 | half4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv - realCoordOffs, _MainTex_ST)); 39 | 40 | return color; 41 | } 42 | 43 | ENDCG 44 | 45 | Subshader { 46 | Pass { 47 | ZTest Always Cull Off ZWrite Off 48 | 49 | CGPROGRAM 50 | #pragma vertex vert 51 | #pragma fragment frag 52 | ENDCG 53 | } 54 | 55 | } 56 | 57 | Fallback off 58 | 59 | } // shader 60 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/FisheyeShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 874ceab4425f64bccb1d14032f4452b1 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/GlobalFog.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70d8568987ac0499f952b54c7c13e265 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Grayscale Effect" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _RampTex ("Base (RGB)", 2D) = "grayscaleRamp" {} 5 | } 6 | 7 | SubShader { 8 | Pass { 9 | ZTest Always Cull Off ZWrite Off 10 | 11 | CGPROGRAM 12 | #pragma vertex vert_img 13 | #pragma fragment frag 14 | #include "UnityCG.cginc" 15 | 16 | uniform sampler2D _MainTex; 17 | uniform sampler2D _RampTex; 18 | uniform half _RampOffset; 19 | half4 _MainTex_ST; 20 | 21 | fixed4 frag (v2f_img i) : SV_Target 22 | { 23 | fixed4 original = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 24 | fixed grayscale = Luminance(original.rgb); 25 | half2 remap = half2 (grayscale + _RampOffset, .5); 26 | fixed4 output = tex2D(_RampTex, remap); 27 | output.a = original.a; 28 | return output; 29 | } 30 | ENDCG 31 | 32 | } 33 | } 34 | 35 | Fallback off 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/GrayscaleEffect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: daf9781cad112c75d0008dfa8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/MotionBlur" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _AccumOrig("AccumOrig", Float) = 0.65 5 | } 6 | 7 | SubShader { 8 | ZTest Always Cull Off ZWrite Off 9 | Pass { 10 | Blend SrcAlpha OneMinusSrcAlpha 11 | ColorMask RGB 12 | BindChannels { 13 | Bind "vertex", vertex 14 | Bind "texcoord", texcoord 15 | } 16 | 17 | CGPROGRAM 18 | #pragma vertex vert 19 | #pragma fragment frag 20 | 21 | #include "UnityCG.cginc" 22 | 23 | struct appdata_t { 24 | float4 vertex : POSITION; 25 | float2 texcoord : TEXCOORD; 26 | }; 27 | 28 | struct v2f { 29 | float4 vertex : SV_POSITION; 30 | float2 texcoord : TEXCOORD; 31 | }; 32 | 33 | float4 _MainTex_ST; 34 | float _AccumOrig; 35 | 36 | v2f vert (appdata_t v) 37 | { 38 | v2f o; 39 | o.vertex = UnityObjectToClipPos(v.vertex); 40 | o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 41 | return o; 42 | } 43 | 44 | sampler2D _MainTex; 45 | 46 | half4 frag (v2f i) : SV_Target 47 | { 48 | return half4(tex2D(_MainTex, i.texcoord).rgb, _AccumOrig ); 49 | } 50 | ENDCG 51 | } 52 | 53 | Pass { 54 | Blend One Zero 55 | ColorMask A 56 | 57 | BindChannels { 58 | Bind "vertex", vertex 59 | Bind "texcoord", texcoord 60 | } 61 | 62 | CGPROGRAM 63 | #pragma vertex vert 64 | #pragma fragment frag 65 | 66 | #include "UnityCG.cginc" 67 | 68 | struct appdata_t { 69 | float4 vertex : POSITION; 70 | float2 texcoord : TEXCOORD; 71 | }; 72 | 73 | struct v2f { 74 | float4 vertex : SV_POSITION; 75 | float2 texcoord : TEXCOORD; 76 | }; 77 | 78 | float4 _MainTex_ST; 79 | 80 | v2f vert (appdata_t v) 81 | { 82 | v2f o; 83 | o.vertex = UnityObjectToClipPos(v.vertex); 84 | o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 85 | return o; 86 | } 87 | 88 | sampler2D _MainTex; 89 | 90 | half4 frag (v2f i) : SV_Target 91 | { 92 | return tex2D(_MainTex, i.texcoord); 93 | } 94 | ENDCG 95 | } 96 | 97 | } 98 | 99 | SubShader { 100 | ZTest Always Cull Off ZWrite Off 101 | Pass { 102 | Blend SrcAlpha OneMinusSrcAlpha 103 | ColorMask RGB 104 | SetTexture [_MainTex] { 105 | ConstantColor (0,0,0,[_AccumOrig]) 106 | Combine texture, constant 107 | } 108 | } 109 | Pass { 110 | Blend One Zero 111 | ColorMask A 112 | SetTexture [_MainTex] { 113 | Combine texture 114 | } 115 | } 116 | } 117 | 118 | Fallback off 119 | 120 | } 121 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/MotionBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9ba2083ad114a07d000fbfb8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader: -------------------------------------------------------------------------------- 1 | 2 | Shader "Hidden/MotionBlurClear" 3 | { 4 | 5 | Properties { } 6 | 7 | SubShader { 8 | Pass { 9 | //ZTest LEqual 10 | ZTest Always // lame depth test 11 | ZWrite Off // lame depth test 12 | 13 | CGPROGRAM 14 | 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | #include "UnityCG.cginc" 19 | 20 | struct vs_input { 21 | float4 vertex : POSITION; 22 | }; 23 | 24 | struct ps_input { 25 | float4 pos : SV_POSITION; 26 | float4 screen : TEXCOORD0; 27 | }; 28 | 29 | sampler2D_float _CameraDepthTexture; 30 | 31 | ps_input vert (vs_input v) 32 | { 33 | ps_input o; 34 | o.pos = UnityObjectToClipPos(v.vertex); 35 | o.screen = ComputeScreenPos(o.pos); 36 | COMPUTE_EYEDEPTH(o.screen.z); 37 | return o; 38 | } 39 | 40 | float4 frag (ps_input i) : SV_Target 41 | { 42 | // superlame: manual depth test needed as we can't bind depth, FIXME for 4.x 43 | // alternatively implement SM > 3 version where we write out custom depth 44 | 45 | float d = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screen)); 46 | d = LinearEyeDepth(d); 47 | 48 | clip(d - i.screen.z + 1e-2f); 49 | return float4(0, 0, 0, 0); 50 | } 51 | 52 | ENDCG 53 | 54 | } 55 | } 56 | 57 | Fallback Off 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/MotionBlurClear.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7699c5fbfa27745a1abe111ab7bf9785 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrain.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0249d8c935344451aa4de6db76f0688 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseAndGrainDX11.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b30686bb4322ab42ad5eb50a0210b58 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Noise Shader RGB" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _GrainTex ("Base (RGB)", 2D) = "gray" {} 5 | _ScratchTex ("Base (RGB)", 2D) = "gray" {} 6 | } 7 | 8 | SubShader { 9 | Pass { 10 | ZTest Always Cull Off ZWrite Off 11 | 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f { 18 | float4 pos : SV_POSITION; 19 | float2 uv : TEXCOORD0; 20 | float2 uvg : TEXCOORD1; // grain 21 | float2 uvs : TEXCOORD2; // scratch 22 | }; 23 | 24 | uniform sampler2D _MainTex; 25 | uniform sampler2D _GrainTex; 26 | uniform sampler2D _ScratchTex; 27 | 28 | uniform float4 _GrainOffsetScale; 29 | uniform float4 _ScratchOffsetScale; 30 | uniform fixed4 _Intensity; // x=grain, y=scratch 31 | 32 | half4 _MainTex_ST; 33 | 34 | v2f vert (appdata_img v) 35 | { 36 | v2f o; 37 | o.pos = UnityObjectToClipPos(v.vertex); 38 | o.uv = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord), _MainTex_ST); 39 | o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; 40 | o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; 41 | return o; 42 | } 43 | 44 | fixed4 frag (v2f i) : SV_Target 45 | { 46 | fixed4 col = tex2D(_MainTex, i.uv); 47 | 48 | // sample noise texture and do a signed add 49 | fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; 50 | col.rgb += grain * _Intensity.x; 51 | 52 | // sample scratch texture and do a signed add 53 | fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; 54 | col.rgb += scratch * _Intensity.y; 55 | 56 | return col; 57 | } 58 | ENDCG 59 | } 60 | } 61 | 62 | Fallback off 63 | 64 | } 65 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderRGB.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d7f4c401ae8946bcb0d6ff68a9e7466 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Noise Shader YUV" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | _GrainTex ("Base (RGB)", 2D) = "gray" {} 5 | _ScratchTex ("Base (RGB)", 2D) = "gray" {} 6 | } 7 | 8 | SubShader { 9 | Pass { 10 | ZTest Always Cull Off ZWrite Off 11 | 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f { 18 | float4 pos : SV_POSITION; 19 | float2 uv : TEXCOORD0; 20 | float2 uvg : TEXCOORD1; // grain 21 | float2 uvs : TEXCOORD2; // scratch 22 | }; 23 | 24 | uniform sampler2D _MainTex; 25 | uniform sampler2D _GrainTex; 26 | uniform sampler2D _ScratchTex; 27 | 28 | uniform float4 _GrainOffsetScale; 29 | uniform float4 _ScratchOffsetScale; 30 | uniform fixed4 _Intensity; // x=grain, y=scratch 31 | 32 | half4 _MainTex_ST; 33 | 34 | v2f vert (appdata_img v) 35 | { 36 | v2f o; 37 | o.pos = UnityObjectToClipPos(v.vertex); 38 | o.uv = UnityStereoScreenSpaceUVAdjust(MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord), _MainTex_ST); 39 | o.uvg = v.texcoord.xy * _GrainOffsetScale.zw + _GrainOffsetScale.xy; 40 | o.uvs = v.texcoord.xy * _ScratchOffsetScale.zw + _ScratchOffsetScale.xy; 41 | return o; 42 | } 43 | 44 | fixed4 frag (v2f i) : SV_Target 45 | { 46 | fixed4 col = tex2D(_MainTex, i.uv); 47 | 48 | // convert to YUV 49 | fixed3 yuv; 50 | yuv.x = dot( col.rgb, half3(0.299,0.587,0.114) ); 51 | yuv.y = (col.b-yuv.x)*0.492; 52 | yuv.z = (col.r-yuv.x)*0.877; 53 | 54 | // sample noise texture and do a signed add 55 | fixed3 grain = tex2D(_GrainTex, i.uvg).rgb * 2 - 1; 56 | yuv.rgb += grain * _Intensity.x; 57 | 58 | // convert back to rgb 59 | col.r = yuv.z * 1.140 + yuv.x; 60 | col.g = yuv.z * (-0.581) + yuv.y * (-0.395) + yuv.x; 61 | col.b = yuv.y * 2.032 + yuv.x; 62 | 63 | // sample scratch texture and add 64 | fixed3 scratch = tex2D(_ScratchTex, i.uvs).rgb * 2 - 1; 65 | col.rgb += scratch * _Intensity.y; 66 | 67 | return col; 68 | } 69 | ENDCG 70 | } 71 | } 72 | 73 | Fallback off 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/NoiseEffectShaderYUV.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e447868506ba49f0a73235b8a8b647a 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader: -------------------------------------------------------------------------------- 1 | 2 | Shader "Hidden/PrepareSunShaftsBlur" { 3 | Properties { 4 | _MainTex ("Base", 2D) = "" {} 5 | _Skybox ("Skybox", 2D) = "" {} 6 | } 7 | 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f { 13 | float4 pos : SV_POSITION; 14 | float2 uv : TEXCOORD0; 15 | }; 16 | 17 | sampler2D _MainTex; 18 | sampler2D _Skybox; 19 | sampler2D_float _CameraDepthTexture; 20 | 21 | uniform half _NoSkyBoxMask; 22 | uniform half4 _SunPosition; 23 | 24 | v2f vert (appdata_img v) { 25 | v2f o; 26 | o.pos = UnityObjectToClipPos(v.vertex); 27 | o.uv = v.texcoord.xy; 28 | return o; 29 | } 30 | 31 | half TransformColor (half4 skyboxValue) { 32 | return max (skyboxValue.a, _NoSkyBoxMask * dot (skyboxValue.rgb, float3 (0.59,0.3,0.11))); 33 | } 34 | 35 | half4 frag (v2f i) : SV_Target { 36 | float depthSample = SAMPLE_DEPTH_TEXTURE( _CameraDepthTexture, i.uv.xy); 37 | half4 tex = tex2D (_MainTex, i.uv.xy); 38 | 39 | depthSample = Linear01Depth (depthSample); 40 | 41 | // consider maximum radius 42 | half2 vec = _SunPosition.xy - i.uv.xy; 43 | half dist = saturate (_SunPosition.w - length (vec.xy)); 44 | 45 | half4 outColor = 0; 46 | 47 | // consider shafts blockers 48 | if (depthSample > 0.99) 49 | outColor = TransformColor (tex) * dist; 50 | 51 | return outColor; 52 | } 53 | 54 | half4 fragNoDepthNeeded (v2f i) : SV_Target { 55 | float4 sky = (tex2D (_Skybox, i.uv.xy)); 56 | float4 tex = (tex2D (_MainTex, i.uv.xy)); 57 | 58 | // consider maximum radius 59 | half2 vec = _SunPosition.xy - i.uv.xy; 60 | half dist = saturate (_SunPosition.w - length (vec)); 61 | 62 | half4 outColor = 0; 63 | 64 | if (Luminance ( abs(sky.rgb - tex.rgb)) < 0.2) 65 | outColor = TransformColor (sky) * dist; 66 | 67 | return outColor; 68 | } 69 | 70 | ENDCG 71 | 72 | Subshader { 73 | Pass { 74 | ZTest Always Cull Off ZWrite Off 75 | 76 | CGPROGRAM 77 | 78 | #pragma vertex vert 79 | #pragma fragment frag 80 | 81 | ENDCG 82 | } 83 | Pass { 84 | ZTest Always Cull Off ZWrite Off 85 | 86 | CGPROGRAM 87 | 88 | #pragma vertex vert 89 | #pragma fragment fragNoDepthNeeded 90 | 91 | ENDCG 92 | } 93 | } 94 | 95 | Fallback off 96 | 97 | } // shader 98 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/PrepareSunShaftsBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ad381ed8492840ab9f165df743e4826 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/RadialBlur" 2 | { 3 | Properties { 4 | _MainTex ("Base (RGB)", 2D) = "" {} 5 | } 6 | 7 | // Shader code pasted into all further CGPROGRAM blocks 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f { 13 | float4 pos : SV_POSITION; 14 | float2 uv : TEXCOORD0; 15 | float2 blurVector : TEXCOORD1; 16 | }; 17 | 18 | sampler2D _MainTex; 19 | 20 | float4 _BlurRadius4; 21 | float4 _SunPosition; 22 | 23 | float4 _MainTex_TexelSize; 24 | 25 | v2f vert( appdata_img v ) { 26 | v2f o; 27 | o.pos = UnityObjectToClipPos(v.vertex); 28 | o.uv.xy = v.texcoord.xy; 29 | 30 | o.blurVector = (_SunPosition.xy - v.texcoord.xy) * _BlurRadius4.xy; 31 | 32 | return o; 33 | } 34 | 35 | #define SAMPLES_FLOAT 6.0f 36 | #define SAMPLES_INT 6 37 | 38 | half4 frag(v2f i) : SV_Target 39 | { 40 | half4 color = half4(0,0,0,0); 41 | 42 | for(int j = 0; j < SAMPLES_INT; j++) 43 | { 44 | half4 tmpColor = tex2D(_MainTex, i.uv.xy); 45 | color += tmpColor; 46 | 47 | i.uv.xy += i.blurVector; 48 | } 49 | 50 | return color / SAMPLES_FLOAT; 51 | } 52 | 53 | ENDCG 54 | 55 | Subshader 56 | { 57 | Blend One Zero 58 | Pass { 59 | ZTest Always Cull Off ZWrite Off 60 | 61 | CGPROGRAM 62 | #pragma vertex vert 63 | #pragma fragment frag 64 | 65 | ENDCG 66 | } // Pass 67 | } // Subshader 68 | 69 | Fallback off 70 | 71 | } // shader 72 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/RadialBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f58445347fe2e4b8396487ed2bfa02ad 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SSAOShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43ca18288c424f645aaa1e9e07f04c50 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceAmbientObscurance.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95616c020c5604dda96cf76afbbc0272 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ScreenSpaceRaytrace.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26c67b7245085cf438e3d42d50d94f55 3 | timeCreated: 1425661779 4 | licenseType: Store 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Sepiatone Effect" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | } 5 | 6 | SubShader { 7 | Pass { 8 | ZTest Always Cull Off ZWrite Off 9 | 10 | CGPROGRAM 11 | #pragma vertex vert_img 12 | #pragma fragment frag 13 | #include "UnityCG.cginc" 14 | 15 | uniform sampler2D _MainTex; 16 | half4 _MainTex_ST; 17 | 18 | fixed4 frag (v2f_img i) : SV_Target 19 | { 20 | fixed4 original = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 21 | 22 | // get intensity value (Y part of YIQ color space) 23 | fixed Y = dot (fixed3(0.299, 0.587, 0.114), original.rgb); 24 | 25 | // Convert to Sepia Tone by adding constant 26 | fixed4 sepiaConvert = float4 (0.191, -0.054, -0.221, 0.0); 27 | fixed4 output = sepiaConvert + Y; 28 | output.a = original.a; 29 | 30 | return output; 31 | } 32 | ENDCG 33 | 34 | } 35 | } 36 | 37 | Fallback off 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SepiaToneEffect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6aa781cad112c75d0008dfa8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shader "Hidden/ShowAlphaChannel" { 4 | Properties { 5 | _MainTex ("Base (RGB)", 2D) = "white" {} 6 | _EdgeTex ("_EdgeTex", 2D) = "white" {} 7 | } 8 | 9 | SubShader { 10 | Pass { 11 | ZTest Always Cull Off ZWrite Off 12 | 13 | CGPROGRAM 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | 17 | #include "UnityCG.cginc" 18 | 19 | uniform sampler2D _MainTex; 20 | uniform sampler2D _EdgeTex; 21 | 22 | uniform float4 _MainTex_TexelSize; 23 | 24 | float filterRadius; 25 | 26 | struct v2f { 27 | float4 pos : SV_POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | v2f vert( appdata_img v ) 32 | { 33 | v2f o; 34 | o.pos = UnityObjectToClipPos(v.vertex); 35 | o.uv = v.texcoord.xy; 36 | 37 | return o; 38 | } 39 | 40 | half4 frag (v2f i) : SV_Target 41 | { 42 | 43 | half4 color = tex2D(_MainTex, i.uv.xy); 44 | half edges = color.a; 45 | 46 | return edges; 47 | } 48 | ENDCG 49 | } 50 | } 51 | 52 | Fallback off 53 | 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/ShowAlphaChannel.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da310021e2a4142429d95c537846dc38 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shader "Hidden/SimpleClear" { 4 | Properties { 5 | _MainTex ("Base (RGB)", 2D) = "white" {} 6 | } 7 | 8 | SubShader { 9 | Pass { 10 | ZTest Always Cull Off ZWrite Off 11 | 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | uniform sampler2D _MainTex; 18 | uniform float4 _MainTex_TexelSize; 19 | 20 | struct v2f { 21 | float4 pos : SV_POSITION; 22 | }; 23 | 24 | v2f vert( appdata_img v ) 25 | { 26 | v2f o; 27 | o.pos = UnityObjectToClipPos(v.vertex); 28 | return o; 29 | } 30 | 31 | half4 frag (v2f i) : SV_Target 32 | { 33 | return half4(0,0,0,0); 34 | } 35 | ENDCG 36 | } 37 | } 38 | 39 | Fallback off 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SimpleClear.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f688f89ed5eb847c5b19c934a0f1e772 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/SunShaftsComposite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3b1c8c1036784176946f5cfbfb7fe4c 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/Tonemapper.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 003377fc2620a44939dadde6fe3f8190 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Twirt Effect Shader" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | } 5 | 6 | SubShader { 7 | Pass { 8 | ZTest Always Cull Off ZWrite Off 9 | 10 | CGPROGRAM 11 | #pragma vertex vert 12 | #pragma fragment frag 13 | #include "UnityCG.cginc" 14 | 15 | uniform sampler2D _MainTex; 16 | uniform float4 _MainTex_TexelSize; 17 | half4 _MainTex_ST; 18 | uniform float4 _CenterRadius; 19 | uniform float4x4 _RotationMatrix; 20 | 21 | struct v2f { 22 | float4 pos : SV_POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | 26 | v2f vert( appdata_img v ) 27 | { 28 | v2f o; 29 | o.pos = UnityObjectToClipPos(v.vertex); 30 | o.uv = v.texcoord - _CenterRadius.xy; 31 | return o; 32 | } 33 | 34 | float4 frag (v2f i) : SV_Target 35 | { 36 | float2 offset = i.uv; 37 | float2 distortedOffset = MultiplyUV (_RotationMatrix, offset.xy); 38 | float2 tmp = offset / _CenterRadius.zw; 39 | float t = min (1, length(tmp)); 40 | 41 | offset = lerp (distortedOffset, offset, t); 42 | offset += _CenterRadius.xy; 43 | 44 | return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(offset, _MainTex_ST)); 45 | } 46 | ENDCG 47 | 48 | } 49 | } 50 | 51 | Fallback off 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/TwirlEffect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 641b781cad112c75d0008dfa8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Vignetting" { 2 | Properties { 3 | _MainTex ("Base", 2D) = "white" {} 4 | _VignetteTex ("Vignette", 2D) = "white" {} 5 | } 6 | 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv : TEXCOORD0; 14 | float2 uv2 : TEXCOORD1; 15 | }; 16 | 17 | sampler2D _MainTex; 18 | sampler2D _VignetteTex; 19 | 20 | half _Intensity; 21 | half _Blur; 22 | 23 | float4 _MainTex_TexelSize; 24 | half4 _MainTex_ST; 25 | half4 _VignetteTex_ST; 26 | 27 | v2f vert( appdata_img v ) { 28 | v2f o; 29 | o.pos = UnityObjectToClipPos(v.vertex); 30 | o.uv = v.texcoord.xy; 31 | o.uv2 = v.texcoord.xy; 32 | 33 | #if UNITY_UV_STARTS_AT_TOP 34 | if (_MainTex_TexelSize.y < 0) 35 | o.uv2.y = 1.0 - o.uv2.y; 36 | #endif 37 | 38 | return o; 39 | } 40 | 41 | half4 frag(v2f i) : SV_Target { 42 | half2 coords = i.uv; 43 | half2 uv = i.uv; 44 | 45 | coords = (coords - 0.5) * 2.0; 46 | half coordDot = dot (coords,coords); 47 | half4 color = tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST)); 48 | 49 | float mask = 1.0 - coordDot * _Intensity; 50 | 51 | half4 colorBlur = tex2D (_VignetteTex, UnityStereoScreenSpaceUVAdjust(i.uv2, _VignetteTex_ST)); 52 | color = lerp (color, colorBlur, saturate (_Blur * coordDot)); 53 | 54 | return color * mask; 55 | } 56 | 57 | ENDCG 58 | 59 | Subshader { 60 | Pass { 61 | ZTest Always Cull Off ZWrite Off 62 | 63 | CGPROGRAM 64 | #pragma vertex vert 65 | #pragma fragment frag 66 | ENDCG 67 | } 68 | } 69 | 70 | Fallback off 71 | } 72 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/VignettingShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 627943dc7a9a74286b70a4f694a0acd5 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Twist Effect" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "white" {} 4 | } 5 | 6 | SubShader 7 | { 8 | Pass 9 | { 10 | ZTest Always Cull Off ZWrite Off 11 | 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | 16 | #include "UnityCG.cginc" 17 | 18 | uniform sampler2D _MainTex; 19 | 20 | uniform float4 _MainTex_ST; 21 | 22 | uniform float4 _MainTex_TexelSize; 23 | uniform float _Angle; 24 | uniform float4 _CenterRadius; 25 | 26 | struct v2f { 27 | float4 pos : SV_POSITION; 28 | float2 uv : TEXCOORD0; 29 | float2 uvOrig : TEXCOORD1; 30 | }; 31 | 32 | v2f vert (appdata_img v) 33 | { 34 | v2f o; 35 | o.pos = UnityObjectToClipPos(v.vertex); 36 | float2 uv = v.texcoord.xy - _CenterRadius.xy; 37 | o.uv = TRANSFORM_TEX(uv, _MainTex); //MultiplyUV (UNITY_MATRIX_TEXTURE0, uv); 38 | o.uvOrig = uv; 39 | return o; 40 | } 41 | 42 | float4 frag (v2f i) : SV_Target 43 | { 44 | float2 offset = i.uvOrig; 45 | float angle = 1.0 - length(offset / _CenterRadius.zw); 46 | angle = max (0, angle); 47 | angle = angle * angle * _Angle; 48 | float cosLength, sinLength; 49 | sincos (angle, sinLength, cosLength); 50 | 51 | float2 uv; 52 | uv.x = cosLength * offset[0] - sinLength * offset[1]; 53 | uv.y = sinLength * offset[0] + cosLength * offset[1]; 54 | uv += _CenterRadius.xy; 55 | 56 | return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(uv, _MainTex_ST)); 57 | } 58 | ENDCG 59 | 60 | } 61 | } 62 | 63 | Fallback off 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/VortexEffect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 708b781cad112c75d0008dfa8d76c639 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d55b5e91b95c41739cdf4f804dd383d 3 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/DLAA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 017ca72b9e8a749058d13ebd527e98fa 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA2.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd5b323dcc592457790ff18b528f5e67 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAA3Console.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c547503fff0e8482ea5793727057041c 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset2.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f1418cffd12146f2a83be795f6fa5a7 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/FXAAPreset3.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c182fa94a5a0a4c02870641efcd38cd5 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/NFAA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce0cb2621f6d84e21a87414e471a3cce 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader: -------------------------------------------------------------------------------- 1 | 2 | Shader "Hidden/SSAA" { 3 | Properties { 4 | _MainTex ("Base (RGB)", 2D) = "white" {} 5 | } 6 | 7 | // very simple & fast AA by Emmanuel Julien 8 | 9 | SubShader { 10 | Pass { 11 | 12 | ZTest Always Cull Off ZWrite Off 13 | 14 | CGPROGRAM 15 | 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | 19 | #include "UnityCG.cginc" 20 | 21 | uniform sampler2D _MainTex; 22 | uniform float4 _MainTex_TexelSize; 23 | half4 _MainTex_ST; 24 | 25 | struct v2f { 26 | float4 pos : SV_POSITION; 27 | float2 uv[5] : TEXCOORD0; 28 | }; 29 | 30 | v2f vert( appdata_img v ) { 31 | v2f o; 32 | o.pos = UnityObjectToClipPos(v.vertex); 33 | 34 | float2 uv = v.texcoord.xy; 35 | 36 | float w = 1.75; 37 | 38 | float2 up = float2(0.0, _MainTex_TexelSize.y) * w; 39 | float2 right = float2(_MainTex_TexelSize.x, 0.0) * w; 40 | 41 | o.uv[0].xy = uv - up; 42 | o.uv[1].xy = uv - right; 43 | o.uv[2].xy = uv + right; 44 | o.uv[3].xy = uv + up; 45 | 46 | o.uv[4].xy = uv; 47 | 48 | return o; 49 | } 50 | 51 | half4 frag (v2f i) : SV_Target 52 | { 53 | half4 outColor; 54 | 55 | float t = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)).xyz ); 56 | float l = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1], _MainTex_ST)).xyz); 57 | float r = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2], _MainTex_ST)).xyz); 58 | float b = Luminance( tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3], _MainTex_ST)).xyz); 59 | 60 | half2 n = half2( -( t - b ), r - l ); 61 | float nl = length( n ); 62 | 63 | if ( nl < (1.0 / 16.0) ) 64 | outColor = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST) ); 65 | else { 66 | n *= _MainTex_TexelSize.xy / nl; 67 | 68 | half4 o = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4], _MainTex_ST)); 69 | half4 t0 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] + n * 0.5, _MainTex_ST)) * 0.9; 70 | half4 t1 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] - n * 0.5, _MainTex_ST)) * 0.9; 71 | half4 t2 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] + n, _MainTex_ST)) * 0.75; 72 | half4 t3 = tex2D( _MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[4] - n, _MainTex_ST)) * 0.75; 73 | 74 | outColor = (o + t0 + t1 + t2 + t3) / 4.3; 75 | } 76 | 77 | return outColor; 78 | } 79 | 80 | ENDCG 81 | } 82 | } 83 | 84 | Fallback off 85 | 86 | } 87 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_Antialiasing/SSAA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3728d1488b02490cbd196c7941bf1f8 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6ef58fc6f637406bbe6814a19c377f8 3 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/Blend" { 2 | Properties { 3 | _MainTex ("Screen Blended", 2D) = "" {} 4 | _ColorBuffer ("Color", 2D) = "" {} 5 | } 6 | 7 | CGINCLUDE 8 | 9 | #include "UnityCG.cginc" 10 | 11 | struct v2f { 12 | float4 pos : SV_POSITION; 13 | float2 uv[2] : TEXCOORD0; 14 | }; 15 | struct v2f_mt { 16 | float4 pos : SV_POSITION; 17 | float2 uv[4] : TEXCOORD0; 18 | }; 19 | 20 | sampler2D _ColorBuffer; 21 | sampler2D _MainTex; 22 | 23 | half _Intensity; 24 | half4 _ColorBuffer_TexelSize; 25 | half4 _ColorBuffer_ST; 26 | half4 _MainTex_TexelSize; 27 | half4 _MainTex_ST; 28 | 29 | v2f vert( appdata_img v ) { 30 | v2f o; 31 | o.pos = UnityObjectToClipPos(v.vertex); 32 | o.uv[0] = v.texcoord.xy; 33 | o.uv[1] = v.texcoord.xy; 34 | 35 | #if UNITY_UV_STARTS_AT_TOP 36 | if (_ColorBuffer_TexelSize.y < 0) 37 | o.uv[1].y = 1-o.uv[1].y; 38 | #endif 39 | 40 | return o; 41 | } 42 | 43 | v2f_mt vertMultiTap( appdata_img v ) { 44 | v2f_mt o; 45 | o.pos = UnityObjectToClipPos(v.vertex); 46 | o.uv[0] = v.texcoord.xy + _MainTex_TexelSize.xy * 0.5; 47 | o.uv[1] = v.texcoord.xy - _MainTex_TexelSize.xy * 0.5; 48 | o.uv[2] = v.texcoord.xy - _MainTex_TexelSize.xy * half2(1,-1) * 0.5; 49 | o.uv[3] = v.texcoord.xy + _MainTex_TexelSize.xy * half2(1,-1) * 0.5; 50 | return o; 51 | } 52 | 53 | half4 fragScreen (v2f i) : SV_Target { 54 | half4 toBlend = saturate (tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0], _MainTex_ST)) * _Intensity); 55 | return 1-(1-toBlend)*(1-tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST))); 56 | } 57 | 58 | half4 fragAdd (v2f i) : SV_Target { 59 | return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * _Intensity + tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[1], _ColorBuffer_ST)); 60 | } 61 | 62 | half4 fragVignetteBlend (v2f i) : SV_Target { 63 | return tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)) * tex2D(_ColorBuffer, UnityStereoScreenSpaceUVAdjust(i.uv[0], _ColorBuffer_ST)); 64 | } 65 | 66 | half4 fragMultiTap (v2f_mt i) : SV_Target { 67 | half4 outColor = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[0].xy, _MainTex_ST)); 68 | outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[1].xy, _MainTex_ST)); 69 | outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[2].xy, _MainTex_ST)); 70 | outColor += tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv[3].xy, _MainTex_ST)); 71 | return outColor * 0.25; 72 | } 73 | 74 | ENDCG 75 | 76 | Subshader { 77 | ZTest Always Cull Off ZWrite Off 78 | 79 | // 0: nicer & softer "screen" blend mode 80 | Pass { 81 | 82 | CGPROGRAM 83 | #pragma vertex vert 84 | #pragma fragment fragScreen 85 | ENDCG 86 | } 87 | 88 | // 1: simple "add" blend mode 89 | Pass { 90 | 91 | CGPROGRAM 92 | #pragma vertex vert 93 | #pragma fragment fragAdd 94 | ENDCG 95 | } 96 | // 2: used for "stable" downsampling 97 | Pass { 98 | 99 | CGPROGRAM 100 | #pragma vertex vertMultiTap 101 | #pragma fragment fragMultiTap 102 | ENDCG 103 | } 104 | // 3: vignette blending 105 | Pass { 106 | 107 | CGPROGRAM 108 | #pragma vertex vert 109 | #pragma fragment fragVignetteBlend 110 | ENDCG 111 | } 112 | } 113 | 114 | Fallback off 115 | 116 | } // shader 117 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/Blend.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53b3960ee3d3d4a5caa8d5473d120187 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendForBloom.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7856cbff0a0ca45c787d5431eb805bb0 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BlendOneOne" { 2 | Properties { 3 | _MainTex ("-", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | float4 pos : SV_POSITION; 12 | float2 uv : TEXCOORD0; 13 | }; 14 | 15 | sampler2D _MainTex; 16 | half4 _MainTex_ST; 17 | half _Intensity; 18 | 19 | v2f vert( appdata_img v ) { 20 | v2f o; 21 | o.pos = UnityObjectToClipPos(v.vertex); 22 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 23 | return o; 24 | } 25 | 26 | half4 frag(v2f i) : SV_Target { 27 | return tex2D(_MainTex, i.uv) * _Intensity; 28 | } 29 | 30 | ENDCG 31 | 32 | Subshader { 33 | 34 | Pass { 35 | BlendOp Add 36 | Blend One One 37 | 38 | ZTest Always Cull Off ZWrite Off 39 | 40 | CGPROGRAM 41 | #pragma vertex vert 42 | #pragma fragment frag 43 | ENDCG 44 | } 45 | } 46 | 47 | Fallback off 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlendOneOne.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7898d203e9b94c0dbe2bf9dd5cb32c0 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BlurAndFlares.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be6e39cf196f146d5be72fbefb18ed75 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BrightPassFilterForBloom" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Base (RGB)", 2D) = "" {} 6 | } 7 | 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f 13 | { 14 | float4 pos : SV_POSITION; 15 | float2 uv : TEXCOORD0; 16 | }; 17 | 18 | sampler2D _MainTex; 19 | half4 _MainTex_ST; 20 | 21 | half4 threshold; 22 | half useSrcAlphaAsMask; 23 | 24 | v2f vert( appdata_img v ) 25 | { 26 | v2f o; 27 | o.pos = UnityObjectToClipPos(v.vertex); 28 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 29 | return o; 30 | } 31 | 32 | half4 frag(v2f i) : SV_Target 33 | { 34 | half4 color = tex2D(_MainTex, i.uv); 35 | //color = color * saturate((color-threshhold.x) * 75.0); // didn't go well with HDR and din't make sense 36 | color = color * lerp(1.0, color.a, useSrcAlphaAsMask); 37 | color = max(half4(0,0,0,0), color-threshold.x); 38 | return color; 39 | } 40 | 41 | ENDCG 42 | 43 | Subshader 44 | { 45 | Pass 46 | { 47 | ZTest Always Cull Off ZWrite Off 48 | 49 | CGPROGRAM 50 | 51 | #pragma vertex vert 52 | #pragma fragment frag 53 | 54 | ENDCG 55 | } 56 | } 57 | Fallback off 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 186c4c0d31e314f049595dcbaf4ca129 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BrightPassFilter2" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Base (RGB)", 2D) = "" {} 6 | } 7 | 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | 12 | struct v2f 13 | { 14 | float4 pos : SV_POSITION; 15 | float2 uv : TEXCOORD0; 16 | }; 17 | 18 | sampler2D _MainTex; 19 | half4 _MainTex_ST; 20 | 21 | half4 _Threshhold; 22 | 23 | v2f vert( appdata_img v ) 24 | { 25 | v2f o; 26 | o.pos = UnityObjectToClipPos(v.vertex); 27 | o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 28 | return o; 29 | } 30 | 31 | half4 fragScalarThresh(v2f i) : SV_Target 32 | { 33 | half4 color = tex2D(_MainTex, i.uv); 34 | color.rgb = color.rgb; 35 | color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.xxx); 36 | return color; 37 | } 38 | 39 | half4 fragColorThresh(v2f i) : SV_Target 40 | { 41 | half4 color = tex2D(_MainTex, i.uv); 42 | color.rgb = max(half3(0,0,0), color.rgb-_Threshhold.rgb); 43 | return color; 44 | } 45 | 46 | ENDCG 47 | 48 | Subshader 49 | { 50 | Pass 51 | { 52 | ZTest Always Cull Off ZWrite Off 53 | 54 | CGPROGRAM 55 | 56 | #pragma vertex vert 57 | #pragma fragment fragScalarThresh 58 | 59 | ENDCG 60 | } 61 | 62 | Pass 63 | { 64 | ZTest Always Cull Off ZWrite Off 65 | 66 | CGPROGRAM 67 | 68 | #pragma vertex vert 69 | #pragma fragment fragColorThresh 70 | 71 | ENDCG 72 | } 73 | } 74 | Fallback off 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/BrightPassFilter2.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0aeaa4cb29f5d4e9c8455f04c8575c8c 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/LensFlareCreate" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | float4 pos : SV_POSITION; 12 | float2 uv[4] : TEXCOORD0; 13 | }; 14 | 15 | fixed4 colorA; 16 | fixed4 colorB; 17 | fixed4 colorC; 18 | fixed4 colorD; 19 | 20 | sampler2D _MainTex; 21 | half4 _MainTex_ST; 22 | 23 | v2f vert( appdata_img v ) { 24 | v2f o; 25 | o.pos = UnityObjectToClipPos(v.vertex); 26 | 27 | o.uv[0] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -0.85 ) + 0.5, _MainTex_ST); 28 | o.uv[1] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -1.45 ) + 0.5, _MainTex_ST); 29 | o.uv[2] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -2.55 ) + 0.5, _MainTex_ST); 30 | o.uv[3] = UnityStereoScreenSpaceUVAdjust(( ( v.texcoord.xy - 0.5 ) * -4.15 ) + 0.5, _MainTex_ST); 31 | return o; 32 | } 33 | 34 | fixed4 frag(v2f i) : SV_Target { 35 | fixed4 color = float4 (0,0,0,0); 36 | color += tex2D(_MainTex, i.uv[0] ) * colorA; 37 | color += tex2D(_MainTex, i.uv[1] ) * colorB; 38 | color += tex2D(_MainTex, i.uv[2] ) * colorC; 39 | color += tex2D(_MainTex, i.uv[3] ) * colorD; 40 | return color; 41 | } 42 | 43 | ENDCG 44 | 45 | Subshader { 46 | Blend One One 47 | Pass { 48 | ZTest Always Cull Off ZWrite Off 49 | 50 | CGPROGRAM 51 | 52 | #pragma vertex vert 53 | #pragma fragment frag 54 | 55 | ENDCG 56 | } 57 | } 58 | 59 | Fallback off 60 | 61 | } // shader 62 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/LensFlareCreate.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 459fe69d2f6d74ddb92f04dbf45a866b 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBloom.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68a00c837b82e4c6d92e7da765dc5f1d 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MobileBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9d5fa183cd6b45eeb1491f74863cd91 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/MultiPassHollywoodFlares.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2baf3cae8edc4daf94c9adc2154be00 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/SeparableBlurPlus" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | half4 pos : SV_POSITION; 12 | half2 uv : TEXCOORD0; 13 | half4 uv01 : TEXCOORD1; 14 | half4 uv23 : TEXCOORD2; 15 | half4 uv45 : TEXCOORD3; 16 | half4 uv67 : TEXCOORD4; 17 | }; 18 | 19 | half4 offsets; 20 | 21 | sampler2D _MainTex; 22 | half4 _MainTex_ST; 23 | 24 | v2f vert (appdata_img v) { 25 | v2f o; 26 | o.pos = UnityObjectToClipPos(v.vertex); 27 | 28 | o.uv.xy = v.texcoord.xy; 29 | 30 | o.uv01 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1); 31 | o.uv23 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 2.0; 32 | o.uv45 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 3.0; 33 | o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 4.5; 34 | o.uv67 = v.texcoord.xyxy + offsets.xyxy * half4(1,1, -1,-1) * 6.5; 35 | 36 | return o; 37 | } 38 | 39 | half4 frag (v2f i) : SV_Target { 40 | half4 color = half4 (0,0,0,0); 41 | 42 | color += 0.225 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST)); 43 | color += 0.150 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.xy, _MainTex_ST)); 44 | color += 0.150 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.zw, _MainTex_ST)); 45 | color += 0.110 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.xy, _MainTex_ST)); 46 | color += 0.110 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.zw, _MainTex_ST)); 47 | color += 0.075 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.xy, _MainTex_ST)); 48 | color += 0.075 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.zw, _MainTex_ST)); 49 | color += 0.0525 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv67.xy, _MainTex_ST)); 50 | color += 0.0525 * tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv67.zw, _MainTex_ST)); 51 | 52 | return color; 53 | } 54 | 55 | ENDCG 56 | 57 | Subshader { 58 | Pass { 59 | ZTest Always Cull Off ZWrite Off 60 | 61 | CGPROGRAM 62 | #pragma vertex vert 63 | #pragma fragment frag 64 | ENDCG 65 | } 66 | } 67 | 68 | Fallback off 69 | 70 | } // shader 71 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/SeparableBlurPlus.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9df009a214e24a5ebbf271595f8d5b6 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/VignetteShader" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | float4 pos : SV_POSITION; 12 | float2 uv : TEXCOORD0; 13 | }; 14 | 15 | sampler2D _MainTex; 16 | 17 | float4 _MainTex_TexelSize; 18 | float vignetteIntensity; 19 | 20 | v2f vert( appdata_img v ) { 21 | v2f o; 22 | o.pos = UnityObjectToClipPos(v.vertex); 23 | 24 | o.uv = v.texcoord.xy; 25 | return o; 26 | } 27 | 28 | half4 frag(v2f i) : SV_Target { 29 | half2 coords = i.uv; 30 | half2 uv = i.uv; 31 | 32 | coords = (coords - 0.5) * 2.0; 33 | half coordDot = dot (coords,coords); 34 | half4 color = tex2D (_MainTex, uv); 35 | 36 | float mask = 1.0 - coordDot * vignetteIntensity; 37 | return color * mask; 38 | } 39 | 40 | ENDCG 41 | 42 | Subshader { 43 | Pass { 44 | ZTest Always Cull Off ZWrite Off 45 | 46 | CGPROGRAM 47 | 48 | #pragma vertex vert 49 | #pragma fragment frag 50 | 51 | ENDCG 52 | } 53 | } 54 | 55 | Fallback off 56 | 57 | } // shader 58 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_BloomAndFlares/VignetteShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 562f620336e024ac99992ff05725a89a 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9cccf980fcb7441d85b8b3b5c2d2c34 3 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader: -------------------------------------------------------------------------------- 1 | 2 | Shader "Hidden/Dof/Bokeh34" { 3 | Properties { 4 | _MainTex ("Base (RGB)", 2D) = "white" {} 5 | _Source ("Base (RGB)", 2D) = "black" {} 6 | } 7 | 8 | SubShader { 9 | CGINCLUDE 10 | 11 | #include "UnityCG.cginc" 12 | 13 | sampler2D _MainTex; 14 | sampler2D _Source; 15 | 16 | uniform half4 _ArScale; 17 | uniform half _Intensity; 18 | uniform half4 _Source_TexelSize; 19 | half4 _Source_ST; 20 | 21 | struct v2f { 22 | half4 pos : SV_POSITION; 23 | half2 uv2 : TEXCOORD0; 24 | half4 source : TEXCOORD1; 25 | }; 26 | 27 | #define COC bokeh.a 28 | 29 | v2f vert (appdata_full v) 30 | { 31 | v2f o; 32 | 33 | o.pos = v.vertex; 34 | 35 | o.uv2.xy = v.texcoord.xy;// * 2.0; <- needed when using Triangles.js and not Quads.js 36 | 37 | #if UNITY_UV_STARTS_AT_TOP 38 | float4 bokeh = tex2Dlod (_Source, half4 (UnityStereoScreenSpaceUVAdjust(v.texcoord1.xy * half2(1,-1) + half2(0,1), _Source_ST), 0, 0)); 39 | #else 40 | float4 bokeh = tex2Dlod (_Source, half4 (UnityStereoScreenSpaceUVAdjust(v.texcoord1.xy, _Source_ST), 0, 0)); 41 | #endif 42 | 43 | o.source = bokeh; 44 | 45 | o.pos.xy += (v.texcoord.xy * 2.0 - 1.0) * _ArScale.xy * COC;// + _ArScale.zw * coc; 46 | o.source.rgb *= _Intensity; 47 | 48 | return o; 49 | } 50 | 51 | 52 | half4 frag (v2f i) : SV_Target 53 | { 54 | half4 color = tex2D (_MainTex, i.uv2.xy); 55 | color.rgb *= i.source.rgb; 56 | color.a *= Luminance(i.source.rgb*0.25); 57 | return color; 58 | } 59 | 60 | ENDCG 61 | 62 | Pass { 63 | Blend OneMinusDstColor One 64 | ZTest Always Cull Off ZWrite Off 65 | 66 | CGPROGRAM 67 | 68 | #pragma target 3.0 69 | #pragma vertex vert 70 | #pragma fragment frag 71 | 72 | ENDCG 73 | } 74 | 75 | } 76 | 77 | Fallback off 78 | 79 | } 80 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/Bokeh34.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57cdacf9b217546aaa18edf39a6151c0 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfField34.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 987fb0677d01f43ce8a9dbf12271e668 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldDX11.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8e82664aa8686642a424c88ab10164a 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/DepthOfFieldScatter.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acd613035ff3e455e8abf23fdc8c8c24 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/SeparableBlur" { 2 | Properties { 3 | _MainTex ("Base (RGB)", 2D) = "" {} 4 | } 5 | 6 | CGINCLUDE 7 | 8 | #include "UnityCG.cginc" 9 | 10 | struct v2f { 11 | float4 pos : SV_POSITION; 12 | float2 uv : TEXCOORD0; 13 | 14 | float4 uv01 : TEXCOORD1; 15 | float4 uv23 : TEXCOORD2; 16 | float4 uv45 : TEXCOORD3; 17 | }; 18 | 19 | float4 offsets; 20 | 21 | sampler2D _MainTex; 22 | half4 _MainTex_ST; 23 | 24 | v2f vert (appdata_img v) { 25 | v2f o; 26 | o.pos = UnityObjectToClipPos(v.vertex); 27 | 28 | o.uv.xy = UnityStereoScreenSpaceUVAdjust(v.texcoord.xy, _MainTex_ST); 29 | 30 | o.uv01 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1), _MainTex_ST); 31 | o.uv23 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 2.0, _MainTex_ST); 32 | o.uv45 = UnityStereoScreenSpaceUVAdjust(v.texcoord.xyxy + offsets.xyxy * float4(1,1, -1,-1) * 3.0, _MainTex_ST); 33 | 34 | return o; 35 | } 36 | 37 | half4 frag (v2f i) : SV_Target { 38 | half4 color = float4 (0,0,0,0); 39 | 40 | color += 0.40 * tex2D (_MainTex, i.uv); 41 | color += 0.15 * tex2D (_MainTex, i.uv01.xy); 42 | color += 0.15 * tex2D (_MainTex, i.uv01.zw); 43 | color += 0.10 * tex2D (_MainTex, i.uv23.xy); 44 | color += 0.10 * tex2D (_MainTex, i.uv23.zw); 45 | color += 0.05 * tex2D (_MainTex, i.uv45.xy); 46 | color += 0.05 * tex2D (_MainTex, i.uv45.zw); 47 | 48 | return color; 49 | } 50 | 51 | ENDCG 52 | 53 | Subshader { 54 | Pass { 55 | ZTest Always Cull Off ZWrite Off 56 | 57 | CGPROGRAM 58 | #pragma vertex vert 59 | #pragma fragment frag 60 | ENDCG 61 | } 62 | } 63 | 64 | Fallback off 65 | 66 | 67 | } // shader 68 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e97c14fbb5ea04c3a902cc533d7fc5d1 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/SeparableWeightedBlurDof34.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb4af680337344a4abad65a4e8873c50 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/_DepthOfField/TiltShiftHdrLensBlur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf34d2a25450349699e8ae6456fa7ca9 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/frag_ao.cginc: -------------------------------------------------------------------------------- 1 | 2 | half frag_ao (v2f_ao i, int sampleCount, float3 samples[INPUT_SAMPLE_COUNT]) 3 | { 4 | // read random normal from noise texture 5 | half3 randN = tex2D (_RandomTexture, i.uvr).xyz * 2.0 - 1.0; 6 | 7 | // read scene depth/normal 8 | float4 depthnormal = tex2D (_CameraDepthNormalsTexture, i.uv); 9 | float3 viewNorm; 10 | float depth; 11 | DecodeDepthNormal (depthnormal, depth, viewNorm); 12 | depth *= _ProjectionParams.z; 13 | float scale = _Params.x / depth; 14 | 15 | // accumulated occlusion factor 16 | float occ = 0.0; 17 | for (int s = 0; s < sampleCount; ++s) 18 | { 19 | // Reflect sample direction around a random vector 20 | half3 randomDir = reflect(samples[s], randN); 21 | 22 | // Make it point to the upper hemisphere 23 | half flip = (dot(viewNorm,randomDir)<0) ? 1.0 : -1.0; 24 | randomDir *= -flip; 25 | // Add a bit of normal to reduce self shadowing 26 | randomDir += viewNorm * 0.3; 27 | 28 | float2 offset = randomDir.xy * scale; 29 | float sD = depth - (randomDir.z * _Params.x); 30 | 31 | // Sample depth at offset location 32 | float4 sampleND = tex2D (_CameraDepthNormalsTexture, i.uv + offset); 33 | float sampleD; 34 | float3 sampleN; 35 | DecodeDepthNormal (sampleND, sampleD, sampleN); 36 | sampleD *= _ProjectionParams.z; 37 | float zd = saturate(sD-sampleD); 38 | if (zd > _Params.y) { 39 | // This sample occludes, contribute to occlusion 40 | occ += pow(1-zd,_Params.z); // sc2 41 | //occ += 1.0-saturate(pow(1.0 - zd, 11.0) + zd); // nullsq 42 | //occ += 1.0/(1.0+zd*zd*10); // iq 43 | } 44 | } 45 | occ /= sampleCount; 46 | return 1-occ; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Shaders/frag_ao.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51ae11a5cd82fda468a85179946d672a 3 | ShaderImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9372f23586ef470b97d53856af88487 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/ContrastEnhanced3D16.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecd9a2c463dcb476891e43d7c9f16ffa 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 1 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 2048 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 5 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/HexShape.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4cdca73d61814d33ac1587f6c163bca 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 64 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/MotionBlurJitter.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31f5a8611c4ed1245b18456206e798dc 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 0 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/Neutral3D16.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4b474cd484494a4aaa4bbf928219d09 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 1 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 2048 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 5 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/Noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/Noise.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/Noise.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e80c3c84ea861404d8a427db8b7abf04 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 3 24 | maxTextureSize: 64 25 | textureSettings: 26 | filterMode: 2 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 0 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseAndGrain.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a632f967e8ad42f5bd275898151ab6a 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 1 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 1 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 64 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 5 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectGrain.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffa9c02760c2b4e8eb9814ec06c4b05b 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 0 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/NoiseEffectScratch.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6205c27cc031f4e66b8ea90d1bfaa158 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 0 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: 0 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/RandomVectors.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a181ca8e3c62f3e4b8f183f6c586b032 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 0 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 0 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/SphereShape.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc00ec05a89da4ff695a4273715cd5ce 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 64 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/VignetteMask.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95ef4804fe0be4c999ddaa383536cde8 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/color correction ramp.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d440902fad11e807d00044888d76c639 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 0 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/Assets/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Effects/ImageEffects/Textures/grayscale ramp.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9a9781cad112c75d0008dfa8d76c639 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 2 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: 1 27 | aniso: 1 28 | mipBias: 0 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | textureType: -1 34 | buildTargetSettings: [] 35 | userData: 36 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.2.16", 4 | "com.unity.ext.nunit": "1.0.0", 5 | "com.unity.ide.rider": "1.1.0", 6 | "com.unity.ide.vscode": "1.1.0", 7 | "com.unity.package-manager-ui": "2.2.0", 8 | "com.unity.test-framework": "1.0.13", 9 | "com.unity.textmeshpro": "2.0.1", 10 | "com.unity.timeline": "1.1.0", 11 | "com.unity.ugui": "1.0.0", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.androidjni": "1.0.0", 14 | "com.unity.modules.animation": "1.0.0", 15 | "com.unity.modules.assetbundle": "1.0.0", 16 | "com.unity.modules.audio": "1.0.0", 17 | "com.unity.modules.cloth": "1.0.0", 18 | "com.unity.modules.director": "1.0.0", 19 | "com.unity.modules.imageconversion": "1.0.0", 20 | "com.unity.modules.imgui": "1.0.0", 21 | "com.unity.modules.jsonserialize": "1.0.0", 22 | "com.unity.modules.particlesystem": "1.0.0", 23 | "com.unity.modules.physics": "1.0.0", 24 | "com.unity.modules.physics2d": "1.0.0", 25 | "com.unity.modules.screencapture": "1.0.0", 26 | "com.unity.modules.terrain": "1.0.0", 27 | "com.unity.modules.terrainphysics": "1.0.0", 28 | "com.unity.modules.tilemap": "1.0.0", 29 | "com.unity.modules.ui": "1.0.0", 30 | "com.unity.modules.uielements": "1.0.0", 31 | "com.unity.modules.umbra": "1.0.0", 32 | "com.unity.modules.unityanalytics": "1.0.0", 33 | "com.unity.modules.unitywebrequest": "1.0.0", 34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 35 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 36 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 37 | "com.unity.modules.unitywebrequestwww": "1.0.0", 38 | "com.unity.modules.vehicles": "1.0.0", 39 | "com.unity.modules.video": "1.0.0", 40 | "com.unity.modules.vr": "1.0.0", 41 | "com.unity.modules.wind": "1.0.0", 42 | "com.unity.modules.xr": "1.0.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/PresetManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.2.4f1 2 | m_EditorVersionWithRevision: 2019.2.4f1 (c63b2af89a85) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bolt-Scripts/Animated-Ray-Tracing-Demo/4b6fe9422da62780c697fb3ce8016a21f64832fd/ProjectSettings/VFXManager.asset -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Animated Ray Tracing Demo 2 | An animated ray tracing demonstration tool built in Unity. 3 | 4 | Unity Version: 2019.2.4 5 | 6 | Additonal usage notes included in the demo scene. --------------------------------------------------------------------------------