Divine-Star-Software / DivineVoxelEngine

A multi-threaded, renderer independent, fully customizable TypeScript voxel engine.
MIT License
209 stars 13 forks source link

Replace Materials With New Babylon.js 5+ Material Plugin #6

Closed lucasdamianjohnson closed 7 months ago

lucasdamianjohnson commented 2 years ago

So, been working on the light update a bit and was thinking about how I could integrate Babylon's shadow system into the engine. I think currently the best method is to actually not use the ShaderMaterial but rather use the new Material Plug-In system. Babylon.Js Docs : Material Plugins

The most important thing that I need to get working with the plugin system is Raw 2D Texture Arrays. and the texture animations. Other than that it should be pretty easy to inject the rest of the shader code using the system.

I am opening this issue just to keep track of the progress.

Going to start work on it at this PG : example PG

lucasdamianjohnson commented 2 years ago

Maybe using the CustomMaterial will be a better option. Check out this: Shadows and post-processing with custom material

lucasdamianjohnson commented 2 years ago

I actually got this working currently with the bjs5 material plugin. I was able to get dynamic lighting and shadows working. I will work on in the future creating a classic and standard material settings.

lucasdamianjohnson commented 7 months ago

In the newest DVE you can use the PBR renderer which uses the PBR Material plugin system. You can also still use the classic rendering which is first version of the shaders I wrote.

lucasdamianjohnson commented 7 months ago

Closed.