bryanedds / Nu

Repository hosting the open-source Nu Game Engine and related projects.
MIT License
1.15k stars 156 forks source link

Investigate the potential designs and implementation estimates for some form of shader graph in Nu. #702

Open bryanedds opened 11 months ago

bryanedds commented 11 months ago

Now that we are using bindless textures and packing per-object render parameters in a single buffer, we can investigate what limited forms of a shader graph technology are potentially reasonably implementable in Nu. We could provide an API that is used to specify and populate a user-defined shader parameterization data stream as well as user defined glsl code fill-ins for pre-defined glsl punch holes. If we feel the need to generate GLSL code, we might be able to use F# code quotations with an existing library for that (I think Aardvark libs might have some code for this).

This is likely a big overall initiative, so we need to start by breaking down the likely possible task paths and estimating their time costs.

EDIT: on the plus side, we do already have some ImGui support for the UI side -

image

...tho it's hard to say how functional or well-maintained the actual library is.

bryanedds commented 6 months ago

Well, we had to remove bindless textures from Nu to get it to work on AMD. So now we only have two options for this -

1) Try to use bindless textures in a way that is both limited to this feature and also somehow doesn't cause AMD drivers to neck themselves.

2) Don't implement this feature in OpenGL.

bryanedds commented 6 months ago

Perhaps one of the big reasons our utilization of bindless textures ended up wrecking AMD drivers was that we used them for render targets. I suspect this because for the most part, 3D rendering worked fine on AMD so long as we disabled light mapping. Perhaps using bindless textures only for surface textures would function reliably on AMD drivers. However, any use of bindless textures on AMD would eliminate the one single working GPU debugging tool we have left on AMD; RenderDoc.

bryanedds commented 1 week ago

Maybe this ImGui library will be a better fit - https://github.com/thedmd/imgui-node-editor

image