Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
kandation committed May 24, 2019
1 parent 1a29b96 commit edf3605
Show file tree
Hide file tree
Showing 660 changed files with 327,176 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
* text=auto

# Unity files
*.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff
Expand All @@ -23,7 +22,6 @@
*.terrainlayer -text merge=unityyamlmerge diff
*.mixer -text merge=unityyamlmerge diff
*.shadervariants -text merge=unityyamlmerge diff

# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
Expand All @@ -37,7 +35,6 @@
*.pict filter=lfs diff=lfs merge=lfs -text
*.dds filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text

# Audio formats
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
Expand All @@ -48,15 +45,13 @@
*.it filter=lfs diff=lfs merge=lfs -text
*.s3m filter=lfs diff=lfs merge=lfs -text
*.xm filter=lfs diff=lfs merge=lfs -text

# Video formats
*.mov filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.asf filter=lfs diff=lfs merge=lfs -text
*.mpg filter=lfs diff=lfs merge=lfs -text
*.mpeg filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text

# 3D formats
*.fbx filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
Expand All @@ -72,12 +67,10 @@
*.lwo2 filter=lfs diff=lfs merge=lfs -text
*.abc filter=lfs diff=lfs merge=lfs -text
*.3dm filter=lfs diff=lfs merge=lfs -text

# Build
*.dll filter=lfs diff=lfs merge=lfs -text
*.pdb filter=lfs diff=lfs merge=lfs -text
*.mdb filter=lfs diff=lfs merge=lfs -text

# Packaging
*.zip filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
Expand Down
8 changes: 8 additions & 0 deletions Assets/Addon.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions Assets/CameraFocusController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using UnityEngine;
using System.Collections;
using Vuforia;

public class CameraFocusController : MonoBehaviour {

public bool mVuforiaStarted = false;

void Start ()
{
VuforiaARController vuforia = VuforiaARController.Instance;

if (vuforia != null)
vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
}

private void StartAfterVuforia()
{
mVuforiaStarted = true;
SetAutofocus();
}

void OnApplicationPause(bool pause)
{
if (!pause)
{
// App resumed
if (mVuforiaStarted)
{
// App resumed and vuforia already started
// but lets start it again...
SetAutofocus(); // This is done because some android devices lose the auto focus after resume
// this was a bug in vuforia 4 and 5. I haven't checked 6, but the code is harmless anyway
}
}
}

public void SetAutofocus()
{
if (CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO))
{
Debug.Log("Autofocus set");
}
else
{
// never actually seen a device that doesn't support this, but just in case
Debug.Log("this device doesn't support auto focus");
}
}

public void SetFixedFocus()
{
if (CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_INFINITY))
{
Debug.Log("INFINITY FOCUS set");
}
else
{
// never actually seen a device that doesn't support this, but just in case
Debug.Log("this device doesn't support auto focus");
}
}

public void RestartCamera()
{
CameraDevice.Instance.Stop();
CameraDevice.Instance.Deinit();

CameraDevice.Instance.Init();
CameraDevice.Instance.Start();

VuforiaUnity.OnPause();
VuforiaUnity.OnResume();
}
}
11 changes: 11 additions & 0 deletions Assets/CameraFocusController.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Ciconia Studio.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Ciconia Studio/Shaders.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Ciconia Studio/Shaders/Double Sided Shaders.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Shader "Ciconia Studio/Double Sided/Emissive/Diffuse" {
Properties {
_Color ("Diffuse Color", Color) = (1,1,1,1)
_MainTex ("Diffuse map", 2D) = "white" {}
_EmissiveIntensity ("Emissive Intensity", Range(0, 2)) = 1
}
SubShader {
Tags {
"RenderType"="Opaque"
}
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Cull Off


CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase_fullshadows
#pragma multi_compile_fog
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu
#pragma target 3.0
uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
uniform float4 _Color;
uniform float _EmissiveIntensity;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
UNITY_FOG_COORDS(1)
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.pos = UnityObjectToClipPos( v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
////// Lighting:
////// Emissive:
float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex));
float3 emissive = ((_MainTex_var.rgb*_Color.rgb)*_EmissiveIntensity);
float3 finalColor = emissive;
fixed4 finalRGBA = fixed4(finalColor,1);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
Pass {
Name "ShadowCaster"
Tags {
"LightMode"="ShadowCaster"
}
Offset 1, 1
Cull Off

CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "Lighting.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma multi_compile_fog
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu
#pragma target 3.0
struct VertexInput {
float4 vertex : POSITION;
};
struct VertexOutput {
V2F_SHADOW_CASTER;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_SHADOW_CASTER(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
FallBack "Diffuse"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit edf3605

Please sign in to comment.