As for the Post-Processes Builder, you are able to develop custom materials using a JSON configuration. Just select it in the main tool bar.
Features available:
Before opening the Materials Builder, you can add a new material or select an existing one in order to edit it. To add a new material, just click "Add New: then, a new material with default vertex, pixel and configuration files is created.
To edit a material, just select one and click the button "Select"
Once opened, you are now able to configure the uniforms & samplers, and edit the vertex & pixel shaders code.
On the left, you have an edition tool which allows you to configure the material:
And the preview scene:
The configuration tab allows you to declare custom uniforms and samplers. In the default material all available options, like "time", are used as example (here, time is used by waves function in default vertex shader).
For samplers, the parameter "uniformName" is important: the name is used to declare the texture matrix and texture infos in the vertex shader.
The vertex and pixel shaders follow the way to create materials with Babylon.js. A lot of code is already written then you only have to include files (#include). All default "includes" are already implemented in default material. In the default material, a custom waves function is available as an example line 64
On line 26, the uniforms related to the sampler named "myTexture" (in samplers configuration) are available as example. The uniforms "myTextureMatrix" and "vMyTextureInfos" are sent automatically by the engine following the name you set in configuration: here "myTexture".
Free to you to use it in your vertex shader :)
As for vertex shader, the uniforms "vMyTextureInfos" and "myTextureSampler" are set automatically by the engine. Free to you to use it in the pixel shader
In order to preview the material in the preview scene, just click the button "Build Material" in the edition tool (on the left). Then, the material is applied on the mesh you specified in the edition tool (default "Box").
Once built, new fields are created in edition tool:
These fields are used to realtime customize your material in order to get your configuration perfect.
Once built, you can apply your material in the main scene of your project. Then, apply the material on one/multiple meshes. Just click "Apply on scene".
Then, select a mesh in your scene and set the material you created :)