Search Unity

Question Can't transfer a property to GPU instancing + tessellation shader.

Discussion in 'Shaders' started by CGDever, Aug 12, 2021.

  1. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    156
    Hi guys!
    Is it possible for a Standard shader to have Tessellation + GPU Instancing?
     
    Last edited: Aug 12, 2021
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Is it possible to have a shader with instancing and tessellation? Technically, yes.

    Can you do this with Surface Shaders? No.

    Unity's Surface Shaders and the code it generates when you try to use tessellation wasn't written to work with instancing, so it generates code that will fail to compile once instancing is enabled. Unfortunately you'd have to write the shader code entirely by hand to get tessellation to work as you do need the instanced ID to be passed through multiple shader stages.