Required by Metal backend for efficient shader compilation. EEVEE material resource binding permutations now controlled via CreateInfo and selected based on material options. Other existing CreateInfo's also modified to ensure explicitness for depth-writing mode. Other missing bindings also addressed to ensure full compliance with the Metal backend. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D16243
33 lines
775 B
GLSL
33 lines
775 B
GLSL
#define EEVEE_AOV_HASH_COLOR_TYPE_MASK 1u
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/** \name Functions
|
|
* \{ */
|
|
|
|
vec3 render_pass_diffuse_mask(vec3 diffuse_light)
|
|
{
|
|
return renderPassDiffuse ? (renderPassDiffuseLight ? diffuse_light : vec3(1.0)) : vec3(0.0);
|
|
}
|
|
|
|
vec3 render_pass_glossy_mask(vec3 specular_light)
|
|
{
|
|
return renderPassGlossy ? (renderPassGlossyLight ? specular_light : vec3(1.0)) : vec3(0.0);
|
|
}
|
|
|
|
vec3 render_pass_emission_mask(vec3 emission_light)
|
|
{
|
|
return renderPassEmit ? emission_light : vec3(0.0);
|
|
}
|
|
|
|
bool render_pass_aov_is_color()
|
|
{
|
|
return (renderPassAOVActive & EEVEE_AOV_HASH_COLOR_TYPE_MASK) != 0u;
|
|
}
|
|
|
|
uint render_pass_aov_hash()
|
|
{
|
|
return renderPassAOVActive & ~EEVEE_AOV_HASH_COLOR_TYPE_MASK;
|
|
}
|
|
|
|
/** \} */
|