push web 版本
This commit is contained in:
parent
7effceb1a2
commit
94e7a09be6
|
@ -0,0 +1,23 @@
|
|||
/YHWeb/.vsconfig
|
||||
/YHWeb/Assembly-CSharp.csproj
|
||||
/YHWeb/Assembly-CSharp-Editor.csproj
|
||||
/YHWeb/Assembly-CSharp-Editor-firstpass.csproj
|
||||
/YHWeb/Assembly-CSharp-firstpass.csproj
|
||||
/YHWeb/Unity.CollabProxy.Editor.csproj
|
||||
/YHWeb/Unity.Rider.Editor.csproj
|
||||
/YHWeb/Unity.TextMeshPro.csproj
|
||||
/YHWeb/Unity.TextMeshPro.Editor.csproj
|
||||
/YHWeb/Unity.VSCode.Editor.csproj
|
||||
/YHWeb/UnityEditor.TestRunner.csproj
|
||||
/YHWeb/UnityEngine.TestRunner.csproj
|
||||
/YHWeb/YHWeb.csproj
|
||||
/YHWeb/YHWeb.Editor.csproj
|
||||
/YHWeb/YHWeb.Editor.Plugins.csproj
|
||||
/YHWeb/YHWeb.Plugins.csproj
|
||||
/YHWeb/.svn
|
||||
/YHWeb/.vs
|
||||
/YHWeb/Library
|
||||
/YHWeb/Logs
|
||||
/YHWeb/obj
|
||||
/YHWeb/Packages
|
||||
/YHWeb/YHWeb.sln
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 395b53b15aac62b4aa095787bfa6efe0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8bc125f11150294191488c9d7e90cb9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,62 @@
|
|||
About
|
||||
|
||||
NVIDIA FXAA - Fast Approximate Anti-Aliasing, by TIMOTHY LOTTES
|
||||
|
||||
FXAA is a post-process anti-aliasing technique. While mostly used in deferred rendering
|
||||
pipelines that lack the ability to use hardware MSAA, it can also be used in combination
|
||||
with hardware anti-aliasing to smooth out hard edges missed by MSAA (e.g. inside polygons).
|
||||
|
||||
For more information about FXAA:
|
||||
|
||||
http://timothylottes.blogspot.pt/2011/07/nvidia-fxaa-39-released.html
|
||||
http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf
|
||||
|
||||
Ported to Unity Pro by Insidious Technologies Lda
|
||||
|
||||
http://www.insidious.pt
|
||||
|
||||
Minimum Requirements
|
||||
|
||||
Software
|
||||
|
||||
Unity 3.5
|
||||
|
||||
Hardware
|
||||
|
||||
GPU: SM3/GL2 support
|
||||
>= Geforce 6000 series (NV40)
|
||||
>= Radeon X1000 series (R520)
|
||||
>= Intel GMA 3100
|
||||
|
||||
Quick Guide
|
||||
|
||||
After installing the package, simply add the "Image Effects/FXAA" component to your camera.
|
||||
It should start working immediately, without any requiring any extra setup or dependencies.
|
||||
|
||||
Feedback
|
||||
|
||||
To file error reports, questions or suggestions, you may use
|
||||
our feedback form online:
|
||||
|
||||
http://www.insidious.pt/#feedback
|
||||
|
||||
Or contact us directly:
|
||||
|
||||
For general inquiries: info@insidious.pt
|
||||
For technical support: support@insidious.pt (customers only)
|
||||
|
||||
License
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
|
||||
------------------------------------------------------------------------------
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
|
||||
*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
|
||||
OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR
|
||||
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
|
||||
LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
|
||||
OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
|
||||
THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f5ba4006d87cd5942881533b6428cc3d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bdd94b77d962a4740ad4dd10c0fbb077
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent( typeof( Camera ) )]
|
||||
[AddComponentMenu( "Image Effects/FXAA" )]
|
||||
public class FXAA : FXAAPostEffectsBase
|
||||
{
|
||||
public Shader shader;
|
||||
private Material mat;
|
||||
|
||||
void CreateMaterials ()
|
||||
{
|
||||
if ( mat == null )
|
||||
mat = CheckShaderAndCreateMaterial( shader, mat );
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
shader = Shader.Find( "Hidden/FXAA3" );
|
||||
CreateMaterials();
|
||||
CheckSupport( false );
|
||||
}
|
||||
|
||||
public void OnRenderImage( RenderTexture source, RenderTexture destination )
|
||||
{
|
||||
CreateMaterials();
|
||||
|
||||
float rcpWidth = 1.0f / Screen.width;
|
||||
float rcpHeight = 1.0f / Screen.height;
|
||||
|
||||
mat.SetVector( "_rcpFrame", new Vector4( rcpWidth, rcpHeight, 0, 0 ) );
|
||||
mat.SetVector( "_rcpFrameOpt", new Vector4( rcpWidth * 2, rcpHeight * 2, rcpWidth * 0.5f, rcpHeight * 0.5f ) );
|
||||
|
||||
Graphics.Blit( source, destination, mat );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 41db0ff7571f51c45aedce56876a69fb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,201 @@
|
|||
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent( typeof( Camera ) )]
|
||||
public class FXAAPostEffectsBase : MonoBehaviour
|
||||
{
|
||||
protected bool supportHDRTextures = true;
|
||||
protected bool isSupported = true;
|
||||
|
||||
public Material CheckShaderAndCreateMaterial (Shader s, Material m2Create) {
|
||||
if (!s) {
|
||||
Debug.Log("Missing shader in " + this.ToString ());
|
||||
enabled = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (s.isSupported && m2Create && m2Create.shader == s)
|
||||
return m2Create;
|
||||
|
||||
if (!s.isSupported) {
|
||||
NotSupported ();
|
||||
Debug.LogError("The shader " + s.ToString() + " on effect "+this.ToString()+" is not supported on this platform!");
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
m2Create = new Material (s);
|
||||
m2Create.hideFlags = HideFlags.DontSave;
|
||||
if (m2Create)
|
||||
return m2Create;
|
||||
else return null;
|
||||
}
|
||||
}
|
||||
|
||||
Material CreateMaterial (Shader s, Material m2Create) {
|
||||
if (!s) {
|
||||
Debug.Log ("Missing shader in " + this.ToString ());
|
||||
return null;
|
||||
}
|
||||
|
||||
if (m2Create && (m2Create.shader == s) && (s.isSupported))
|
||||
return m2Create;
|
||||
|
||||
if (!s.isSupported) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
m2Create = new Material (s);
|
||||
m2Create.hideFlags = HideFlags.DontSave;
|
||||
if (m2Create)
|
||||
return m2Create;
|
||||
else return null;
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable() {
|
||||
isSupported = true;
|
||||
}
|
||||
|
||||
// deprecated but needed for old effects to survive upgrade
|
||||
bool CheckSupport () {
|
||||
return CheckSupport (false);
|
||||
}
|
||||
|
||||
bool CheckResources () {
|
||||
Debug.LogWarning ("CheckResources () for " + this.ToString() + " should be overwritten.");
|
||||
return isSupported;
|
||||
}
|
||||
|
||||
void Start () {
|
||||
CheckResources ();
|
||||
}
|
||||
|
||||
public bool CheckSupport (bool needDepth) {
|
||||
isSupported = true;
|
||||
supportHDRTextures = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf);
|
||||
|
||||
if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures) {
|
||||
NotSupported ();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(needDepth && !SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)) {
|
||||
NotSupported ();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(needDepth)
|
||||
GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckSupport (bool needDepth, bool needHdr) {
|
||||
if(!CheckSupport(needDepth))
|
||||
return false;
|
||||
|
||||
if(needHdr && !supportHDRTextures) {
|
||||
NotSupported ();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ReportAutoDisable () {
|
||||
Debug.LogWarning ("The image effect " + this.ToString() + " has been disabled as it's not supported on the current platform.");
|
||||
}
|
||||
|
||||
// deprecated but needed for old effects to survive upgrading
|
||||
bool CheckShader (Shader s) {
|
||||
Debug.Log("The shader " + s.ToString () + " on effect "+ this.ToString () + " is not part of the Unity 3.2+ effects suite anymore. For best performance and quality, please ensure you are using the latest Standard Assets Image Effects (Pro only) package.");
|
||||
if (!s.isSupported) {
|
||||
NotSupported ();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void NotSupported () {
|
||||
enabled = false;
|
||||
isSupported = false;
|
||||
return;
|
||||
}
|
||||
|
||||
void DrawBorder (RenderTexture dest, Material material) {
|
||||
float x1, x2, y1, y2;
|
||||
|
||||
RenderTexture.active = dest;
|
||||
bool invertY = true; // source.texelSize.y < 0.0f;
|
||||
// Set up the simple Matrix
|
||||
GL.PushMatrix();
|
||||
GL.LoadOrtho();
|
||||
|
||||
for (int i = 0; i < material.passCount; i++)
|
||||
{
|
||||
material.SetPass(i);
|
||||
|
||||
float y1_, y2_;
|
||||
if (invertY)
|
||||
{
|
||||
y1_ = 1.0f; y2_ = 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
y1_ = 0.0f; y2_ = 1.0f;
|
||||
}
|
||||
|
||||
// left
|
||||
x1 = 0.0f;
|
||||
x2 = 0.0f + 1.0f/(dest.width*1.0f);
|
||||
y1 = 0.0f;
|
||||
y2 = 1.0f;
|
||||
GL.Begin(GL.QUADS);
|
||||
|
||||
GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f);
|
||||
GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f);
|
||||
|
||||
// right
|
||||
x1 = 1.0f - 1.0f/(dest.width*1.0f);
|
||||
x2 = 1.0f;
|
||||
y1 = 0.0f;
|
||||
y2 = 1.0f;
|
||||
|
||||
GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f);
|
||||
GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f);
|
||||
|
||||
// top
|
||||
x1 = 0.0f;
|
||||
x2 = 1.0f;
|
||||
y1 = 0.0f;
|
||||
y2 = 0.0f + 1.0f/(dest.height*1.0f);
|
||||
|
||||
GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f);
|
||||
GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f);
|
||||
|
||||
// bottom
|
||||
x1 = 0.0f;
|
||||
x2 = 1.0f;
|
||||
y1 = 1.0f - 1.0f/(dest.height*1.0f);
|
||||
y2 = 1.0f;
|
||||
|
||||
GL.TexCoord2(0.0f, y1_); GL.Vertex3(x1, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y1_); GL.Vertex3(x2, y1, 0.1f);
|
||||
GL.TexCoord2(1.0f, y2_); GL.Vertex3(x2, y2, 0.1f);
|
||||
GL.TexCoord2(0.0f, y2_); GL.Vertex3(x1, y2, 0.1f);
|
||||
|
||||
GL.End();
|
||||
}
|
||||
|
||||
GL.PopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 39ee94035930b6c4fa1eae8f052343e4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 495ceac2d8063264ea25029d7f95bcdc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,76 @@
|
|||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
|
||||
Shader "Hidden/FXAA3" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
}
|
||||
SubShader {
|
||||
Pass {
|
||||
ZTest Always Cull Off ZWrite Off
|
||||
Fog { Mode off }
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#pragma glsl
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
#define FXAA_PC
|
||||
#define FXAA_HLSL_3
|
||||
#define FXAA_EARLY_EXIT 0
|
||||
#include "Fxaa3_9.cginc"
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
uniform float4 _MainTex_TexelSize;
|
||||
uniform float4 _rcpFrame;
|
||||
uniform float4 _rcpFrameOpt;
|
||||
|
||||
struct v2f {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 uvAux : TEXCOORD1;
|
||||
};
|
||||
|
||||
v2f vert( appdata_img v )
|
||||
{
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos (v.vertex);
|
||||
|
||||
float2 uv = v.texcoord.xy;
|
||||
o.uv = uv;
|
||||
|
||||
#if SHADER_API_D3D9
|
||||
o.uv.y += _MainTex_TexelSize.y;
|
||||
#endif
|
||||
|
||||
o.uvAux.xy = uv + float2( -_MainTex_TexelSize.x, +_MainTex_TexelSize.y ) * 0.5f;
|
||||
o.uvAux.zw = uv + float2( +_MainTex_TexelSize.x, -_MainTex_TexelSize.y ) * 0.5f;
|
||||
|
||||
#if SHADER_API_D3D9
|
||||
if ( _MainTex_TexelSize.y < 0 )
|
||||
uv.y = 1 - uv.y;
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag (v2f i) : COLOR
|
||||
{
|
||||
return FxaaPixelShader_Quality(
|
||||
i.uv,
|
||||
i.uvAux,
|
||||
_MainTex,
|
||||
_rcpFrame.xy,
|
||||
_rcpFrameOpt );
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback off
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3412f10f8c0280d47bb7c1759f88674b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,726 @@
|
|||
/*============================================================================
|
||||
|
||||
|
||||
NVIDIA FXAA 3.9 by TIMOTHY LOTTES
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
|
||||
------------------------------------------------------------------------------
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
|
||||
*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
|
||||
OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR
|
||||
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
|
||||
LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
|
||||
OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
|
||||
THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INTEGRATION CHECKLIST
|
||||
------------------------------------------------------------------------------
|
||||
(1.)
|
||||
In the shader source,
|
||||
setup defines for the desired configuration.
|
||||
Example,
|
||||
|
||||
#define FXAA_PC 1
|
||||
#define FXAA_HLSL_3 1
|
||||
|
||||
(2.)
|
||||
Then include this file,
|
||||
|
||||
#include "Fxaa3.h"
|
||||
|
||||
(3.)
|
||||
Then call the FXAA pixel shader from within your desired shader,
|
||||
|
||||
return FxaaPixelShader(pos, posPos, tex, rcpFrame, rcpFrameOpt);
|
||||
|
||||
(4.)
|
||||
Insure pass prior to FXAA outputs RGBL.
|
||||
See next section.
|
||||
|
||||
(5.)
|
||||
Setup engine to provide "rcpFrame" and "rcpFrameOpt" constants.
|
||||
Not using constants will result in a performance loss.
|
||||
|
||||
// {x_} = 1.0/screenWidthInPixels
|
||||
// {_y} = 1.0/screenHeightInPixels
|
||||
float2 rcpFrame
|
||||
|
||||
// This must be from a constant/uniform.
|
||||
// {x___} = 2.0/screenWidthInPixels
|
||||
// {_y__} = 2.0/screenHeightInPixels
|
||||
// {__z_} = 0.5/screenWidthInPixels
|
||||
// {___w} = 0.5/screenHeightInPixels
|
||||
float4 rcpFrameOpt
|
||||
|
||||
(6.)
|
||||
Have FXAA vertex shader run as a full screen triangle,
|
||||
and output "pos" and "posPos" such that inputs in the pixel shader provide,
|
||||
|
||||
// {xy} = center of pixel
|
||||
float2 pos,
|
||||
|
||||
// {xy__} = upper left of pixel
|
||||
// {__zw} = lower right of pixel
|
||||
float4 posPos,
|
||||
|
||||
(7.)
|
||||
Insure the texture sampler used by FXAA is set to bilinear filtering.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
INTEGRATION - RGBL AND COLORSPACE
|
||||
------------------------------------------------------------------------------
|
||||
FXAA3 requires RGBL as input.
|
||||
|
||||
RGB should be LDR (low dynamic range).
|
||||
Specifically do FXAA after tonemapping.
|
||||
|
||||
RGB data as returned by a texture fetch can be linear or non-linear.
|
||||
Note an "sRGB format" texture counts as linear,
|
||||
because the result of a texture fetch is linear data.
|
||||
Regular "RGBA8" textures in the sRGB colorspace are non-linear.
|
||||
|
||||
Luma must be stored in the alpha channel prior to running FXAA.
|
||||
This luma should be in a perceptual space (could be gamma 2.0).
|
||||
Example pass before FXAA where output is gamma 2.0 encoded,
|
||||
|
||||
color.rgb = ToneMap(color.rgb); // linear color output
|
||||
color.rgb = sqrt(color.rgb); // gamma 2.0 color output
|
||||
return color;
|
||||
|
||||
To use FXAA,
|
||||
|
||||
color.rgb = ToneMap(color.rgb); // linear color output
|
||||
color.rgb = sqrt(color.rgb); // gamma 2.0 color output
|
||||
color.a = dot(color.rgb, float3(0.299, 0.587, 0.114)); // compute luma
|
||||
return color;
|
||||
|
||||
Another example where output is linear encoded,
|
||||
say for instance writing to an sRGB formated render target,
|
||||
where the render target does the conversion back to sRGB after blending,
|
||||
|
||||
color.rgb = ToneMap(color.rgb); // linear color output
|
||||
return color;
|
||||
|
||||
To use FXAA,
|
||||
|
||||
color.rgb = ToneMap(color.rgb); // linear color output
|
||||
color.a = sqrt(dot(color.rgb, float3(0.299, 0.587, 0.114))); // compute luma
|
||||
return color;
|
||||
|
||||
Getting luma correct is required for the algorithm to work correctly.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
COMPLEX INTEGRATION
|
||||
------------------------------------------------------------------------------
|
||||
Q. What if the engine is blending into RGB before wanting to run FXAA?
|
||||
|
||||
A. In the last opaque pass prior to FXAA,
|
||||
have the pass write out luma into alpha.
|
||||
Then blend into RGB only.
|
||||
FXAA should be able to run ok
|
||||
assuming the blending pass did not any add aliasing.
|
||||
This should be the common case for particles and common blending passes.
|
||||
|
||||
============================================================================*/
|
||||
|
||||
/*============================================================================
|
||||
|
||||
INTEGRATION KNOBS
|
||||
|
||||
============================================================================*/
|
||||
//
|
||||
// FXAA_PS3 and FXAA_360 choose the console algorithm (FXAA3 CONSOLE).
|
||||
// FXAA_360_OPT is a prototype for the new optimized 360 version.
|
||||
//
|
||||
// 1 = Use API.
|
||||
// 0 = Don't use API.
|
||||
//
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_PS3
|
||||
#define FXAA_PS3 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_360
|
||||
#define FXAA_360 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_360_OPT
|
||||
#define FXAA_360_OPT 0
|
||||
#endif
|
||||
/*==========================================================================*/
|
||||
#ifndef FXAA_PC
|
||||
//
|
||||
// FXAA Quality
|
||||
// The high quality PC algorithm.
|
||||
//
|
||||
#define FXAA_PC 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_PC_CONSOLE
|
||||
//
|
||||
// The console algorithm for PC is included
|
||||
// for developers targeting really low spec machines.
|
||||
//
|
||||
#define FXAA_PC_CONSOLE 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_GLSL_120
|
||||
#define FXAA_GLSL_120 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_GLSL_130
|
||||
#define FXAA_GLSL_130 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_HLSL_3
|
||||
#define FXAA_HLSL_3 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_HLSL_4
|
||||
#define FXAA_HLSL_4 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_HLSL_5
|
||||
#define FXAA_HLSL_5 0
|
||||
#endif
|
||||
/*==========================================================================*/
|
||||
#ifndef FXAA_EARLY_EXIT
|
||||
//
|
||||
// Controls algorithm's early exit path.
|
||||
// On PS3 turning this on adds 2 cycles to the shader.
|
||||
// On 360 turning this off adds 10ths of a millisecond to the shader.
|
||||
// Turning this off on console will result in a more blurry image.
|
||||
// So this defaults to on.
|
||||
//
|
||||
// 1 = On.
|
||||
// 0 = Off.
|
||||
//
|
||||
#define FXAA_EARLY_EXIT 1
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_DISCARD
|
||||
//
|
||||
// Only valid for PC OpenGL currently.
|
||||
//
|
||||
// 1 = Use discard on pixels which don't need AA.
|
||||
// For APIs which enable concurrent TEX+ROP from same surface.
|
||||
// 0 = Return unchanged color on pixels which don't need AA.
|
||||
//
|
||||
#define FXAA_DISCARD 0
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_FAST_PIXEL_OFFSET
|
||||
//
|
||||
// Used for GLSL 120 only.
|
||||
//
|
||||
// 1 = GL API supports fast pixel offsets
|
||||
// 0 = do not use fast pixel offsets
|
||||
//
|
||||
#ifdef GL_EXT_gpu_shader4
|
||||
#define FXAA_FAST_PIXEL_OFFSET 1
|
||||
#endif
|
||||
#ifdef GL_NV_gpu_shader5
|
||||
#define FXAA_FAST_PIXEL_OFFSET 1
|
||||
#endif
|
||||
#ifdef GL_ARB_gpu_shader5
|
||||
#define FXAA_FAST_PIXEL_OFFSET 1
|
||||
#endif
|
||||
#ifndef FXAA_FAST_PIXEL_OFFSET
|
||||
#define FXAA_FAST_PIXEL_OFFSET 0
|
||||
#endif
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_GATHER4_ALPHA
|
||||
//
|
||||
// 1 = API supports gather4 on alpha channel.
|
||||
// 0 = API does not support gather4 on alpha channel.
|
||||
//
|
||||
#if (FXAA_HLSL_5 == 1)
|
||||
#define FXAA_GATHER4_ALPHA 1
|
||||
#endif
|
||||
#ifdef GL_ARB_gpu_shader5
|
||||
#define FXAA_GATHER4_ALPHA 1
|
||||
#endif
|
||||
#ifdef GL_NV_gpu_shader5
|
||||
#define FXAA_GATHER4_ALPHA 1
|
||||
#endif
|
||||
#ifndef FXAA_GATHER4_ALPHA
|
||||
#define FXAA_GATHER4_ALPHA 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*============================================================================
|
||||
FXAA CONSOLE - TUNING KNOBS
|
||||
============================================================================*/
|
||||
#ifndef FXAA_CONSOLE__EDGE_SHARPNESS
|
||||
//
|
||||
// Consoles the sharpness of edges.
|
||||
//
|
||||
// Due to the PS3 being ALU bound,
|
||||
// there are only two safe values here: 4 and 8.
|
||||
// These options use the shaders ability to a free *|/ by 4|8.
|
||||
//
|
||||
// 8.0 is sharper
|
||||
// 4.0 is softer
|
||||
// 2.0 is really soft (good for vector graphics inputs)
|
||||
//
|
||||
#if 1
|
||||
#define FXAA_CONSOLE__EDGE_SHARPNESS 8.0
|
||||
#endif
|
||||
#if 0
|
||||
#define FXAA_CONSOLE__EDGE_SHARPNESS 4.0
|
||||
#endif
|
||||
#if 0
|
||||
#define FXAA_CONSOLE__EDGE_SHARPNESS 2.0
|
||||
#endif
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_CONSOLE__EDGE_THRESHOLD
|
||||
//
|
||||
// The minimum amount of local contrast required to apply algorithm.
|
||||
// The console setting has a different mapping than the quality setting.
|
||||
//
|
||||
// This only applies when FXAA_EARLY_EXIT is 1.
|
||||
//
|
||||
// Due to the PS3 being ALU bound,
|
||||
// there are only two safe values here: 0.25 and 0.125.
|
||||
// These options use the shaders ability to a free *|/ by 4|8.
|
||||
//
|
||||
// 0.125 leaves less aliasing, but is softer
|
||||
// 0.25 leaves more aliasing, and is sharper
|
||||
//
|
||||
#if 1
|
||||
#define FXAA_CONSOLE__EDGE_THRESHOLD 0.125
|
||||
#else
|
||||
#define FXAA_CONSOLE__EDGE_THRESHOLD 0.25
|
||||
#endif
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_CONSOLE__EDGE_THRESHOLD_MIN
|
||||
//
|
||||
// Trims the algorithm from processing darks.
|
||||
// The console setting has a different mapping than the quality setting.
|
||||
//
|
||||
// This only applies when FXAA_EARLY_EXIT is 1.
|
||||
//
|
||||
// This does not apply to PS3.
|
||||
// PS3 was simplified to avoid more shader instructions.
|
||||
//
|
||||
#define FXAA_CONSOLE__EDGE_THRESHOLD_MIN 0.05
|
||||
#endif
|
||||
|
||||
/*============================================================================
|
||||
FXAA QUALITY - TUNING KNOBS
|
||||
============================================================================*/
|
||||
#ifndef FXAA_QUALITY__EDGE_THRESHOLD
|
||||
//
|
||||
// The minimum amount of local contrast required to apply algorithm.
|
||||
//
|
||||
// 1/3 - too little
|
||||
// 1/4 - low quality
|
||||
// 1/6 - default
|
||||
// 1/8 - high quality
|
||||
// 1/16 - overkill
|
||||
//
|
||||
#define FXAA_QUALITY__EDGE_THRESHOLD (1.0/6.0)
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_QUALITY__EDGE_THRESHOLD_MIN
|
||||
//
|
||||
// Trims the algorithm from processing darks.
|
||||
//
|
||||
// 1/32 - visible limit
|
||||
// 1/16 - high quality
|
||||
// 1/12 - upper limit (default, the start of visible unfiltered edges)
|
||||
//
|
||||
#define FXAA_QUALITY__EDGE_THRESHOLD_MIN (1.0/12.0)
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#ifndef FXAA_QUALITY__SUBPIX
|
||||
//
|
||||
// Choose the amount of sub-pixel aliasing removal.
|
||||
//
|
||||
// 1 - upper limit (softer)
|
||||
// 3/4 - default amount of filtering
|
||||
// 1/2 - lower limit (sharper, less sub-pixel aliasing removal)
|
||||
//
|
||||
//
|
||||
#define FXAA_QUALITY__SUBPIX (3.0/4.0)
|
||||
#endif
|
||||
|
||||
|
||||
/*============================================================================
|
||||
|
||||
API PORTING
|
||||
|
||||
============================================================================*/
|
||||
|
||||
float4 luma( float4 color )
|
||||
{
|
||||
color.a = dot( color.rgb, float3( 0.299f, 0.587f, 0.114f ) );
|
||||
return color;
|
||||
}
|
||||
|
||||
#define int2 float2
|
||||
#define FxaaInt2 float2
|
||||
#define FxaaFloat2 float2
|
||||
#define FxaaFloat3 float3
|
||||
#define FxaaFloat4 float4
|
||||
#define FxaaDiscard clip(-1)
|
||||
#define FxaaDot3(a, b) dot(a, b)
|
||||
#define FxaaSat(x) saturate(x)
|
||||
#define FxaaLerp(x,y,s) lerp(x,y,s)
|
||||
#define FxaaTex sampler2D
|
||||
#define FxaaTexTop(t, p) luma( tex2Dlod(t, float4(p, 0.0, 0.0)) )
|
||||
#define FxaaTexOff(t, p, o, r) luma( tex2Dlod(t, float4(p + (o * r), 0, 0)) )
|
||||
|
||||
|
||||
/*============================================================================
|
||||
|
||||
FXAA3 CONSOLE - PC PIXEL SHADER
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Using a modified version of the PS3 version here to best target old hardware.
|
||||
============================================================================*/
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 FxaaPixelShader_Speed(
|
||||
// {xy} = center of pixel
|
||||
float2 pos,
|
||||
// {xy__} = upper left of pixel
|
||||
// {__zw} = lower right of pixel
|
||||
float4 posPos,
|
||||
// {rgb_} = color in linear or perceptual color space
|
||||
// {___a} = alpha output is junk value
|
||||
FxaaTex tex,
|
||||
// This must be from a constant/uniform.
|
||||
// {xy} = rcpFrame not used on PC version of FXAA Console
|
||||
float2 rcpFrame,
|
||||
// This must be from a constant/uniform.
|
||||
// {x___} = 2.0/screenWidthInPixels
|
||||
// {_y__} = 2.0/screenHeightInPixels
|
||||
// {__z_} = 0.5/screenWidthInPixels
|
||||
// {___w} = 0.5/screenHeightInPixels
|
||||
float4 rcpFrameOpt
|
||||
) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 dir;
|
||||
dir.y = 0.0;
|
||||
half4 lumaNe = FxaaTexTop(tex, posPos.zy);
|
||||
lumaNe.w += half(1.0/384.0);
|
||||
dir.x = -lumaNe.w;
|
||||
dir.z = -lumaNe.w;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 lumaSw = FxaaTexTop(tex, posPos.xw);
|
||||
dir.x += lumaSw.w;
|
||||
dir.z += lumaSw.w;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 lumaNw = FxaaTexTop(tex, posPos.xy);
|
||||
dir.x -= lumaNw.w;
|
||||
dir.z += lumaNw.w;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 lumaSe = FxaaTexTop(tex, posPos.zw);
|
||||
dir.x += lumaSe.w;
|
||||
dir.z -= lumaSe.w;
|
||||
/*==========================================================================*/
|
||||
#if (FXAA_EARLY_EXIT == 1)
|
||||
half4 rgbyM = FxaaTexTop(tex, pos.xy);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half lumaMin = min(min(lumaNw.w, lumaSw.w), min(lumaNe.w, lumaSe.w));
|
||||
half lumaMax = max(max(lumaNw.w, lumaSw.w), max(lumaNe.w, lumaSe.w));
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half lumaMinM = min(lumaMin, rgbyM.w);
|
||||
half lumaMaxM = max(lumaMax, rgbyM.w);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if((lumaMaxM - lumaMinM) < max(FXAA_CONSOLE__EDGE_THRESHOLD_MIN, lumaMax * FXAA_CONSOLE__EDGE_THRESHOLD))
|
||||
#if (FXAA_DISCARD == 1)
|
||||
FxaaDiscard;
|
||||
#else
|
||||
return rgbyM;
|
||||
#endif
|
||||
#endif
|
||||
/*==========================================================================*/
|
||||
half4 dir1_pos;
|
||||
dir1_pos.xy = normalize(dir.xyz).xz;
|
||||
half dirAbsMinTimesC = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE__EDGE_SHARPNESS);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 dir2_pos;
|
||||
dir2_pos.xy = clamp(dir1_pos.xy / dirAbsMinTimesC, half(-2.0), half(2.0));
|
||||
dir1_pos.zw = pos.xy;
|
||||
dir2_pos.zw = pos.xy;
|
||||
half4 temp1N;
|
||||
temp1N.xy = dir1_pos.zw - dir1_pos.xy * rcpFrameOpt.zw;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
temp1N = FxaaTexTop(tex, temp1N.xy);
|
||||
half4 rgby1;
|
||||
rgby1.xy = dir1_pos.zw + dir1_pos.xy * rcpFrameOpt.zw;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
rgby1 = FxaaTexTop(tex, rgby1.xy);
|
||||
rgby1 = (temp1N + rgby1) * 0.5;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 temp2N;
|
||||
temp2N.xy = dir2_pos.zw - dir2_pos.xy * rcpFrameOpt.xy;
|
||||
temp2N = FxaaTexTop(tex, temp2N.xy);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
half4 rgby2;
|
||||
rgby2.xy = dir2_pos.zw + dir2_pos.xy * rcpFrameOpt.xy;
|
||||
rgby2 = FxaaTexTop(tex, rgby2.xy);
|
||||
rgby2 = (temp2N + rgby2) * 0.5;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#if (FXAA_EARLY_EXIT == 0)
|
||||
half lumaMin = min(min(lumaNw.w, lumaSw.w), min(lumaNe.w, lumaSe.w));
|
||||
half lumaMax = max(max(lumaNw.w, lumaSw.w), max(lumaNe.w, lumaSe.w));
|
||||
#endif
|
||||
rgby2 = (rgby2 + rgby1) * 0.5;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
bool twoTapLt = rgby2.w < lumaMin;
|
||||
bool twoTapGt = rgby2.w > lumaMax;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(twoTapLt || twoTapGt) rgby2 = rgby1;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
return rgby2; }
|
||||
/*==========================================================================*/
|
||||
|
||||
|
||||
|
||||
/*============================================================================
|
||||
|
||||
FXAA3 QUALITY - PC
|
||||
|
||||
============================================================================*/
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float4 FxaaPixelShader_Quality(
|
||||
// {xy} = center of pixel
|
||||
float2 pos,
|
||||
// {xyzw} = not used on FXAA3 Quality
|
||||
float4 posPos,
|
||||
// {rgb_} = color in linear or perceptual color space
|
||||
// {___a} = luma in perceptual color space (not linear)
|
||||
FxaaTex tex,
|
||||
// This must be from a constant/uniform.
|
||||
// {x_} = 1.0/screenWidthInPixels
|
||||
// {_y} = 1.0/screenHeightInPixels
|
||||
float2 rcpFrame,
|
||||
// {xyzw} = not used on FXAA3 Quality
|
||||
float4 rcpFrameOpt
|
||||
) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float2 posM;
|
||||
posM.x = pos.x;
|
||||
posM.y = pos.y;
|
||||
#if (FXAA_GATHER4_ALPHA == 1)
|
||||
#if (FXAA_DISCARD == 0)
|
||||
float4 rgbyM = FxaaTexTop(tex, posM);
|
||||
#define lumaM rgbyM.w
|
||||
#endif
|
||||
float4 luma4A = FxaaTexAlpha4(tex, posM, rcpFrame.xy);
|
||||
float4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1), rcpFrame.xy);
|
||||
#if (FXAA_DISCARD == 1)
|
||||
#define lumaM luma4A.w
|
||||
#endif
|
||||
#define lumaE luma4A.z
|
||||
#define lumaS luma4A.x
|
||||
#define lumaSE luma4A.y
|
||||
#define lumaNW luma4B.w
|
||||
#define lumaN luma4B.z
|
||||
#define lumaW luma4B.x
|
||||
#else
|
||||
float4 rgbyM = FxaaTexTop(tex, posM);
|
||||
#define lumaM rgbyM.w
|
||||
float lumaS = FxaaTexOff(tex, posM, FxaaInt2( 0, 1), rcpFrame.xy).w;
|
||||
float lumaE = FxaaTexOff(tex, posM, FxaaInt2( 1, 0), rcpFrame.xy).w;
|
||||
float lumaN = FxaaTexOff(tex, posM, FxaaInt2( 0,-1), rcpFrame.xy).w;
|
||||
float lumaW = FxaaTexOff(tex, posM, FxaaInt2(-1, 0), rcpFrame.xy).w;
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float maxSM = max(lumaS, lumaM);
|
||||
float minSM = min(lumaS, lumaM);
|
||||
float maxESM = max(lumaE, maxSM);
|
||||
float minESM = min(lumaE, minSM);
|
||||
float maxWN = max(lumaN, lumaW);
|
||||
float minWN = min(lumaN, lumaW);
|
||||
float rangeMax = max(maxWN, maxESM);
|
||||
float rangeMin = min(minWN, minESM);
|
||||
float rangeMaxScaled = rangeMax * FXAA_QUALITY__EDGE_THRESHOLD;
|
||||
float range = rangeMax - rangeMin;
|
||||
float rangeMaxClamped = max(FXAA_QUALITY__EDGE_THRESHOLD_MIN, rangeMaxScaled);
|
||||
bool earlyExit = range < rangeMaxClamped;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(earlyExit)
|
||||
#if (FXAA_DISCARD == 1)
|
||||
FxaaDiscard;
|
||||
#else
|
||||
return rgbyM;
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
#if (FXAA_GATHER4_ALPHA == 0)
|
||||
float lumaNW = FxaaTexOff(tex, posM, FxaaInt2(-1,-1), rcpFrame.xy).w;
|
||||
float lumaSE = FxaaTexOff(tex, posM, FxaaInt2( 1, 1), rcpFrame.xy).w;
|
||||
float lumaNE = FxaaTexOff(tex, posM, FxaaInt2( 1,-1), rcpFrame.xy).w;
|
||||
float lumaSW = FxaaTexOff(tex, posM, FxaaInt2(-1, 1), rcpFrame.xy).w;
|
||||
#else
|
||||
float lumaNE = FxaaTexOff(tex, posM, FxaaInt2(1, -1), rcpFrame.xy).w;
|
||||
float lumaSW = FxaaTexOff(tex, posM, FxaaInt2(-1, 1), rcpFrame.xy).w;
|
||||
#endif
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float lumaNS = lumaN + lumaS;
|
||||
float lumaWE = lumaW + lumaE;
|
||||
float subpixRcpRange = 1.0/range;
|
||||
float subpixNSWE = lumaNS + lumaWE;
|
||||
float edgeHorz1 = (-2.0 * lumaM) + lumaNS;
|
||||
float edgeVert1 = (-2.0 * lumaM) + lumaWE;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float lumaNESE = lumaNE + lumaSE;
|
||||
float lumaNWNE = lumaNW + lumaNE;
|
||||
float edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
|
||||
float edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float lumaNWSW = lumaNW + lumaSW;
|
||||
float lumaSWSE = lumaSW + lumaSE;
|
||||
float edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
|
||||
float edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
|
||||
float edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
|
||||
float edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
|
||||
float edgeHorz = abs(edgeHorz3) + edgeHorz4;
|
||||
float edgeVert = abs(edgeVert3) + edgeVert4;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float subpixNWSWNESE = lumaNWSW + lumaNESE;
|
||||
float lengthSign = rcpFrame.x;
|
||||
bool horzSpan = edgeHorz >= edgeVert;
|
||||
float subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!horzSpan) lumaN = lumaW;
|
||||
if(!horzSpan) lumaS = lumaE;
|
||||
if(horzSpan) lengthSign = rcpFrame.y;
|
||||
float subpixB = (subpixA * (1.0/12.0)) - lumaM;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float gradientN = lumaN - lumaM;
|
||||
float gradientS = lumaS - lumaM;
|
||||
float lumaNN = lumaN + lumaM;
|
||||
float lumaSS = lumaS + lumaM;
|
||||
bool pairN = abs(gradientN) >= abs(gradientS);
|
||||
float gradient = max(abs(gradientN), abs(gradientS));
|
||||
if(pairN) lengthSign = -lengthSign;
|
||||
float subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float2 posB;
|
||||
posB.x = posM.x;
|
||||
posB.y = posM.y;
|
||||
float2 offNP;
|
||||
offNP.x = (!horzSpan) ? 0.0 : rcpFrame.x;
|
||||
offNP.y = ( horzSpan) ? 0.0 : rcpFrame.y;
|
||||
if(!horzSpan) posB.x += lengthSign * 0.5;
|
||||
if( horzSpan) posB.y += lengthSign * 0.5;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float2 posN;
|
||||
posN.x = posB.x - offNP.x;
|
||||
posN.y = posB.y - offNP.y;
|
||||
float2 posP;
|
||||
posP.x = posB.x + offNP.x;
|
||||
posP.y = posB.y + offNP.y;
|
||||
float subpixD = ((-2.0)*subpixC) + 3.0;
|
||||
float lumaEndN = FxaaTexTop(tex, posN).w;
|
||||
float subpixE = subpixC * subpixC;
|
||||
float lumaEndP = FxaaTexTop(tex, posP).w;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!pairN) lumaNN = lumaSS;
|
||||
float gradientScaled = gradient * 1.0/4.0;
|
||||
float lumaMM = lumaM - lumaNN * 0.5;
|
||||
float subpixF = subpixD * subpixE;
|
||||
bool lumaMLTZero = lumaMM < 0.0;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
lumaEndN -= lumaNN * 0.5;
|
||||
lumaEndP -= lumaNN * 0.5;
|
||||
bool doneN = abs(lumaEndN) >= gradientScaled;
|
||||
bool doneP = abs(lumaEndP) >= gradientScaled;
|
||||
if(!doneN) posN.x -= offNP.x * 1.5;
|
||||
if(!doneN) posN.y -= offNP.y * 1.5;
|
||||
bool doneNP = (!doneN) || (!doneP);
|
||||
if(!doneP) posP.x += offNP.x * 1.5;
|
||||
if(!doneP) posP.y += offNP.y * 1.5;
|
||||
if(doneNP) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!doneN) lumaEndN = FxaaTexTop(tex, posN.xy).w;
|
||||
if(!doneP) lumaEndP = FxaaTexTop(tex, posP.xy).w;
|
||||
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
|
||||
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
|
||||
doneN = abs(lumaEndN) >= gradientScaled;
|
||||
doneP = abs(lumaEndP) >= gradientScaled;
|
||||
if(!doneN) posN.x -= offNP.x * 2.0;
|
||||
if(!doneN) posN.y -= offNP.y * 2.0;
|
||||
doneNP = (!doneN) || (!doneP);
|
||||
if(!doneP) posP.x += offNP.x * 2.0;
|
||||
if(!doneP) posP.y += offNP.y * 2.0;
|
||||
if(doneNP) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!doneN) lumaEndN = FxaaTexTop(tex, posN.xy).w;
|
||||
if(!doneP) lumaEndP = FxaaTexTop(tex, posP.xy).w;
|
||||
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
|
||||
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
|
||||
doneN = abs(lumaEndN) >= gradientScaled;
|
||||
doneP = abs(lumaEndP) >= gradientScaled;
|
||||
if(!doneN) posN.x -= offNP.x * 2.0;
|
||||
if(!doneN) posN.y -= offNP.y * 2.0;
|
||||
doneNP = (!doneN) || (!doneP);
|
||||
if(!doneP) posP.x += offNP.x * 2.0;
|
||||
if(!doneP) posP.y += offNP.y * 2.0;
|
||||
if(doneNP) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!doneN) lumaEndN = FxaaTexTop(tex, posN.xy).w;
|
||||
if(!doneP) lumaEndP = FxaaTexTop(tex, posP.xy).w;
|
||||
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
|
||||
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
|
||||
doneN = abs(lumaEndN) >= gradientScaled;
|
||||
doneP = abs(lumaEndP) >= gradientScaled;
|
||||
if(!doneN) posN.x -= offNP.x * 4.0;
|
||||
if(!doneN) posN.y -= offNP.y * 4.0;
|
||||
doneNP = (!doneN) || (!doneP);
|
||||
if(!doneP) posP.x += offNP.x * 4.0;
|
||||
if(!doneP) posP.y += offNP.y * 4.0;
|
||||
if(doneNP) {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
if(!doneN) lumaEndN = FxaaTexTop(tex, posN.xy).w;
|
||||
if(!doneP) lumaEndP = FxaaTexTop(tex, posP.xy).w;
|
||||
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
|
||||
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
|
||||
doneN = abs(lumaEndN) >= gradientScaled;
|
||||
doneP = abs(lumaEndP) >= gradientScaled;
|
||||
if(!doneN) posN.x -= offNP.x * 2.0;
|
||||
if(!doneN) posN.y -= offNP.y * 2.0;
|
||||
if(!doneP) posP.x += offNP.x * 2.0;
|
||||
if(!doneP) posP.y += offNP.y * 2.0; } } } }
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float dstN = posM.x - posN.x;
|
||||
float dstP = posP.x - posM.x;
|
||||
if(!horzSpan) dstN = posM.y - posN.y;
|
||||
if(!horzSpan) dstP = posP.y - posM.y;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
bool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
|
||||
float spanLength = (dstP + dstN);
|
||||
bool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
|
||||
float spanLengthRcp = 1.0/spanLength;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
bool directionN = dstN < dstP;
|
||||
float dst = min(dstN, dstP);
|
||||
bool goodSpan = directionN ? goodSpanN : goodSpanP;
|
||||
float subpixG = subpixF * subpixF;
|
||||
float pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
|
||||
float subpixH = subpixG * FXAA_QUALITY__SUBPIX;
|
||||
/*--------------------------------------------------------------------------*/
|
||||
float pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
|
||||
float pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
|
||||
if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
|
||||
if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
|
||||
return FxaaTexTop(tex, posM); }
|
||||
/*==========================================================================*/
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 153f3434096c104428d40ed8e24d894f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 609246365c34e4b44ba5bfa336a923e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3e0ba00cc5171584595b26203e997713
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ed0c8a0e13a241f47b0b8932f43ecc2d
|
||||
folderAsset: yes
|
||||
timeCreated: 1453072809
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,63 @@
|
|||
Shader "Custom/Dither"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
||||
_Glossiness ("Smoothness", Range(0,1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0,1)) = 0.0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
// Physically based Standard lighting model, and enable shadows on all light types
|
||||
#pragma surface surf Standard fullforwardshadows addshadow vertex:vert
|
||||
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||||
|
||||
// Use shader model 3.0 target, to get nicer looking lighting
|
||||
// Commented out since that's causing artifacts in Forward and Legacy Deferred (Light Prepass) rendering paths (only in builds)
|
||||
//#pragma target 3.0
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv_MainTex;
|
||||
float4 screenPos;
|
||||
UNITY_DITHER_CROSSFADE_COORDS
|
||||
};
|
||||
|
||||
half _Glossiness;
|
||||
half _Metallic;
|
||||
fixed4 _Color;
|
||||
|
||||
void vert(inout appdata_full v, out Input o)
|
||||
{
|
||||
UNITY_INITIALIZE_OUTPUT(Input, o);
|
||||
#ifdef LOD_FADE_CROSSFADE
|
||||
UNITY_TRANSFER_DITHER_CROSSFADE(o, v.vertex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void surf(Input IN, inout SurfaceOutputStandard o)
|
||||
{
|
||||
#ifdef LOD_FADE_CROSSFADE
|
||||
UNITY_APPLY_DITHER_CROSSFADE(IN);
|
||||
#endif
|
||||
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
|
||||
// Metallic and smoothness come from slider variables
|
||||
o.Metallic = _Metallic;
|
||||
o.Smoothness = _Glossiness;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3d65b49ab5fa38547a2f4ace08094f12
|
||||
timeCreated: 1452997556
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3f8f2efceec25984d9e3087d42b61407
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8271573ec81c0b4191fddcd5a4eb738
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,86 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public interface IHighlightingTarget
|
||||
{
|
||||
void OnHighlightingFire1Down();
|
||||
void OnHighlightingFire1Held();
|
||||
void OnHighlightingFire1Up();
|
||||
|
||||
void OnHighlightingFire2Down();
|
||||
void OnHighlightingFire2Held();
|
||||
void OnHighlightingFire2Up();
|
||||
|
||||
void OnHighlightingMouseOver();
|
||||
}
|
||||
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public class CameraTargeting : MonoBehaviour
|
||||
{
|
||||
// Which layers targeting ray must hit (-1 = everything)
|
||||
public LayerMask targetingLayerMask = -1;
|
||||
|
||||
// Targeting ray length
|
||||
private float targetingRayLength = Mathf.Infinity;
|
||||
|
||||
// Camera component reference
|
||||
private Camera cam;
|
||||
|
||||
// Button names (for Input Manager)
|
||||
static private readonly string buttonFire1 = "Fire1";
|
||||
static private readonly string buttonFire2 = "Fire2";
|
||||
|
||||
//
|
||||
void Awake()
|
||||
{
|
||||
cam = GetComponent<Camera>();
|
||||
}
|
||||
|
||||
//
|
||||
void Update()
|
||||
{
|
||||
TargetingRaycast();
|
||||
}
|
||||
|
||||
//
|
||||
public void TargetingRaycast()
|
||||
{
|
||||
// Current target object transform component
|
||||
Transform targetTransform = null;
|
||||
|
||||
// If camera component is available
|
||||
if (cam != null)
|
||||
{
|
||||
RaycastHit hitInfo;
|
||||
|
||||
// Create a ray from mouse coords
|
||||
Ray ray = cam.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
// Targeting raycast
|
||||
if (Physics.Raycast(ray, out hitInfo, targetingRayLength, targetingLayerMask.value))
|
||||
{
|
||||
// Cache what we've hit
|
||||
targetTransform = hitInfo.collider.transform;
|
||||
}
|
||||
}
|
||||
|
||||
// If we've hit an object during raycast
|
||||
if (targetTransform != null)
|
||||
{
|
||||
// And this object has component, which implements IHighlightingTarget interface
|
||||
IHighlightingTarget ht = targetTransform.GetComponentInParent<IHighlightingTarget>();
|
||||
if (ht != null)
|
||||
{
|
||||
if (Input.GetButtonDown(buttonFire1)) { ht.OnHighlightingFire1Down(); }
|
||||
else if (Input.GetButton(buttonFire1)) { ht.OnHighlightingFire1Held(); }
|
||||
else if (Input.GetButtonUp(buttonFire1)) { ht.OnHighlightingFire1Up(); }
|
||||
|
||||
if (Input.GetButtonDown(buttonFire2)) { ht.OnHighlightingFire2Down(); }
|
||||
else if (Input.GetButton(buttonFire2)) { ht.OnHighlightingFire2Held(); }
|
||||
else if (Input.GetButtonUp(buttonFire2)) { ht.OnHighlightingFire2Up(); }
|
||||
|
||||
ht.OnHighlightingMouseOver();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f3abd6366bed4634d8ad951c4eda5116
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,46 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HighlightingSystem;
|
||||
|
||||
public class HighlighterBase : MonoBehaviour
|
||||
{
|
||||
public bool seeThrough = true;
|
||||
|
||||
protected Highlighter h;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected virtual void Awake()
|
||||
{
|
||||
h = GetComponent<Highlighter>();
|
||||
if (h == null) { h = gameObject.AddComponent<Highlighter>(); }
|
||||
}
|
||||
|
||||
//
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
h.seeThrough = seeThrough;
|
||||
}
|
||||
|
||||
//
|
||||
protected virtual void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
protected virtual void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
protected virtual void OnValidate()
|
||||
{
|
||||
if (h != null)
|
||||
{
|
||||
h.seeThrough = seeThrough;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0f478c1c78fc8544b886964c435c5218
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,26 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class HighlighterConstant : HighlighterInteractive
|
||||
{
|
||||
public Color color = Color.cyan;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
h.ConstantOnImmediate(color);
|
||||
}
|
||||
|
||||
//
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
if (h != null)
|
||||
{
|
||||
h.ConstantOnImmediate(color);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0bce1215c33564a4496aa3a6f7afe74e
|
||||
timeCreated: 1435688333
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,46 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class HighlighterFlashing : HighlighterInteractive
|
||||
{
|
||||
public Color flashingStartColor = Color.blue;
|
||||
public Color flashingEndColor = Color.cyan;
|
||||
public float flashingDelay = 2.5f;
|
||||
public float flashingFrequency = 2f;
|
||||
|
||||
private Coroutine coroutine;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
coroutine = StartCoroutine(DelayFlashing());
|
||||
|
||||
//h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
// Update flashing parameters only if highlighter was initialized (in Awake) and coroutine is already fired (after delay)
|
||||
if (h != null && coroutine == null)
|
||||
{
|
||||
h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//
|
||||
protected IEnumerator DelayFlashing()
|
||||
{
|
||||
yield return new WaitForSeconds(flashingDelay);
|
||||
|
||||
coroutine = null;
|
||||
|
||||
// Start object flashing after delay
|
||||
h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 450eda0022f0cf741ad1eedb5c4c70ff
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,46 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class HighlighterFlashing_ : HighlighterInteractive
|
||||
{
|
||||
public Color flashingStartColor = Color.blue;
|
||||
public Color flashingEndColor = Color.cyan;
|
||||
public float flashingDelay = 2.5f;
|
||||
public float flashingFrequency = 2f;
|
||||
|
||||
private Coroutine coroutine;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
coroutine = StartCoroutine(DelayFlashing());
|
||||
|
||||
h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
// Update flashing parameters only if highlighter was initialized (in Awake) and coroutine is already fired (after delay)
|
||||
if (h != null && coroutine == null)
|
||||
{
|
||||
h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//
|
||||
protected IEnumerator DelayFlashing()
|
||||
{
|
||||
yield return new WaitForSeconds(flashingDelay);
|
||||
|
||||
coroutine = null;
|
||||
|
||||
// Start object flashing after delay
|
||||
h.FlashingOn(flashingStartColor, flashingEndColor, flashingFrequency);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8ef0854df74b852438984df4237d9b4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,50 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HighlightingSystem;
|
||||
|
||||
public class HighlighterInteractive : HighlighterBase, IHighlightingTarget
|
||||
{
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// Fade in/out constant highlighting with button '1'
|
||||
if (Input.GetKeyDown(KeyCode.Alpha1)) { h.ConstantSwitch(); }
|
||||
|
||||
// Turn on/off constant highlighting with button '2'
|
||||
else if (Input.GetKeyDown(KeyCode.Alpha2)) { h.ConstantSwitchImmediate(); }
|
||||
|
||||
// Turn off all highlighting modes with button '3'
|
||||
if (Input.GetKeyDown(KeyCode.Alpha3)) { h.Off(); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IHighlightingTarget implementation
|
||||
//
|
||||
public virtual void OnHighlightingFire1Down()
|
||||
{
|
||||
// Switch flashing
|
||||
h.FlashingSwitch();
|
||||
}
|
||||
public virtual void OnHighlightingFire1Held() { }
|
||||
public virtual void OnHighlightingFire1Up() { }
|
||||
|
||||
//
|
||||
public virtual void OnHighlightingFire2Down() { }
|
||||
public virtual void OnHighlightingFire2Held() { }
|
||||
public virtual void OnHighlightingFire2Up()
|
||||
{
|
||||
// Switch seeThrough mode
|
||||
h.seeThrough = !h.seeThrough;
|
||||
}
|
||||
|
||||
//
|
||||
public virtual void OnHighlightingMouseOver()
|
||||
{
|
||||
// Highlight object for one frame
|
||||
h.On(Color.red);
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 97c91000ccf2e104f966f96bd63c513f
|
||||
timeCreated: 1449323982
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,83 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HighlightingSystem;
|
||||
|
||||
// Use with HighlighterRevealer component
|
||||
[DisallowMultipleComponent]
|
||||
public class HighlighterItem : MonoBehaviour, IHighlightingTarget
|
||||
{
|
||||
public bool seeThrough = true;
|
||||
public Color revealColor = new Color(0f, 1f, 1f, 1f);
|
||||
|
||||
private Highlighter h;
|
||||
private int revealCount = 0;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
void Awake()
|
||||
{
|
||||
h = GetComponent<Highlighter>();
|
||||
if (h == null) { h = gameObject.AddComponent<Highlighter>(); }
|
||||
}
|
||||
|
||||
//
|
||||
void OnEnable()
|
||||
{
|
||||
h.seeThrough = seeThrough;
|
||||
}
|
||||
|
||||
//
|
||||
void OnValidate()
|
||||
{
|
||||
if (h != null)
|
||||
{
|
||||
h.seeThrough = seeThrough;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
//
|
||||
public void Reveal()
|
||||
{
|
||||
revealCount++;
|
||||
UpdateInternal();
|
||||
}
|
||||
|
||||
//
|
||||
public void Hide()
|
||||
{
|
||||
revealCount = Mathf.Max(0, revealCount-1);
|
||||
UpdateInternal();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
//
|
||||
private void UpdateInternal()
|
||||
{
|
||||
if (revealCount > 0)
|
||||
{
|
||||
h.ConstantOn(revealColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
h.ConstantOff();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IHighlightingTarget implementation
|
||||
public void OnHighlightingFire1Down() { }
|
||||
public void OnHighlightingFire1Held() { }
|
||||
public void OnHighlightingFire1Up() { }
|
||||
public void OnHighlightingFire2Down() { }
|
||||
public void OnHighlightingFire2Held() { }
|
||||
public void OnHighlightingFire2Up() { }
|
||||
|
||||
public void OnHighlightingMouseOver()
|
||||
{
|
||||
h.On(Color.red);
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 36c757a06089f54449a15b663b6161e7
|
||||
timeCreated: 1450290407
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,15 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HighlightingSystem;
|
||||
|
||||
public class HighlighterOccluder : HighlighterBase
|
||||
{
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
h.occluder = true;
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 956fa3e6ed2d84da48cccbdf5f5461d6
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,92 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// Revealer for GameObjects with HighlighterItem components
|
||||
[DisallowMultipleComponent]
|
||||
public class HighlighterRevealer : MonoBehaviour
|
||||
{
|
||||
public float radius = 2f;
|
||||
public LayerMask layerMask = -1;
|
||||
|
||||
private HashSet<HighlighterItem> items = new HashSet<HighlighterItem>();
|
||||
private Transform tr;
|
||||
|
||||
#region Radius Visualization
|
||||
public Mesh sphereMesh;
|
||||
public Material sphereMaterial;
|
||||
|
||||
//
|
||||
void Update()
|
||||
{
|
||||
if (sphereMesh != null && sphereMaterial != null)
|
||||
{
|
||||
float s = radius * 2f;
|
||||
Matrix4x4 m = Matrix4x4.TRS(tr.position, Quaternion.identity, new Vector3(s, s, s));
|
||||
Graphics.DrawMesh(sphereMesh, m, sphereMaterial, 0);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
void Awake()
|
||||
{
|
||||
tr = GetComponent<Transform>();
|
||||
}
|
||||
|
||||
// After all movement finishes
|
||||
void LateUpdate()
|
||||
{
|
||||
Clear();
|
||||
|
||||
// Collect HighlightableItem components in radius and reveal them
|
||||
Collider[] colliders = Physics.OverlapSphere(tr.position, radius, layerMask);
|
||||
for (int i = 0, l = colliders.Length; i < l; i++)
|
||||
{
|
||||
HighlighterItem hi = colliders[i].GetComponentInParent<HighlighterItem>();
|
||||
if (hi != null && !items.Contains(hi))
|
||||
{
|
||||
hi.Reveal();
|
||||
items.Add(hi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
void OnDisable()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
//
|
||||
void OnValidate()
|
||||
{
|
||||
if (radius < 0.0001f) { radius = 0.0001f; }
|
||||
}
|
||||
|
||||
//
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.DrawWireSphere(transform.position, radius);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
//
|
||||
private void Clear()
|
||||
{
|
||||
var e = items.GetEnumerator();
|
||||
while (e.MoveNext())
|
||||
{
|
||||
HighlighterItem hi = e.Current;
|
||||
hi.Hide();
|
||||
}
|
||||
items.Clear();
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cd9fbd551a8f74749a3b047998b9300e
|
||||
timeCreated: 1450290156
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,29 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class HighlighterSpectrum : HighlighterInteractive
|
||||
{
|
||||
public bool random = true;
|
||||
public float velocity = 0.13f;
|
||||
|
||||
private float t;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
t = random ? Random.value : 0f;
|
||||
}
|
||||
|
||||
//
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
h.ConstantOnImmediate(ColorTool.GetColor(t));
|
||||
t += Time.deltaTime * velocity;
|
||||
t %= 1f;
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6f5fd9f4d6dfd8948960b397bf9d0de5
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,56 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HighlightingSystem;
|
||||
|
||||
public class HighlighterToggle : HighlighterInteractive
|
||||
{
|
||||
public float delayMin = 1f;
|
||||
public float delayMax = 1f;
|
||||
|
||||
private bool state = false;
|
||||
|
||||
#region MonoBehaviour
|
||||
//
|
||||
protected override void Start()
|
||||
{
|
||||
Toggle();
|
||||
StartCoroutine(ToggleRoutine());
|
||||
}
|
||||
|
||||
//
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
|
||||
if (delayMin < 0f) { delayMin = 0f; }
|
||||
if (delayMax < 0f) { delayMax = 0f; }
|
||||
if (delayMin > delayMax) { delayMin = delayMax; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
//
|
||||
IEnumerator ToggleRoutine()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(Random.Range(delayMin, delayMax));
|
||||
Toggle();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
void Toggle()
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
h.ConstantOffImmediate();
|
||||
state = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Color color = ColorTool.GetColor(Random.value);
|
||||
h.ConstantOnImmediate(color);
|
||||
state = true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 881288e9eff37e8459b9462cb974a97d
|
||||
timeCreated: 1442150344
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f9d328b9dde41ad4185066a032734298
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
static public class ColorTool
|
||||
{
|
||||
private const int period = 1530;
|
||||
static private readonly int[] colorComponentOffsets = new int[] { 1020, 0, 510 };
|
||||
static private float[] colorComponents = new float[3];
|
||||
static private Color colorResult = new Color(0f, 0f, 0f, 1f);
|
||||
|
||||
//
|
||||
static public Color GetColor(float hue)
|
||||
{
|
||||
hue = Mathf.Clamp01(hue);
|
||||
|
||||
int hi = Mathf.CeilToInt(hue * period);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int x = (hi - colorComponentOffsets[i]) % period;
|
||||
int o = 0;
|
||||
|
||||
if (x < 0) { x += period; }
|
||||
|
||||
if (x < 255) { o = x; }
|
||||
if (x >= 255 && x < 765) { o = 255; }
|
||||
if (x >= 765 && x < 1020) { o = 1020 - x; }
|
||||
|
||||
colorComponents[i] = o / 255f;
|
||||
}
|
||||
colorResult.r = colorComponents[0];
|
||||
colorResult.g = colorComponents[1];
|
||||
colorResult.b = colorComponents[2];
|
||||
return colorResult;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6b72dfaf8574ed4459292d5e98d3b2b1
|
||||
timeCreated: 1442138172
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 804be0d966378a842910e51bdc37a894
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8604c4eb333845c996abbb5eca2f286
|
||||
folderAsset: yes
|
||||
timeCreated: 1546940719
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,449 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028334, g: 0.2257134, b: 0.30692226, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 9
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &949054843
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 949054845}
|
||||
- component: {fileID: 949054844}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &949054844
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 949054843}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &949054845
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 949054843}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1143422347
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1143422348}
|
||||
- component: {fileID: 1143422351}
|
||||
- component: {fileID: 1143422350}
|
||||
- component: {fileID: 1143422349}
|
||||
m_Layer: 0
|
||||
m_Name: Plane2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1143422348
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143422347}
|
||||
m_LocalRotation: {x: -0.0000020376824, y: 0.7071058, z: -0.7071078, w: 0.0000021509359}
|
||||
m_LocalPosition: {x: 3.14, y: 0, z: 9.51}
|
||||
m_LocalScale: {x: 0.66, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1484531324}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: -180.00002}
|
||||
--- !u!23 &1143422349
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143422347}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 55154b05b65d448f689b5563e7562ec7, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!64 &1143422350
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143422347}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Convex: 0
|
||||
m_InflateMesh: 0
|
||||
m_SkinWidth: 0.01
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!33 &1143422351
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143422347}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1396698318
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1396698319}
|
||||
- component: {fileID: 1396698322}
|
||||
- component: {fileID: 1396698321}
|
||||
- component: {fileID: 1396698320}
|
||||
m_Layer: 0
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1396698319
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1396698318}
|
||||
m_LocalRotation: {x: -0.0000020376824, y: 0.7071058, z: -0.7071078, w: 0.0000021509359}
|
||||
m_LocalPosition: {x: -3.27, y: 0, z: 9.51}
|
||||
m_LocalScale: {x: 0.62, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1484531324}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: -180.00002}
|
||||
--- !u!23 &1396698320
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1396698318}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a34b9f559222a45a1b74ae96d7ee81a4, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!64 &1396698321
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1396698318}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Convex: 0
|
||||
m_InflateMesh: 0
|
||||
m_SkinWidth: 0.01
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!33 &1396698322
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1396698318}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1484531320
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1484531324}
|
||||
- component: {fileID: 1484531323}
|
||||
- component: {fileID: 1484531322}
|
||||
- component: {fileID: 1484531321}
|
||||
- component: {fileID: 1484531325}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1484531321
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484531320}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &1484531322
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484531320}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1484531323
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484531320}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1484531324
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484531320}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1396698319}
|
||||
- {fileID: 1143422348}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1484531325
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484531320}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 38fa8b9aa481f4b499be7c33ac6bef15, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
type: 0
|
||||
threshold: 0.5
|
||||
typeColorValue: {r: 0.76, g: 0.247, b: 0.509, a: 1}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e568b3fdbf69a41758832acd528d34e3
|
||||
timeCreated: 1548209747
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,76 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: DemoMat
|
||||
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _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: 2800000, guid: 1e5061a1cbdd0454ba2057073e617e98, type: 3}
|
||||
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}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a34b9f559222a45a1b74ae96d7ee81a4
|
||||
timeCreated: 1547019526
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,76 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: DemoMat2
|
||||
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _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: 2800000, guid: 2191fef8a170e4bc6bf5c6701352ab2b, type: 3}
|
||||
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}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 55154b05b65d448f689b5563e7562ec7
|
||||
timeCreated: 1547019526
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 6.5 MiB |
|
@ -0,0 +1,94 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1e5061a1cbdd0454ba2057073e617e98
|
||||
timeCreated: 1547022525
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 7.0 MiB |
|
@ -0,0 +1,94 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2191fef8a170e4bc6bf5c6701352ab2b
|
||||
timeCreated: 1548210470
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d6e93ce8edf244f968ed4082e70ea3c6
|
||||
folderAsset: yes
|
||||
timeCreated: 1548210658
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,31 @@
|
|||
Thermal Night Vision ImageEffect
|
||||
|
||||
=== Intro ===
|
||||
|
||||
This Image Effect is used for simulate Thermal Night Vision.
|
||||
|
||||
=== About Demo ===
|
||||
|
||||
The demo show you the minimal requirement of a scene.
|
||||
|
||||
1. Open demo scene.(Asseta/Thermal Night Vision ImageEffect/Demo/Demo.unity).
|
||||
|
||||
2. Select Main Camera. You will see Image Effect Script in the Inspector.
|
||||
|
||||
3. Play the demo scene. You will get a fullscreen image effect.
|
||||
|
||||
=== How to use ===
|
||||
|
||||
1. Add the Image Effect Script to your Main Camera.
|
||||
|
||||
2. Play scene, you will see the fullscreen image effect.
|
||||
|
||||
3. There are some custom variable that you can set as your like to get different effects.
|
||||
|
||||
=== Customize by yourself ===
|
||||
|
||||
The core shader is ThermalNightVisionImageEffect.shader, this is vertex/fragment shader. You can open and modify it.
|
||||
|
||||
=== Compatiability ===
|
||||
|
||||
We have test this on PC, MAC, IOS and Android. Each platform works well and get good performance.
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1d87123e3e983b1499030d40b8ff9be2
|
||||
timeCreated: 1531449967
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27eefd86ec1ee4d86a857e5d93d5e473
|
||||
folderAsset: yes
|
||||
timeCreated: 1548210595
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,89 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ThermalNightVisionImageEffect : MonoBehaviour
|
||||
{
|
||||
public enum TYPE
|
||||
{
|
||||
LUMINANCE,
|
||||
COLOR
|
||||
}
|
||||
|
||||
public TYPE type = TYPE.LUMINANCE;
|
||||
|
||||
[Range(0,1)]
|
||||
public float threshold = 0.5f;
|
||||
|
||||
[Range(0, 10)]
|
||||
public float hotIntensity = 2;
|
||||
|
||||
[Range(0, 10)]
|
||||
public float coldIntensity = 2;
|
||||
|
||||
public Color coldColor = new Color(0, 0, 1);
|
||||
|
||||
public Color midColor = new Color(1, 1, 0);
|
||||
|
||||
public Color hotColor = new Color(1, 0, 0);
|
||||
|
||||
[Tooltip("Only available when type is COLOR")]
|
||||
public Color typeColorValue = new Color(0.760f, 0.247f, 0.509f);
|
||||
|
||||
private Shader shader = null;
|
||||
|
||||
private Material mtrl = null;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
shader = Shader.Find("Hidden/ThermalNightVisionImageEffect");
|
||||
if (!shader.isSupported)
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
mtrl = new Material(shader);
|
||||
}
|
||||
|
||||
private void OnRenderImage(RenderTexture src, RenderTexture dest)
|
||||
{
|
||||
if (mtrl == null || mtrl.shader == null || !mtrl.shader.isSupported)
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
mtrl.SetFloat("_Threshold", threshold);
|
||||
mtrl.SetColor("_TypeColorValue", typeColorValue);
|
||||
mtrl.SetFloat("_HotIntensity", hotIntensity);
|
||||
mtrl.SetFloat("_ColdIntensity", coldIntensity);
|
||||
mtrl.SetColor("_ColdColor", coldColor);
|
||||
mtrl.SetColor("_MidColor", midColor);
|
||||
mtrl.SetColor("_HotColor", hotColor);
|
||||
|
||||
if(type == TYPE.LUMINANCE)
|
||||
{
|
||||
mtrl.DisableKeyword("TYPE_COLOR");
|
||||
mtrl.EnableKeyword("TYPE_LUMINANCE");
|
||||
}
|
||||
else if(type == TYPE.COLOR)
|
||||
{
|
||||
mtrl.EnableKeyword("TYPE_COLOR");
|
||||
mtrl.DisableKeyword("TYPE_LUMINANCE");
|
||||
}
|
||||
|
||||
Graphics.Blit(src, dest, mtrl, 0);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
shader = null;
|
||||
|
||||
if (mtrl != null)
|
||||
{
|
||||
DestroyImmediate(mtrl);
|
||||
mtrl = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 38fa8b9aa481f4b499be7c33ac6bef15
|
||||
timeCreated: 1531022049
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f6752f8227f68414bb941773b97c7227
|
||||
folderAsset: yes
|
||||
timeCreated: 1548210600
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1fe7ffcc1c18d4e3c9e6b6058b16ed1a
|
||||
folderAsset: yes
|
||||
timeCreated: 1548210605
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,74 @@
|
|||
Shader "Hidden/ThermalNightVisionImageEffect"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Cull Off ZWrite Off ZTest Always
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
#pragma multi_compile TYPE_LUMINANCE TYPE_COLOR
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float4 scrPos : TEXCOORD0;
|
||||
float2 uv : TEXCOORD1;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize;
|
||||
|
||||
float _Threshold;
|
||||
half4 _TypeColorValue;
|
||||
half _HotIntensity;
|
||||
half _ColdIntensity;
|
||||
half4 _ColdColor;
|
||||
half4 _MidColor;
|
||||
half4 _HotColor;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.scrPos = ComputeScreenPos(o.pos);
|
||||
o.uv = v.uv;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
float4 c = 0;
|
||||
float2 uv = i.scrPos.xy/i.scrPos.w;
|
||||
float4 mainC = tex2D(_MainTex, uv);
|
||||
float luminance = 0;
|
||||
#if defined(TYPE_LUMINANCE)
|
||||
luminance = 0.299 * mainC.r + 0.587 * mainC.g + 0.114 * mainC.b;
|
||||
#endif
|
||||
#if defined(TYPE_COLOR)
|
||||
luminance = dot(mainC.rgb, _TypeColorValue.rgb);
|
||||
#endif
|
||||
c = (luminance < _Threshold) ? lerp(_ColdColor, _MidColor, luminance * _ColdIntensity ) : lerp(_MidColor, _HotColor, (luminance - 0.5) * _HotIntensity);
|
||||
c.rgb *= 0.1 + 0.25 + 0.75 * pow( 16.0 * uv.x * uv.y * (1.0 - uv.x) * (1.0 - uv.y), 0.15 );
|
||||
return c;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f9ab27e58736b2e43a24affa4ab7d147
|
||||
timeCreated: 1530496666
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c1c2e9b0206fa60459aea2ec834ae190
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0dd951782f608fe4fb47ced693ad1745
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5fbc00114e37d2f4fa5b273ad788c9d8
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 98615ecc36aef8143a044e26b7e55f26
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 94dc890e7e40d5a48bf5efdb9ea8fe68
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3f6abcd635bbd36499b09f49edf4f2e9
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 70973479b7a741c4faf9a165026861b7
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c996f14dae71f04aae7bfe674dc6ffb
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a5b46125944da2a4094ba4a181fc45b5
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6a97d8c2d61e38545ae196feaf041939
|
||||
timeCreated: 1508969412
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 41cdcbd746f0a2646b934d8b3d5e05af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a89833769b6c18541a95f76290e996b4
|
||||
timeCreated: 1507703449
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6fcbf1b34bb295244a5d3bcd0d21c22c
|
||||
timeCreated: 1507677052
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5f88ad9b7d4c5d148938f21aa55c1cec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -0,0 +1,127 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ad06b850a0af7a244bc861b28170964a
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
|
@ -0,0 +1,127 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ae572dfffed6b3d4abfda047f5df283c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -0,0 +1,127 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f0056195d1f4a904f86875c37cf1df6e
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 82e8fae66642164438a0c7a11f796961
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue