godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Implement a method in `RenderingServer` to change the rendering pipelines. #8744

Closed RadiantUwU closed 8 months ago

RadiantUwU commented 8 months ago

Describe the project you are working on

Raytracing plugin implementation

Describe the problem or limitation you are having in your project

Being completely unable to change the pipeline without editing the game engine itself.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This would allow the modification of the 3D rendering pipeline to allow to implement raytracing, path tracing, maybe even voxel based rendering.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

void RenderingServer.change_rendering_pipeline(int idx, RID pipeline)

If this enhancement will not be used often, can it be worked around with a few lines of script?

No.

Is there a reason why this should be core and not an add-on in the asset library?

This requires modification to the game engine.

AThousandShips commented 8 months ago

What is the index here? Which pipeline is being replaced?

RadiantUwU commented 8 months ago

What is the index here? Which pipeline is being replaced?

The fragment/light pipelines.

AThousandShips commented 8 months ago

Those aren't indexed in ant way I know, please elaborate

Calinou commented 8 months ago

Thanks for the proposal! Consolidating in https://github.com/godotengine/godot-proposals/issues/4287 and https://github.com/godotengine/godot-proposals/issues/7916.

Regarding raytracing support, it's planned to expose raytracing extensions (Vulkan raytracing/DXR) at some point in RenderingDevice. See also https://github.com/godotengine/godot-proposals/discussions/5162.