Skip to content

Instantly share code, notes, and snippets.

@TSUMIKISEISAKU
Created September 7, 2023 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TSUMIKISEISAKU/89f94a2e965ac479cc5a9b0f69277451 to your computer and use it in GitHub Desktop.
Save TSUMIKISEISAKU/89f94a2e965ac479cc5a9b0f69277451 to your computer and use it in GitHub Desktop.
using UnityEngine;
/// <summary>
/// contain basic parameters of compute shader
/// </summary>
public class KernelParamsHandler
{
// name of kernel
public string _name;
// index of kernel
public int _index;
// thread group size x
public int _x;
// thread group size y
public int _y;
// thread group size z
public int _z;
public KernelParamsHandler(ComputeShader computeShader, string kernelName, int threadSizeX, int threadSizeY, int threadSizeZ)
{
_name = kernelName;
_index = computeShader.FindKernel(_name);
_x = threadSizeX;
_y = threadSizeY;
_z = threadSizeZ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment