Struct WaterSimulationSearchJob
C# Job that evaluate the height for a set of WaterSearchParameters and returns a set of WaterSearchResult (and stored them into native buffers).
Implements
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[BurstCompile]
public struct WaterSimulationSearchJob : IJobParallelFor
Fields
candidateLocationWSBuffer
Output native array that holds the set of positions that were used to generate the height value.
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> candidateLocationWSBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
directionBuffer
Output native array that holds the set of direction for each target position;
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> directionBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
error
Target error value at which the algorithm should stop.
Declaration
public float error
Field Value
Type | Description |
---|---|
float |
errorBuffer
Output native array that holds the set of horizontal error for each target position.
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float> errorBuffer
Field Value
Type | Description |
---|---|
NativeArray<float> |
excludeSimulation
Specifies if the search should ignore the simulation.
Declaration
public bool excludeSimulation
Field Value
Type | Description |
---|---|
bool |
includeDeformation
Specifies if the search job should include the deformations
Declaration
public bool includeDeformation
Field Value
Type | Description |
---|---|
bool |
maxIterations
Number of iterations of the search algorithm.
Declaration
public int maxIterations
Field Value
Type | Description |
---|---|
int |
normalWSBuffer
Output native array that holds the set of normals at projected positions.
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> normalWSBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
outputNormal
Specifies if the search should compute the normal of the water surface at the projected position.
Declaration
public bool outputNormal
Field Value
Type | Description |
---|---|
bool |
projectedPositionWSBuffer
Output native array that holds the set of world space position projected on the water surface along the up vector of the water surface.
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> projectedPositionWSBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
simSearchData
Input simulation search data produced by the water surface.
Declaration
public WaterSimSearchData simSearchData
Field Value
Type | Description |
---|---|
WaterSimSearchData |
startPositionWSBuffer
Native array that holds the set of "hint" position that the algorithm starts from.
Declaration
[ReadOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> startPositionWSBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
stepCountBuffer
Output native array that holds the set of steps that were executed to find the height.
Declaration
[WriteOnly]
[NativeDisableParallelForRestriction]
public NativeArray<int> stepCountBuffer
Field Value
Type | Description |
---|---|
NativeArray<int> |
targetPositionWSBuffer
Native array that holds the set of position that the job will need to evaluate the height for.
Declaration
[ReadOnly]
[NativeDisableParallelForRestriction]
public NativeArray<float3> targetPositionWSBuffer
Field Value
Type | Description |
---|---|
NativeArray<float3> |
Methods
Execute(int)
Function that evaluates the height for a given element in the input buffer.
Declaration
public void Execute(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the element that the function will process. |