I'd like some rendering capabilities to be exposed through the scripting API. A few of the things I'd like to do:
- Render the world from a different viewport, using arbitrary materials, saving that output to a texture that a shader can access. This would be useful for e.g. rendering shadows from block lights, or rendering color and normals from the point of view of the main light source (sun/moon)
- Calculate variables on the CPU, then upload them to the GPU through a custom constant buffer view. This would be super useful for data that a shader needs that changes once per frame, or even less frequently
- Add in post- and mid-processing fullscreen passes. I'd like to add a pass between rendering solid objects and transparent objects to render screen-space reflections and ambient occlusion, then render transparents over that, then perhaps another SSR pass
- Change the framebuffer. Continuing the above example, I'd need to save normals, specular information, and the lighting buffer in order to accomplish SSR
- Compute other data. I'd like the be able to run a compute shader to calculate a fluid simulation for smoke, fire, explosions, and water. The output of that would be a 3D volume texture that I can render to screen in a post-lighting pass
These requests range from "add in this one thing" to "completely change how a frame is rendered", but I think there's a good opportunity here to make a really awesome scripting API that will let shader developers fulfill their wildest dreams. I think that something on the level of Unity's Scriptable Render Pipelines could let that happen
Please sign in to leave a comment.
17 Comments