Handle gl_InstanceID built-in

This commit is contained in:
luboslenco 2019-03-19 13:15:25 +01:00
parent b5dd2da61c
commit cafaaf9643

View file

@ -332,6 +332,10 @@ class CyclesShader {
s += 'uint gl_VertexID : SV_VertexID;\n';
ins.push('uint gl_VertexID');
}
if (shader_type == 'vert' && main.indexOf("gl_InstanceID") >= 0) {
s += 'uint gl_InstanceID : SV_InstanceID;\n';
ins.push('uint gl_InstanceID');
}
s += '};\n';
}