There are many problems with Three.js using glsl3 and plugin, f.e. you cant just add # version 300 es to shader code, because it throws error:
1: #define SHADER_TYPE RawShaderMaterial
2: #define SHADER_NAME
> 3: # version 300 es
Implementation just adds first line of code as third.
Without # version 300 es i cant use 3.0 syntax.
Workaround would be adding support for extensions like .glsl3, .frag3, .vert3, so when using it, plugin would know shader is using 3.0 without neccessary to put # version 300 es in shader file allowing to use 3.0 syntax.
Other workaround is recognition of // # version 300 es as # version 300 es
Feature details
There are many problems with Three.js using glsl3 and plugin, f.e. you cant just add
# version 300 es
to shader code, because it throws error:Implementation just adds first line of code as third. Without
# version 300 es
i cant use 3.0 syntax. Workaround would be adding support for extensions like.glsl3
,.frag3
,.vert3
, so when using it, plugin would know shader is using 3.0 without neccessary to put# version 300 es
in shader file allowing to use 3.0 syntax.Other workaround is recognition of
// # version 300 es
as# version 300 es