test : opti

This commit is contained in:
Ferlat Thibaud
2026-07-03 11:49:25 +02:00
parent 85ab8ebabd
commit fea082bb6f
399 changed files with 1912806 additions and 1893 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b0a40d44eec36a147962ee9d4ca7bde9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,162 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_flashHallu_hol
m_Shader: {fileID: 4800000, guid: 8aedf45b2c4d7b5468b54c457a39430f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Bleed: 0.0048
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _ColorMask: 15
- _Contrast: 1
- _Cull: 2
- _Cutoff: 0.5
- _DarkAreaHatching: 1
- _Darken: 0
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _Distortion: 0.0068
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EdgeStrength: 2
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _GrainStrength: 0
- _HatchScale: 291
- _HatchStrength: 1
- _HatchThickness: 0.0295
- _Intensity: 1
- _JitterAmount: 0.02
- _JitterSpeed: 11
- _Metallic: 0
- _NoiseStrength: 0.393
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _ScribbleBleed: 0.0055
- _ScribbleScale: 52
- _ScribbleSpeed: 9
- _ScribbleStrength: 0.813
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _Surface: 0
- _UseUIAlphaClip: 0
- _VideoPreserve: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.754717, g: 0.38803846, b: 0.38803846, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &2768967736898011535
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ee02f227a2ef9c146a9e3df7f47442ce
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,162 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_flashHallu_omnissiah
m_Shader: {fileID: 4800000, guid: 8aedf45b2c4d7b5468b54c457a39430f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Bleed: 0.0048
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _ColorMask: 15
- _Contrast: 1.37
- _Cull: 2
- _Cutoff: 0.5
- _DarkAreaHatching: 1
- _Darken: 0.41
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _Distortion: 0.0147
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EdgeStrength: 2
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _GrainStrength: 0.041
- _HatchScale: 291
- _HatchStrength: 1
- _HatchThickness: 0.0295
- _Intensity: 1
- _JitterAmount: 0.02
- _JitterSpeed: 11
- _Metallic: 0
- _NoiseStrength: 0.393
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _ScribbleBleed: 0.0075
- _ScribbleScale: 52
- _ScribbleSpeed: 15.2
- _ScribbleStrength: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _Surface: 0
- _UseUIAlphaClip: 0
- _VideoPreserve: 0.443
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &2768967736898011535
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e8cd122788852424cbc5436633400b2e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,162 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_flashHallu_theater
m_Shader: {fileID: 4800000, guid: 8aedf45b2c4d7b5468b54c457a39430f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Bleed: 0.0048
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _ColorMask: 15
- _Contrast: 0.86
- _Cull: 2
- _Cutoff: 0.5
- _DarkAreaHatching: 1
- _Darken: 0.629
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _Distortion: 0.0154
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EdgeStrength: 2
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _GrainStrength: 0.067
- _HatchScale: 291
- _HatchStrength: 1
- _HatchThickness: 0.0843
- _Intensity: 1
- _JitterAmount: 0.02
- _JitterSpeed: 11
- _Metallic: 0
- _NoiseStrength: 0.393
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _ScribbleBleed: 0.0141
- _ScribbleScale: 18
- _ScribbleSpeed: 11.7
- _ScribbleStrength: 0.726
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _Surface: 0
- _UseUIAlphaClip: 0
- _VideoPreserve: 1
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.70692414, g: 0.8268364, b: 0.8867924, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &2768967736898011535
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c2467417522efbe448119480d4daff9f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c740c4da718d0b946b1ebde1ec3ba2ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,318 @@
Shader "Unheimlich/UI/HallucinationSketchBleed_V2"
{
Properties
{
[PerRendererData] _MainTex ("Sprite / Video Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1, 1, 1, 1)
[Header(Global Control)]
_Intensity ("Global Intensity", Range(0, 1)) = 0.65
_VideoPreserve ("Video Preserve", Range(0, 1)) = 0.72
_Darken ("Darken", Range(0, 1)) = 0.12
_Contrast ("Contrast", Range(0.5, 2.0)) = 1.12
[Header(Sketch Lines)]
_EdgeStrength ("Edge Strength", Range(0, 2)) = 1.15
_HatchStrength ("Hatch Strength", Range(0, 1)) = 0.55
_HatchScale ("Hatch Scale", Range(40, 420)) = 180
_HatchThickness ("Hatch Thickness", Range(0.005, 0.09)) = 0.032
_DarkAreaHatching ("Dark Area Hatching", Range(0, 1)) = 0.75
[Header(Animated Scribble)]
_ScribbleStrength ("Scribble Strength", Range(0, 1)) = 0.45
_ScribbleScale ("Scribble Scale", Range(10, 160)) = 48
_ScribbleSpeed ("Scribble Speed", Range(0, 30)) = 9
_ScribbleBleed ("Scribble Bleed", Range(0, 0.04)) = 0.012
[Header(Controlled Distortion)]
_Distortion ("UV Distortion", Range(0, 0.04)) = 0.008
_Bleed ("Chromatic Bleed", Range(0, 0.025)) = 0.006
_JitterAmount ("Jitter Amount", Range(0, 0.02)) = 0.004
_JitterSpeed ("Jitter Speed", Range(0, 30)) = 8
[Header(Grain)]
_GrainStrength ("Grain Strength", Range(0, 1)) = 0.12
[Header(UI)]
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
Name "HallucinationSketchBleed_V2"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _MainTex_TexelSize;
fixed4 _Color;
float4 _ClipRect;
float _Intensity;
float _VideoPreserve;
float _Darken;
float _Contrast;
float _EdgeStrength;
float _HatchStrength;
float _HatchScale;
float _HatchThickness;
float _DarkAreaHatching;
float _ScribbleStrength;
float _ScribbleScale;
float _ScribbleSpeed;
float _ScribbleBleed;
float _Distortion;
float _Bleed;
float _JitterAmount;
float _JitterSpeed;
float _GrainStrength;
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 uv : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
};
float Hash(float2 p)
{
return frac(sin(dot(p, float2(127.1, 311.7))) * 43758.5453123);
}
float Noise(float2 p)
{
float2 i = floor(p);
float2 f = frac(p);
float a = Hash(i);
float b = Hash(i + float2(1.0, 0.0));
float c = Hash(i + float2(0.0, 1.0));
float d = Hash(i + float2(1.0, 1.0));
float2 u = f * f * (3.0 - 2.0 * f);
return lerp(a, b, u.x)
+ (c - a) * u.y * (1.0 - u.x)
+ (d - b) * u.x * u.y;
}
float Luminance(float3 col)
{
return dot(col, float3(0.299, 0.587, 0.114));
}
float PencilBand(float value, float thickness)
{
float bandDistance = abs(frac(value) - 0.5);
return 1.0 - smoothstep(thickness, thickness + 0.018, bandDistance);
}
float GetEdge(float2 uv)
{
float2 texel = _MainTex_TexelSize.xy;
float l = Luminance(tex2D(_MainTex, uv - float2(texel.x, 0)).rgb);
float r = Luminance(tex2D(_MainTex, uv + float2(texel.x, 0)).rgb);
float d = Luminance(tex2D(_MainTex, uv - float2(0, texel.y)).rgb);
float u = Luminance(tex2D(_MainTex, uv + float2(0, texel.y)).rgb);
float edge = abs(r - l) + abs(u - d);
return saturate(edge * 5.0 * _EdgeStrength);
}
float SketchHatching(float2 uv, float luminance, float edge, float noiseValue)
{
float darkMask = saturate((1.0 - luminance) * _DarkAreaHatching);
float contourMask = saturate(edge * 1.4);
float mask = saturate(darkMask + contourMask);
float t = _Time.y * _ScribbleSpeed;
float2 animatedUv = uv;
animatedUv.x += (Noise(uv * 22.0 + t * 0.35) - 0.5) * 0.012;
animatedUv.y += (Noise(uv * 19.0 - t * 0.27) - 0.5) * 0.012;
float h1 = PencilBand((animatedUv.x + animatedUv.y * 0.72 + noiseValue * 0.08) * _HatchScale, _HatchThickness);
float h2 = PencilBand((animatedUv.x * 0.63 - animatedUv.y + noiseValue * 0.12) * (_HatchScale * 0.67), _HatchThickness * 0.9);
float h3 = PencilBand((animatedUv.x * 1.18 + animatedUv.y * 0.28 + noiseValue * 0.2) * (_HatchScale * 0.38), _HatchThickness * 0.75);
float hatch = saturate(h1 * 0.65 + h2 * 0.4 + h3 * 0.25);
return hatch * mask;
}
float AnimatedScribble(float2 uv, float luminance, float edge)
{
float t = _Time.y * _ScribbleSpeed;
float2 p = uv * _ScribbleScale;
float n1 = Noise(p + float2(t * 0.75, -t * 0.25));
float n2 = Noise(p * 1.7 + float2(-t * 0.35, t * 0.55));
float n3 = Noise(p * 3.1 + t);
float unstable = abs(n1 - n2);
float brokenLines = 1.0 - smoothstep(0.08, 0.22, unstable);
float darkMask = saturate(1.0 - luminance);
float edgeMask = saturate(edge * 1.7);
float mask = saturate(darkMask * 0.55 + edgeMask);
float flicker = step(0.42, n3);
return brokenLines * mask * flicker;
}
v2f vert(appdata_t v)
{
v2f o;
o.worldPosition = v.vertex;
o.vertex = UnityObjectToClipPos(o.worldPosition);
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
o.color = v.color * _Color;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
float intensity = saturate(_Intensity);
float2 uv = i.uv;
float time = _Time.y;
float globalNoise = Noise(uv * 18.0 + time * _JitterSpeed);
float jitterPhase = floor(time * _JitterSpeed);
float2 frameJitter;
frameJitter.x = Hash(float2(jitterPhase, 1.7)) - 0.5;
frameJitter.y = Hash(float2(jitterPhase, 9.2)) - 0.5;
uv += frameJitter * _JitterAmount * intensity;
float2 wobble;
wobble.x = sin(uv.y * 18.0 + time * 4.0) * 0.5 + globalNoise - 0.5;
wobble.y = cos(uv.x * 14.0 - time * 3.1) * 0.5 + Noise(uv * 28.0 - time) - 0.5;
uv += wobble * _Distortion * intensity;
float edge = GetEdge(uv);
float2 bleedOffset = float2(_Bleed * intensity, 0.0);
float2 scribbleBleedOffset = float2(_ScribbleBleed * edge * intensity, _ScribbleBleed * 0.35 * intensity);
fixed4 baseCol = tex2D(_MainTex, uv);
fixed4 redCol = tex2D(_MainTex, uv + bleedOffset + scribbleBleedOffset);
fixed4 blueCol = tex2D(_MainTex, uv - bleedOffset - scribbleBleedOffset);
fixed4 videoCol;
videoCol.r = redCol.r;
videoCol.g = baseCol.g;
videoCol.b = blueCol.b;
videoCol.a = baseCol.a;
float luminance = Luminance(videoCol.rgb);
float hatch = SketchHatching(i.uv, luminance, edge, globalNoise);
float scribble = AnimatedScribble(i.uv, luminance, edge);
float grain = Hash(floor(i.uv * 1100.0 + time * 80.0));
float3 sketchCol = videoCol.rgb;
sketchCol = saturate((sketchCol - 0.5) * _Contrast + 0.5);
sketchCol *= 1.0 - (_Darken * intensity);
float hatchAmount = hatch * _HatchStrength * intensity;
float scribbleAmount = scribble * _ScribbleStrength * intensity;
sketchCol = lerp(sketchCol, sketchCol * 0.22, hatchAmount);
sketchCol = lerp(sketchCol, sketchCol * 0.06, scribbleAmount);
sketchCol += (grain - 0.5) * _GrainStrength * intensity;
float preserve = saturate(_VideoPreserve);
float3 finalRgb = lerp(sketchCol, videoCol.rgb, preserve * (1.0 - intensity * 0.35));
fixed4 col;
col.rgb = saturate(finalRgb);
col.a = videoCol.a;
col *= i.color;
#ifdef UNITY_UI_CLIP_RECT
col.a *= UnityGet2DClipping(i.worldPosition.xy, _ClipRect);
#endif
#ifdef UNITY_UI_ALPHACLIP
clip(col.a - 0.001);
#endif
return col;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8aedf45b2c4d7b5468b54c457a39430f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ec0e7836356afa34d8c13833e99d3f8a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: b0bcfa0c7d8546f41bbf6c37042457ef
VideoClipImporter:
externalObjects: {}
serializedVersion: 3
frameRange: 0
startFrame: -1
endFrame: -1
colorSpace: 0
deinterlace: 0
encodeAlpha: 0
flipVertical: 0
flipHorizontal: 0
importAudio: 1
targetSettings: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ba3c91ef4865d7c4aa179bac9d7a1e69
VideoClipImporter:
externalObjects: {}
serializedVersion: 3
frameRange: 0
startFrame: -1
endFrame: -1
colorSpace: 0
deinterlace: 0
encodeAlpha: 0
flipVertical: 0
flipHorizontal: 0
importAudio: 1
targetSettings: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RT_houseOfLeaves
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 754ac0a644a2b7e479d1bb8fa29f7a62
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RT_omnissiah
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5e7d07b5b87049e439bc686fef1c54f0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RT_theater
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 725048bdfff10644eb1cae1916817e85
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 110592976a5654240b144bf3c05cf16e
VideoClipImporter:
externalObjects: {}
serializedVersion: 3
frameRange: 0
startFrame: -1
endFrame: -1
colorSpace: 0
deinterlace: 0
encodeAlpha: 0
flipVertical: 0
flipHorizontal: 0
importAudio: 1
targetSettings: {}
userData:
assetBundleName:
assetBundleVariant: