Hello,
In order to create new post processes, one may need reflectance information for each material whatever its type. For example, the ScreenSpacereflection post process can’t work on materials defined with metallic-roughness mode.
The Reflectivity PrePass is convenient but not sufficient for this purpose since it only renders the ORM texture in case of metallic-roughness materials instead of computing the corresponding reflectance values.
I already worked on it. I implemented a new PrePass that renders specularity of the material whatever its type. When the material is already defined according to the Specular-Glossiness model, it renders the specularity and the glossiness just as the Reflectivity PrePass. When the material is defined according to the Metallic-Roughness model, I translate it to the Specular-Glossiness model as explained in PBR Texture Conversion | Marmoset. Standard materials are also taken into account.
Thus, this new PrePass is material agnostic.
Hope this will help !
Link to my repository: GitHub - Mannns/Babylon.js: Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.