Draw material to texture?

hi, is that possible to draw a material directly to a texure, just like applying the material to a square plane, and then “print” this square plane to a texture? In unreal engine there exists a blueprint node like the image blow, and I am not sure whether I could make the same thing in Babylon.

You should know how to use PostProcess in Babylon, it like shaderMaterial, you can change shader a little to use it in PostProcess. After you create a PostProcess and it is ready to render, you can create a renderTargetTexture (which texture you want to render to), and then use PostProcessManager to render it.
Those are step:

  1. write custom PostProcess and create PostProcess
    2.create RTT

    3.render to RTT(_lowResCloudsBuffer is a RTT)
1 Like

Use this way to insert your vertex/frag Shader into babylon:

Attention: key in ShadersStore is name+VertexShader/FragmentShader, when you use it as url, just name.

1 Like

You can use NME to create shader, which is like link-map in unreal, remenber select output type postprocess.


PostProcess docs for reference: How To Use Post Processes | Babylon.js Documentation (babylonjs.com)

Hello, just checking in, would you like any more help? :slight_smile:

Sorry for replying late, didn’t check forum a long time! Finally, I made it using customed shader with the help of a programmer colleague. I tried postprocess but seemed not the result I want. Thanks still!