12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- Shader "NRSDK/Holo_face" {
- Properties {
- _node_5051 ("node_5051", Color) = (0.3014706,1,0.9691825,1)
- _node_2675 ("node_2675", Range(0, 10)) = 4.213583
- _node_3534 ("node_3534", Range(0, 1)) = 0.9881258
- }
- SubShader {
- Tags {
- "RenderType"="Opaque"
- }
- Pass {
- Name "FORWARD"
- Tags {
- "LightMode"="ForwardBase"
- }
-
-
- 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
- #pragma target 3.0
- uniform float4 _node_5051;
- uniform float _node_2675;
- uniform float _node_3534;
- struct VertexInput {
- float4 vertex : POSITION;
- float3 normal : NORMAL;
- };
- struct VertexOutput {
- float4 pos : SV_POSITION;
- float4 posWorld : TEXCOORD0;
- float3 normalDir : TEXCOORD1;
- UNITY_FOG_COORDS(2)
- };
- VertexOutput vert (VertexInput v) {
- VertexOutput o = (VertexOutput)0;
- o.normalDir = UnityObjectToWorldNormal(v.normal);
- o.posWorld = mul(unity_ObjectToWorld, v.vertex);
- o.pos = UnityObjectToClipPos( v.vertex );
- UNITY_TRANSFER_FOG(o,o.pos);
- return o;
- }
- float4 frag(VertexOutput i) : COLOR {
- i.normalDir = normalize(i.normalDir);
- float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
- float3 normalDirection = i.normalDir;
-
- ////// Lighting:
- float3 node_5334 = (pow(1.0-max(0,dot(i.normalDir, viewDirection)),_node_2675)*_node_5051.rgb*_node_3534);
- float3 finalColor = node_5334;
- fixed4 finalRGBA = fixed4(finalColor,1);
- UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
- return finalRGBA;
- }
- ENDCG
- }
- }
- FallBack "Diffuse"
- CustomEditor "ShaderForgeMaterialInspector"
- }
|