FFogUniformParameters inaccessible to engine plugins

Hello,

We are writing some engine plugins that are using the SceneViewExtension system. In order to add some custom rendering passes. While writing these we noticed that the GlobalShaderParamStruct “FFogUniformParameters”, isn’t accessible since its file of origin “FogRendering.h” is placed in the private folder of the Renderer. Making it so we can’t reuse HeighFog shader functionality, like in Unreals Volumetric fog, etc…

Our first thought was to try and redefine the struct, but since IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT checks the name of the struct it reflects to, in order to avoid multiple definitions, we can’t. Another option would be to move the file to be public, but this is questionable from a maintainability standpoint.

I wonder if there is a particular course of action to take here? Like an alternative to IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT that allows for a redefinition/copy of a struct for such cases, or other solutions.

Kind regards,

Sebastien V.

Hello,

I’ve created an internal request to make FFogUniformParameters publicly accessible, but until then you’ll need to make a suitable engine modification to expose the structure and maintain the change when you integrate future versions of the engine. Alternately, you can do what the Water plugin does in Water.build.cs and gain access to the Renderer Private folder with:

PrivateIncludePaths.AddRange( new string[] { System.IO.Path.Combine(GetModuleDirectory("Renderer"), "Private"), } );