docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)