Skip to content

Commit f91d927

Browse files
authored
Merge pull request #8279 from Unity-Technologies/internal/6000.0/staging
Mirror Internal/6000.0/staging
2 parents 1b1ffe1 + 733e2ac commit f91d927

File tree

7 files changed

+32
-21
lines changed

7 files changed

+32
-21
lines changed

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.VirtualOffset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public override void Initialize(ProbeVolumeBakingSet bakingSet, NativeArray<Vect
109109
batchResult = new Vector3[k_MaxProbeCountPerBatch];
110110

111111
var computeBufferTarget = GraphicsBuffer.Target.CopyDestination | GraphicsBuffer.Target.CopySource
112-
| GraphicsBuffer.Target.Structured | GraphicsBuffer.Target.Raw;
112+
| GraphicsBuffer.Target.Structured;
113113

114114
// Create acceletation structure
115115
m_AccelerationStructure = BuildAccelerationStructure(voSettings.collisionMask);

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,22 @@ void RayGenExecute(UnifiedRT::DispatchInfo dispatchInfo)
8787
if (!hit.IsValid() || hit.isFrontFace)
8888
{
8989
validHits++;
90-
continue;
9190
}
92-
93-
float distanceDiff = hit.hitDistance - minDist;
94-
if (distanceDiff < DISTANCE_THRESHOLD)
91+
else if (hit.IsValid())
9592
{
96-
UnifiedRT::HitGeomAttributes attributes = UnifiedRT::FetchHitGeomAttributes(hit, UnifiedRT::kGeomAttribFaceNormal);
97-
float dotSurface = dot(ray.direction, attributes.faceNormal);
98-
99-
// If new distance is smaller by at least kDistanceThreshold, or if ray is at least DOT_THRESHOLD more colinear with normal
100-
if (distanceDiff < -DISTANCE_THRESHOLD || dotSurface - maxDotSurface > DOT_THRESHOLD)
93+
float distanceDiff = hit.hitDistance - minDist;
94+
if (distanceDiff < DISTANCE_THRESHOLD)
10195
{
102-
outDirection = ray.direction;
103-
maxDotSurface = dotSurface;
104-
minDist = hit.hitDistance;
96+
UnifiedRT::HitGeomAttributes attributes = UnifiedRT::FetchHitGeomAttributes(hit, UnifiedRT::kGeomAttribFaceNormal);
97+
float dotSurface = dot(ray.direction, attributes.faceNormal);
98+
99+
// If new distance is smaller by at least kDistanceThreshold, or if ray is at least DOT_THRESHOLD more colinear with normal
100+
if (distanceDiff < -DISTANCE_THRESHOLD || dotSurface - maxDotSurface > DOT_THRESHOLD)
101+
{
102+
outDirection = ray.direction;
103+
maxDotSurface = dotSurface;
104+
minDist = hit.hitDistance;
105+
}
105106
}
106107
}
107108
}

Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ SAMPLER(sampler_CoatMaskMap);
8585
PROP_DECL_TEX2D(_BaseColorMap);
8686
PROP_DECL_TEX2D(_MaskMap);
8787
PROP_DECL_TEX2D(_BentNormalMap);
88+
PROP_DECL_TEX2D(_BentNormalMapOS);
8889
PROP_DECL_TEX2D(_NormalMap);
8990
PROP_DECL_TEX2D(_NormalMapOS);
9091
PROP_DECL_TEX2D(_DetailMap);

Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows/ShadowCaster2D.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ internal bool IsLit(Light2D light)
274274
{
275275
// Oddly adding and subtracting vectors is expensive here because of the new structures created...
276276
Vector3 deltaPos;
277-
deltaPos.x = light.m_CachedPosition.x - boundingSphere.position.x;
278-
deltaPos.y = light.m_CachedPosition.y - boundingSphere.position.y;
279-
deltaPos.z = light.m_CachedPosition.z - boundingSphere.position.z;
277+
deltaPos.x = light.boundingSphere.position.x - boundingSphere.position.x;
278+
deltaPos.y = light.boundingSphere.position.y - boundingSphere.position.y;
279+
deltaPos.z = light.boundingSphere.position.z - boundingSphere.position.z;
280280

281281
float distanceSq = Vector3.SqrMagnitude(deltaPos);
282282

Packages/com.unity.shadergraph/Documentation~/Lerp-Node.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@
44

55
Returns the result of linearly interpolating between input **A** and input **B** by input **T**.
66

7-
The output is calculated as `A + T * (B - A)`. The value of input **T** acts as a weight factor applied to the difference between **B** and **A**:
7+
Unity calculates the output as:
8+
9+
A + T &times; (B &minus; A)
10+
11+
The value of input **T** acts as a weight factor applied to the difference between **B** and **A**:
812

913
- When **T** is `0`, the output equals **A**.
1014
- When **T** is `1`, the output equals **B**.
1115
- When **T** is `0.5`, the output is the midpoint between **A** and **B**.
1216

17+
The Lerp node uses Dynamic Vector slots, so **A**, **B**, and **T** always resolve to the same component count, which matches the smallest connected vector (larger vectors truncate). Scalars promote to the resolved size by duplicating their value across components.
18+
1319
## Ports
1420

1521
| Name | Direction | Type | Description |
1622
|:-----|:----------|:---------------|:------------|
17-
| A | Input | Dynamic Vector | First input value |
18-
| B | Input | Dynamic Vector | Second input value |
19-
| T | Input | Dynamic Vector | Time value. Typical range: 0 to 1. Though you can use values outside of this range they may cause unpredictable results. |
20-
| Out | Output | Dynamic Vector | Output value |
23+
| **A** | Input | Dynamic Vector | First input value |
24+
| **B** | Input | Dynamic Vector | Second input value |
25+
| **T** | Input | Dynamic Vector | Time value. Typical range: 0 to 1. Though you can use values outside of this range they may cause unpredictable results. |
26+
| **Out** | Output | Dynamic Vector | Output value |
2127

2228
## Generated Code Example
2329

Packages/com.unity.shadergraph/Documentation~/Node.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ Right clicking on a **Node** will open a context menu. This menu contains many o
4040
**Nodes** interact with the Shader Graph Window's Color Modes. Colors are displayed on nodes underneath the text on the node title bar. See [Color Modes](Color-Modes.md) for more information on available colors for nodes.
4141

4242
<image>
43+
44+
Unity applies each component of T as a weight factor to each component to A and B. If T has fewer components than A and B, Unity casts T to the required number of components. Unity copies the values of the original components of T to the added components.

Packages/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,7 @@ private VFXGraphCompiledData compiledData
14771477
[SerializeField]
14781478
private int m_ResourceVersion;
14791479

1480+
[NonSerialized]
14801481
private bool m_GraphSanitized = false;
14811482
private bool m_ExpressionGraphDirty = true;
14821483
private bool m_ExpressionValuesDirty = true;

0 commit comments

Comments
 (0)