Pass shader code string directly to ShaderMaterial

BJS version 4.0.3 has bug for vertexSource/fragmentSource and vertex/fragment as the third argument of ShaderMaterial constructor, should use 4.1.0-alpha.

vertexSource/fragmentSource is not list on documentation, but it should be.

This is a new feature of 4.1 :slight_smile: It will be documented when 4.1 will go live

long long long ago i wrote a little app convert shadertoy to BJS,i remember there was a way to put the code into shader material directly. now i cant find it.

for version 4.0.3 the way with base64 and vertex/fragment has issue, the way with script tag is asynchronous, dont like it.

1 Like