Fix T98663: Eevee compilation error cryptomatte shaders.

On MacOS Eevee cyptomatte shaders fails as it doesn't ignore the `attrib_load`
parameter. I validated that removind the parameter works on Linux/AMD and MacOS
Intel. It could be that there are other platforms that require the dummy parameter.

If this should use a forward declaration and implement an emoty function in the
cryptomatte vertex shader.
This commit is contained in:
Jeroen Bakker 2022-06-17 08:25:21 +02:00
parent 62346abc02
commit 0ff7a7b3b5

@ -718,7 +718,7 @@ GPUShader *EEVEE_shaders_cryptomatte_sh_get(bool is_hair)
if (e_data.cryptomatte_sh[index] == NULL) { if (e_data.cryptomatte_sh[index] == NULL) {
DynStr *ds = BLI_dynstr_new(); DynStr *ds = BLI_dynstr_new();
BLI_dynstr_append(ds, SHADER_DEFINES); BLI_dynstr_append(ds, SHADER_DEFINES);
BLI_dynstr_append(ds, "#define attrib_load(a) \n"); BLI_dynstr_append(ds, "#define attrib_load() \n");
if (is_hair) { if (is_hair) {
BLI_dynstr_append(ds, "#define HAIR_SHADER\n"); BLI_dynstr_append(ds, "#define HAIR_SHADER\n");
} }