Material Clustering Benchmark
ScalingVsSubsampling.cs
Go to the documentation of this file.
1using UnityEngine;
3
5{
7 {
9 int kernelSize,
10 UnityEngine.Video.VideoClip[] videos,
11 ComputeShader csHighlightRemoval
13
15 {
16 var workList = new BenchmarkDescription(
17 ClusteringTest.LogType.Variance,
18 "Scaling vs subsampling (KHM)"
19 );
20
21 foreach (UnityEngine.Video.VideoClip video in this.videos)
22 {
23 for (int textureSize = 256; textureSize >= 8; textureSize /= 2)
24 {
25 foreach (bool doDownscale in new bool[] { true, false })
26 {
27 workList.dispatches.Push(
29 staggeredJitter: false,
30 video: video,
31 doDownscale: doDownscale,
32 dispatcher: new DispatcherKHMp(
33 computeShader: this.csHighlightRemoval,
34 numIterations: 3,
35 doRandomizeEmptyClusters: false,
36 useFullResTexRef: true,
37 parameters: DispatcherKHMp.Parameters.Default(),
38 clusteringRTsAndBuffers: new ClusteringRTsAndBuffers(
39 numClusters: 32,
40 workingSize: textureSize,
42 jitterSize: 1
43 )
44 )
45 )
46 );
47 }
48 }
49 }
50
51 return workList;
52 }
53 }
54}
readonly UnityEngine.Video.VideoClip[] videos
ScalingVsSubsampling(int kernelSize, UnityEngine.Video.VideoClip[] videos, ComputeShader csHighlightRemoval)
override BenchmarkDescription GenerateBenchmark()
Call Allocate before using and Dispose after using.
static Parameters Default()
Default value of Parameters.p is 2.5, which we experimentally confirmed to be optimal for our dataset...
const int fullTextureSize