adding custom shader – examples

Home Forums Programming adding custom shader – examples

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #14249


    I’ve got a scene made in 3dsmax 2019 with a number of meshes and materials, camera, lights. got the puzzles for it, as well. all works fine.

    one of the meshes needs a more complicated shader/material logic than is available via 3dsmax, so I am looking to assign vertex and fragment shaders to this specific mesh.

    the documentatio.n is good and extensive, and my struggle is compositing multiple examples into one working thing. things get more complicated because I am not a full-blown coder but rather an artist with some technical skills.

    my current understanding is that I need to:
    * place vertex and fragment shader in the project folder
    * cut into the scene .js file at “// add your code here, e.g. console.log(‘Hello, World!’);”
    * there, create new v3d shader material and assign it to the mesh from the scene
    * the shader needs these things to operate properly: camer location ws, pixel location ws, vertex normal ws; the object is moving, so all of these need to be updated per frame.

    I understand this is a trivial task, but it has proven to be quite a struggle for someone who does not speak html, java, or glsl. I can write limited math in the comfort of pre-created vertex/fragment shader files, but everything else proves to be quite a confusion.

    if there is a good single example of a project doing exactly this, I will be thankful for a link.



    Yuri KovelenovYuri Kovelenov


    see this code example for the start

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.