File tree Expand file tree Collapse file tree 4 files changed +17
-19
lines changed
com.unity.shadergraph/Editor/Data/Nodes Expand file tree Collapse file tree 4 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ public NormalBlendNode()
20
20
name = "Normal Blend" ;
21
21
}
22
22
23
-
24
23
[ SerializeField ]
25
24
private NormalBlendMode m_BlendMode = NormalBlendMode . Default ;
26
25
@@ -70,11 +69,11 @@ static string Unity_NormalBlend_Reoriented(
70
69
{
71
70
Out = Vector3 . one ;
72
71
return
73
- @"
72
+ @"
74
73
{
75
- $precision3 t = A.xyz + $precision3(0.0, 0.0, 1.0);
76
- $precision3 u = B.xyz * $precision3(-1.0, -1.0, 1.0);
77
- Out = (t / t.z) * dot(t, u) - u;
74
+ $precision3 t = A.xyz + $precision3(0.0, 0.0, 1.0);
75
+ $precision3 u = B.xyz * $precision3(-1.0, -1.0, 1.0);
76
+ Out = (t / t.z) * dot(t, u) - u;
78
77
}
79
78
" ;
80
79
}
Original file line number Diff line number Diff line change 1
- using System . Reflection ;
1
+ using System . Reflection ;
2
2
using UnityEngine ;
3
3
4
4
namespace UnityEditor . ShaderGraph
@@ -27,17 +27,17 @@ static string Unity_Blackbody(
27
27
{
28
28
Out = Vector3 . zero ;
29
29
return
30
- @"
30
+ @"
31
31
{
32
32
//based on data by Mitchell Charity http://www.vendian.org/mncharity/dir3/blackbody/
33
33
$precision3 color = $precision3(255.0, 255.0, 255.0);
34
34
color.x = 56100000. * pow(Temperature,(-3.0 / 2.0)) + 148.0;
35
35
color.y = 100.04 * log(Temperature) - 623.6;
36
36
if (Temperature > 6500.0) color.y = 35200000.0 * pow(Temperature,(-3.0 / 2.0)) + 184.0;
37
- color.z = 194.18 * log(Temperature) - 1448.6;
38
- color = clamp(color, 0.0, 255.0)/255.0;
37
+ color.z = 194.18 * log(Temperature) - 1448.6;
38
+ color = clamp(color, 0.0, 255.0)/255.0;
39
39
if (Temperature < 1000.0) color *= Temperature/1000.0;
40
- Out = color;
40
+ Out = color;
41
41
}
42
42
" ;
43
43
}
Original file line number Diff line number Diff line change 1
- using System . Reflection ;
1
+ using System . Reflection ;
2
2
using UnityEngine ;
3
3
4
4
namespace UnityEditor . ShaderGraph
@@ -11,7 +11,6 @@ public SphereMaskNode()
11
11
name = "Sphere Mask" ;
12
12
}
13
13
14
-
15
14
protected override MethodInfo GetFunctionToConvert ( )
16
15
{
17
16
return GetType ( ) . GetMethod ( "SphereMask" , BindingFlags . Static | BindingFlags . NonPublic ) ;
@@ -25,9 +24,9 @@ static string SphereMask(
25
24
[ Slot ( 4 , Binding . None ) ] out DynamicDimensionVector Out )
26
25
{
27
26
return
28
- @"
27
+ @"
29
28
{
30
- Out = 1 - saturate((distance(Coords, Center) - Radius) / (1 - Hardness));
29
+ Out = 1 - saturate((distance(Coords, Center) - Radius) / (1 - Hardness));
31
30
}
32
31
" ;
33
32
}
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ static string RoundedPolygon_Func(
25
25
[ Slot ( 5 , Binding . None ) ] out Vector1 Out )
26
26
{
27
27
return
28
- @"
28
+ @"
29
29
{
30
- UV = UV * 2. + $precision2(-1.,-1.);
30
+ UV = UV * 2. + $precision2(-1.,-1.);
31
31
$precision epsilon = 1e-6;
32
32
UV.x = UV.x / ( Width + (Width==0)*epsilon);
33
33
UV.y = UV.y / ( Height + (Height==0)*epsilon);
@@ -77,10 +77,10 @@ static string RoundedPolygon_Func(
77
77
Out = UV.x;
78
78
float chamferZone = ( halfAngle - polaruv.x ) < chamferAngle;
79
79
Out = lerp( UV.x, polaruv.y / distC, chamferZone );
80
- // Output this to have the shape mask instead of the distance field
81
- Out = saturate((1 - Out) / fwidth(Out));
80
+ // Output this to have the shape mask instead of the distance field
81
+ Out = saturate((1 - Out) / fwidth(Out));
82
82
}
83
83
" ;
84
84
}
85
85
}
86
- }
86
+ }
You can’t perform that action at this time.
0 commit comments