Compilation would of course work again if the #ifdef would be extended by _Brdf, but this looks like it defeats the purpose of _EnvCol, which I presume to be rather complementary to _Brdf. _EnvCol gets defined for example when the world uses no nodes or no output node exists in a node tree, and _Brdf only exists when there is a proper world shader and radiance is enabled.
The same could potentially happen a few lines above in the #ifdef _Rad block, but I think at the moment _Brdf is always defined if _Rad is defined so it works.
@LVutner maybe you know how to properly fix this? Should we define _Brdf also if _EnvCol is defined?
https://github.com/armory3d/armory/commit/c0a07a70f448756a5fde8cab48ac0b572738feee introduced a small issue: If
_EnvCol
is defined but_Brdf
isn't,envBRDF
does not exist in the following line: https://github.com/armory3d/armory/blob/c0a07a70f448756a5fde8cab48ac0b572738feee/Shaders/deferred_light/deferred_light.frag.glsl#L269-L271Compilation would of course work again if the #ifdef would be extended by
_Brdf
, but this looks like it defeats the purpose of_EnvCol
, which I presume to be rather complementary to_Brdf
._EnvCol
gets defined for example when the world uses no nodes or no output node exists in a node tree, and_Brdf
only exists when there is a proper world shader and radiance is enabled.Example file brdf_issue.zip
The same could potentially happen a few lines above in the
#ifdef _Rad
block, but I think at the moment_Brdf
is always defined if_Rad
is defined so it works.@LVutner maybe you know how to properly fix this? Should we define
_Brdf
also if_EnvCol
is defined?