Material Clustering Benchmark
LaunchParameters.cs
Go to the documentation of this file.
2using System;
3using UnityEngine;
4
6{
7 /// <summary>
8 /// Call <see cref="Dispose" /> after using.
9 /// </summary>
10 public class LaunchParameters : IDisposable
11 {
12 [Serializable]
14 {
15 [SerializeReference]
17
18 public string videoName;
19 public int numIterations;
21 public int numClusters;
22 public int jitterSize;
23 public bool staggeredJitter;
24 public bool doDownscale;
25 public string algorithm;
27 public bool stopCondition;
28 public bool readback;
29 public bool useFullResTexRef;
30
32 string videoName,
33 int numIterations,
35 int numClusters,
36 int jitterSize,
37 bool staggeredJitter,
38 bool doDownscale,
39 string algorithm,
41 bool stopCondition,
42 bool readback,
45 )
46 {
47 this.videoName = videoName;
48 this.numIterations = numIterations;
49 this.workingTextureSize = workingTextureSize;
50 this.numClusters = numClusters;
51 this.jitterSize = jitterSize;
52 this.staggeredJitter = staggeredJitter;
53 this.doDownscale = doDownscale;
54 this.algorithm = algorithm;
55 this.doRandomizeEmptyClusters = doRandomizeEmptyClusters;
56 this.dispatcherParameters = dispatcherParameters;
57 this.stopCondition = stopCondition;
58 this.useFullResTexRef = useFullResTexRef;
59 this.readback = readback;
60 }
61 }
62
64 {
66 videoName: this.video.name,
67 numIterations: this.dispatcher.numIterations,
68 workingTextureSize: this.dispatcher.clusteringRTsAndBuffers.texturesWorkRes.size,
69 numClusters: this.dispatcher.clusteringRTsAndBuffers.numClusters,
70 jitterSize: this.dispatcher.clusteringRTsAndBuffers.jitterSize,
71 staggeredJitter: this.staggeredJitter,
72 doDownscale: this.doDownscale,
73 algorithm: this.dispatcher.name,
74 doRandomizeEmptyClusters: this.dispatcher.doRandomizeEmptyClusters,
75 dispatcherParameters: this.dispatcher.abstractParameters,
76 stopCondition: this.dispatcher.usesStopCondition,
77 useFullResTexRef: this.dispatcher.useFullResTexRef,
78 readback: this.dispatcher.doesReadback
79 );
80 }
81
82 public readonly bool staggeredJitter;
83 public readonly UnityEngine.Video.VideoClip video;
84 public readonly bool doDownscale;
85 public readonly IDispatcher dispatcher;
86
87 /// <summary>
88 /// Takes ownership of the dispatcher
89 /// </summary>
91 bool staggeredJitter,
92 UnityEngine.Video.VideoClip video,
93 bool doDownscale,
95 )
96 {
97 this.staggeredJitter = staggeredJitter;
98 this.video = video;
99 this.doDownscale = doDownscale;
100 this.dispatcher = dispatcher;
101 }
102
103 public void Dispose()
104 {
105 this.dispatcher.Dispose();
106 }
107 }
108}
SerializableLaunchParameters(string videoName, int numIterations, int workingTextureSize, int numClusters, int jitterSize, bool staggeredJitter, bool doDownscale, string algorithm, bool doRandomizeEmptyClusters, bool stopCondition, bool readback, bool useFullResTexRef, DispatcherParameters dispatcherParameters)
readonly UnityEngine.Video.VideoClip video
SerializableLaunchParameters GetSerializable()
LaunchParameters(bool staggeredJitter, UnityEngine.Video.VideoClip video, bool doDownscale, IDispatcher dispatcher)
Takes ownership of the dispatcher
Call Dispose after using.
Definition: IDispatcher.cs:9