Skip to content

Commit 343341f

Browse files
authored
Moved matrices to 3x4 (#386)
* Moved matrices to 3x4 * Moved some more matrices to 3x4 * 3x4 matrices for URP * Added test on hybrid version if enabled * backed down hybrid requirements to 0.6.9, since this will catch 0.7 and up * Bumped version to hybrid 0.6.0 preview * Updated code to work with new Unity/DOTS release * White space fix * Fixed bad merge * More merge fixes * Added packages-lock.json files
1 parent b001294 commit 343341f

File tree

11 files changed

+1323
-29
lines changed

11 files changed

+1323
-29
lines changed

TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestMatrixPrevious/MoveBallsSystem.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ public class MoveBallsSystem : JobComponentSystem
2121
[BurstCompile]
2222
struct MoveBall : IJobChunk
2323
{
24-
public ArchetypeChunkComponentType<Translation> TranslationType;
25-
[ReadOnly] public ArchetypeChunkComponentType<BallOriginalTranslation> BallOriginalTranslationType;
24+
public ComponentTypeHandle<Translation> TranslationType;
25+
[ReadOnly] public ComponentTypeHandle<BallOriginalTranslation> BallOriginalTranslationType;
2626
public uint LastSystemVersion;
2727
public double ElapsedTime;
28-
28+
2929
public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex)
3030
{
3131
var chunkTranslation = chunk.GetNativeArray(TranslationType);
3232
var chunkOrigTranslation = chunk.GetNativeArray(BallOriginalTranslationType);
33-
33+
3434
for (int i = 0; i < chunk.Count; i++)
3535
{
3636
chunkTranslation[i] = new Translation { Value
@@ -58,17 +58,17 @@ protected override void OnCreate()
5858
protected override JobHandle OnUpdate(JobHandle inputDeps)
5959
{
6060
EntityCommandBuffer entityOriginsCommandBuffer = new EntityCommandBuffer(Allocator.TempJob, PlaybackPolicy.SinglePlayback );
61-
Entities.WithNone<BallOriginalTranslation>().ForEach((Entity entity, Translation translation, SphereId sphereId) =>
61+
Entities.WithNone<BallOriginalTranslation>().ForEach((Entity entity, in Translation translation, in SphereId sphereId) =>
6262
{
6363
entityOriginsCommandBuffer.AddComponent(entity, new BallOriginalTranslation{ Value = translation.Value });
6464
}).Run();
6565
entityOriginsCommandBuffer.Playback(EntityManager);
6666
entityOriginsCommandBuffer.Dispose();
67-
67+
6868
var moveBallJob = new MoveBall
6969
{
70-
TranslationType = GetArchetypeChunkComponentType<Translation>(),
71-
BallOriginalTranslationType = GetArchetypeChunkComponentType<BallOriginalTranslation>(true),
70+
TranslationType = GetComponentTypeHandle<Translation>(),
71+
BallOriginalTranslationType = GetComponentTypeHandle<BallOriginalTranslation>(true),
7272
LastSystemVersion = LastSystemVersion,
7373
ElapsedTime = Time.ElapsedTime
7474
};

TestProjects/HDRP_HybridTests/Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"com.unity.render-pipelines.core": "file:../../../com.unity.render-pipelines.core",
1616
"com.unity.render-pipelines.high-definition": "file:../../../com.unity.render-pipelines.high-definition",
1717
"com.unity.render-pipelines.high-definition-config": "file:../../../com.unity.render-pipelines.high-definition-config",
18-
"com.unity.rendering.hybrid": "0.5.0-preview.6",
18+
"com.unity.rendering.hybrid": "0.6.0-preview.13",
1919
"com.unity.shadergraph": "file:../../../com.unity.shadergraph",
2020
"com.unity.test-framework": "1.1.13",
2121
"com.unity.test-framework.build": "0.0.1-preview.12",

0 commit comments

Comments
 (0)