Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Posts posted by shadmar

  1. Example : If placing different types prefabs in one area, you need to manually place each one.

    Would speedup level creations.

     

    Suggestion :

    - click one item, then shift-click another to place the first one at the second ones location.

    - click one item, then ctrl-click another to rotate the first to the second ones rotation

    - click one item, then shift+ctrl-click another to place+rotate the first one at the second ones location+rotation

     

    maybe add alt key also for scale.

  2. Is there currently any method I can pass a varying to all shaders in one go without looping through all materials form all surfaces to find shader and send shader:SetFloat ?

    (like for fog if I wanted)

     

    If not could maybe mat files be used for custom varys.

    Or maybe a Shader:SetGlobalFloat/vec2,3,4.. for a push out to all. (not so sure if that would be smart either)

    • Upvote 1
  3. Do you mean simple projected shadows, like what Source Engine uses?:

    post-1364-0-56795400-1362283951_thumb.jpg

     

    Those are extremely easy for me to add, and they run fast on all hardware. We actually had those in Leadwerks 1: XD

    shot61.jpg

     

    If enough people ask, I can add that when I do terrain. It's not hard to implement.

     

    Add me to the ask list. Those are more than good enough.

    • Upvote 2
  4. Models in Leadwerks 3 are basically the same as a Mesh in Leadwerks 2. A model can have one or more surfaces. In this case, the material you are looking for is applied to the model surface, so it will be something like this:

    local child = self.target:GetChild(1)
    local surface = child:GetSurface(0)
    local material = surface:GetMaterial()

     

    Since GetChild() returns an entity, and GetSurface() is a Model class command, you might need to cast the entity object to a model:

    http://www.leadwerks...ng-with-lua-r57

     

    Note that all indexes in Leadwerks 3 begin with 0, so 0 is the first entity or surface, 1 is the second, etc.

     

    That works, thanks guys.. (my first shader in le3) :

     

        surface = self.target:GetSurface(0)
       initmat = surface:GetMaterial()

     

    • Upvote 1
×
×
  • Create New...