glsl - What shaders are in the three.js ShaderLib? -


i see in various demos can use shader so:

shader = three.shaderlib[ "normalmap" ]; 

what other shaders in shaderlib, , shaderlib documented? doesn't seem show in github repo.

as of r.59, three.js shaders available through shaderlib are:

  • basic
  • lambert
  • phong
  • particle_basic
  • dashed
  • depth
  • normal
  • normalmap
  • cube
  • depthrgba

the shaders in shaderlib listed , defined here: https://github.com/mrdoob/three.js/blob/r59/src/renderers/webglshaders.js#l1936 – includes linked uniforms, included shader shunks, , in few cases, fragment , vertex shader definitions.

they far unmentioned in the documentation, , reason search in repo shaderlib turns empty, apparently because of unexplained deficiencies github search.


Comments