shaderlamp spotlight

  • #1, by sebastianSunday, 07. February 2016, 14:57 4 years ago
    hey there computer peoplez,

    i have a question regarding the "shaderlamp". The wiki doesnt give any examples and the forum has only stuff which doesnt work for me. So maybe some of you know how i solve this:

    I want to make a spotlight on a scrollable scene (500x316) which has its source on 250,316 (so in the middle top point) and is going straight down to 250,0 (middle bottom). The spotlight should NOT move when the scene scrolls.
    The only thing i managed to work is a spotlight which rotates depending on scene scoll but i dont know how i did it.

    Could you give me an example on how to achive a normal fixed spotlight?

    thanks in advance

    Sebastian


    EDIT: Also what i want to know: is it possible to bind a shaderlamp to an object, so it could be behind objects?


    Thread Captain

    2336 Posts


  • #2, by sebastianWednesday, 10. February 2016, 08:43 4 years ago
    No one who used the spotlight as a normal light source which scrolls with the scene?

    Thread Captain

    2336 Posts

  • #3, by turricanWednesday, 10. February 2016, 09:59 4 years ago
    Hey Sebastian,

    this should be right for you:
    shaderActivateLighting(1)

    shaderLamp(0, 0, {500,316,1}, {250,0,0}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)
    1
    2
    3
    4


    This:
    bind("light1", "lights[0].targetpos", point(inverty(scrollfix(field("{x=500,y=316}"))), 0))
    1
    2


    should bind the light to the position. But actually ist seems that the binding not works... I think sth. is wrong with the shader toolkit.
    Have problems with the binding for my flashlight too...
    But i hope, the 1st code-snippet works for you...

    Newbie

    43 Posts

Write post