Skip to content

Commit

Permalink
Added VideoOutput.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbelot committed Jul 20, 2020
1 parent a9cff0c commit 401c978
Show file tree
Hide file tree
Showing 25 changed files with 679 additions and 41 deletions.
8 changes: 8 additions & 0 deletions Assets/Librairies/SharedTexture.meta

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

12 changes: 10 additions & 2 deletions Assets/Materials/Shader/UnlitTextCol.shader
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,20 @@
// sample the texture
float4 col = tex2D(_MainTex, i.uv) * _Color;



// compute the border color
float2 uv_ST = i.uv / _MainTex_ST.xy;
float2 normalizedBorderSize = float2(_BorderSize / _MainTex_ST.x, _BorderSize / _MainTex_ST.y);
if (uv_ST.x < normalizedBorderSize.x || uv_ST.x > 1.0f - normalizedBorderSize.x
|| uv_ST.y < normalizedBorderSize.y || uv_ST.y > 1.0f - normalizedBorderSize.y)
if (uv_ST.x < normalizedBorderSize.x || uv_ST.x > 1.0f - normalizedBorderSize.x
|| uv_ST.y < normalizedBorderSize.y || uv_ST.y > 1.0f - normalizedBorderSize.y) {
col = _BorderColor;
}
else {
//Clip transparent pixels
clip(col.a - 0.5f);
}


return col;
}
Expand Down
79 changes: 79 additions & 0 deletions Assets/Materials/VideoOutput.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: VideoOutput
m_Shader: {fileID: 4800000, guid: 89bce0d6397271c48acbd8805592535e, type: 3}
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: 0}
m_Scale: {x: 0.5, y: 0.5}
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:
- _BorderSize: 0.01
- _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:
- _BorderColor: {r: 1, g: 0, b: 0.83895683, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/Materials/VideoOutput.mat.meta

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

Loading

0 comments on commit 401c978

Please sign in to comment.