[Immersive Portals] Iris should handle the patching of its shaders to add clipping equations, not Immersive Portals.
coderbot16 opened this issue ยท 0 comments
Iris has some more robust shader patching code that allows it to handle less conventional main function declarations, even ridiculous things like this:
void /* regexes don't work */ main()
// comments are valid here too
/*
void main() {
// tricked ya!
}
*/
{
gl_Position = ftransform();
}
In addition, Iris is more knowledgeable about its own vertex input layout and similar, so Immersive Portals wouldn't need to continually update to handle any changes in how Iris passes vertex attributes to shaders.
This should also make it possible for entities to be rendered through portals with Immersive Portals and Iris both together.
Unsolved issues:
- How would Immersive Portals know not to patch a GlShader instance created by Iris?
- How would Iris known whether or not to add the clipping equation uniform?