Browse Source

Fixed line drawing class using obsolete material constructor #119

master
chrisgregan 10 years ago
parent
commit
f3f60ccbff
  1. 9
      Assets/Fungus/Flowchart/Editor/GLDraw.cs
  2. 138
      Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat
  3. 8
      Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta
  4. 11
      Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader
  5. 9
      Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta

9
Assets/Fungus/Flowchart/Editor/GLDraw.cs

@ -1,4 +1,5 @@
using UnityEngine;
using UnityEngine.Assertions.Must;
using System.Collections;
using System;
@ -105,13 +106,7 @@ public class GLDraw
if (lineMaterial != null)
return;
lineMaterial = new Material("Shader \"Lines/Colored Blended\" {" +
"SubShader { Pass { " +
" Blend SrcAlpha OneMinusSrcAlpha " +
" ZWrite Off Cull Off Fog { Mode Off } " +
" BindChannels {" +
" Bind \"vertex\", vertex Bind \"color\", color }" +
"} } }");
lineMaterial = Resources.Load("GLLineDraw", typeof(Material)) as Material;
lineMaterial.hideFlags = HideFlags.HideAndDontSave;
lineMaterial.shader.hideFlags = HideFlags.HideAndDontSave;
}

138
Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat

@ -0,0 +1,138 @@
%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: GLLineDraw
m_Shader: {fileID: 4800000, guid: ef64b0d30343049d4a634192975fab73, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
data:
first:
name: _Metallic
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

8
Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.mat.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4209d966cfca44792ad45389a996015e
timeCreated: 1434115586
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

11
Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader

@ -0,0 +1,11 @@
Shader "Lines/Colored Blended" {
SubShader {
Pass {
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off Cull Off Fog { Mode Off }
BindChannels {
Bind "vertex", vertex Bind "color", color
}
}
}
}

9
Assets/Fungus/Flowchart/Editor/Resources/GLLineDraw.shader.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ef64b0d30343049d4a634192975fab73
timeCreated: 1434114816
licenseType: Free
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save