damian
7 年前
当前提交
73ca4594
共有 13 个文件被更改,包括 423 次插入 和 29 次删除
-
41MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs
-
11MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/Nodes/Vector1NodePresenter.cs
-
10MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/PropertyNodePresenter.cs
-
57MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs
-
2MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs
-
167MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
-
2MaterialGraphProject/Assets/fresnelstuff.ShaderSubGraph.meta
-
13MaterialGraphProject/ProjectSettings/DynamicsManager.asset
-
16MaterialGraphProject/ProjectSettings/Physics2DSettings.asset
-
39MaterialGraphProject/ProjectSettings/ProjectSettings.asset
-
1MaterialGraphProject/Assets/New Shader Graph.ShaderGraph
-
9MaterialGraphProject/Assets/New Shader Graph.ShaderGraph.meta
-
84MaterialGraphProject/GeneratedShader.shader
|
|||
fileFormatVersion: 2 |
|||
guid: 605d9bda370241843a5ab9cd42b7aeed |
|||
timeCreated: 1504017790 |
|||
licenseType: Pro |
|||
ScriptedImporter: |
|||
userData: |
|||
assetBundleName: |
|
|||
{"m_SerializableNodes":[],"m_SerializableEdges":[],"m_SerializedProperties":[]} |
|
|||
fileFormatVersion: 2 |
|||
guid: bc622a74b3c2c0d4db4c564bf551b9b5 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "hidden/preview/Fractal_DDEE6FBB" |
|||
{ |
|||
Properties |
|||
{ |
|||
} |
|||
CGINCLUDE |
|||
#include "UnityCG.cginc" |
|||
void Unity_Fractal_float(float2 uv, float2 pan, float zoom, float aspect, out float result) |
|||
{ |
|||
const int Iterations = 128; |
|||
float2 c = (uv - 0.5) * zoom * float2(1, aspect) - pan; |
|||
float2 v = 0; |
|||
for (int n = 0; n < Iterations && dot(v,v) < 4; n++) |
|||
{ |
|||
v = float2(v.x * v.x - v.y * v.y, v.x * v.y * 2) + c; |
|||
} |
|||
result = (dot(v, v) > 4) ? (float)n / (float)Iterations : 0; |
|||
} |
|||
struct GraphVertexInput |
|||
{ |
|||
float4 vertex : POSITION; |
|||
float3 normal : NORMAL; |
|||
float4 tangent : TANGENT; |
|||
float4 texcoord0 : TEXCOORD0; |
|||
float4 lightmapUV : TEXCOORD1; |
|||
UNITY_VERTEX_INPUT_INSTANCE_ID |
|||
}; |
|||
struct SurfaceInputs{ |
|||
half4 uv0; |
|||
}; |
|||
struct SurfaceDescription{ |
|||
float Fractal_DDEE6FBB_result; |
|||
}; |
|||
float4 Fractal_DDEE6FBB_uv; |
|||
float4 Fractal_DDEE6FBB_pan; |
|||
float Fractal_DDEE6FBB_zoom; |
|||
float Fractal_DDEE6FBB_aspect; |
|||
GraphVertexInput PopulateVertexData(GraphVertexInput v){ |
|||
return v; |
|||
} |
|||
SurfaceDescription PopulateSurfaceData(SurfaceInputs IN) { |
|||
half4 uv0 = IN.uv0; |
|||
float Fractal_DDEE6FBB_result; |
|||
Unity_Fractal_float(uv0, Fractal_DDEE6FBB_pan, Fractal_DDEE6FBB_zoom, Fractal_DDEE6FBB_aspect, Fractal_DDEE6FBB_result); |
|||
SurfaceDescription surface = (SurfaceDescription)0; |
|||
surface.Fractal_DDEE6FBB_result = Fractal_DDEE6FBB_result; |
|||
return surface; |
|||
} |
|||
ENDCG |
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" } |
|||
LOD 100 |
|||
Pass |
|||
{ |
|||
CGPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
#include "UnityCG.cginc" |
|||
struct GraphVertexOutput |
|||
{ |
|||
float4 position : POSITION; |
|||
half4 uv0 : TEXCOORD; |
|||
}; |
|||
GraphVertexOutput vert (GraphVertexInput v) |
|||
{ |
|||
v = PopulateVertexData(v); |
|||
GraphVertexOutput o; |
|||
o.position = UnityObjectToClipPos(v.vertex); |
|||
o.uv0 = v.texcoord0; |
|||
return o; |
|||
} |
|||
fixed4 frag (GraphVertexOutput IN) : SV_Target |
|||
{ |
|||
float4 uv0 = IN.uv0; |
|||
SurfaceInputs surfaceInput = (SurfaceInputs)0;; |
|||
surfaceInput.uv0 =uv0; |
|||
SurfaceDescription surf = PopulateSurfaceData(surfaceInput); |
|||
return half4(surf.Fractal_DDEE6FBB_result, surf.Fractal_DDEE6FBB_result, surf.Fractal_DDEE6FBB_result, 1.0); |
|||
} |
|||
ENDCG |
|||
} |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue