Constructor ComputeShaderInstance
ComputeShaderInstance(string, string)
Load the specified shader using Resources.Load() and find the specified kernel that form the compute shader program.
Declaration
public ComputeShaderInstance(string shaderName, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
string | shaderName | Shader name in the resource bundle |
string | kernelName | Kernel name defined in .compute |
ComputeShaderInstance(ComputeShader, string)
Use the specified shader and find the specified kernel that form the compute shader program. Useful if the compute shader cannot be loaded from Resources.Load().
Declaration
public ComputeShaderInstance(ComputeShader _shader, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
ComputeShader | _shader | Loaded compute shader |
string | kernelName | Kernel name defined in .compute |