VSE; Lightwrap shader example (demystifying the use of the light component)

Ace DragonAce Dragon Posts: 43Member

Example file

Example image

This is an example of how you can have something akin to the wrap shader when using the Visual Shader Editor. Some time ago, I was able to create a nice looking terrain shader using the nodes, but I missed having the effect that the fixed material's wrap shader gave me (and I had no idea what the light component was for).

Reading through the documentation, I came across the simple snippet that told users how to write a blinn shader in code. It mentioned that it would go into the light component, so I decided to create a nodal version of it. That right then told me how the light component can be used (and give actual results).

In that case, I tried to get a wrap effect going, and was pleasantly surprised when I actually got such an effect to work (and even more so was virtually identical to the built-in wrap shader when the parameter is set to 1). This meant I can now it on terrain and any other object that required the VSE to get the desired results. The file is just an example and you don't need to copy the fragment portion of the shader to make use of it (the only copying you need to do is of the light component).

Enjoy :smile:


Tags :


  • Ace DragonAce Dragon Posts: 43Member

    Also, an image of the light component setup.

  • MegalomaniakMegalomaniak Posts: 303Member
    edited November 2016

    The "Vector Interpolation" after the "Negate" seems pretty pointless since far as I can tell nothing is controlling it(R = 0, no input overwriting it), a left-over from debugging?

  • Ace DragonAce Dragon Posts: 43Member

    Good find, that node was the product of trying to get the shading to work in the first place (the vector interpolate node is needed to ensure the falloff extends past where it would usually end).

Sign In or Register to comment.