License from €75 Log in
DE EN FR ES IT CZ

Turn off shaderlamp.

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Hi, guys. My question its simple. I have 3 shaderlamp in a scene. When change the scene, i want restore values sahaderlamp, i mean I want turn off the lamps.(To doing this I use this "shaderDeactivateLighting()" ) but I use In the next scene (shaderAddEffect"highlight" ).. And if use "shaderDeactivateLighting()" "highlight"effect dont work. Any solution? witch is the easy way to turn off shaderlamps? Thanks guys! :-).
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    try...
    shaderActivateLighting(0)
    

    ... it's essentially the same as off as you are declaring 0 light sources.
  4. · 12 years ago
    Yes, I have tried it and it doesnt work. The scene go black..
  5. · 12 years ago
    You need to use:
    shaderDeactivateLighting()
    
  6. · 12 years ago
    If use shaderDeactivateLighting() the shadereffects stop work. as a said in my open post. why?.. thanks! wink
  7. · 12 years ago
    Sorry, I didn't read carefully enough. I'm not quite sure, what's the problem. Could you post your messages.log ? I can't reproduce that here. Maybe you have a typo or something like that.
  8. · 12 years ago
    Ok. I can use shaderDeactivateLighting() and everything work correctly. But the effects "edgeglow" and "highlight" Doesnt Work if use before shaderDeactivateLighting(), I think maybe this happend because this specifically effect use lights, i dont know. Thanks for everything! :-).
  9. · 12 years ago
    Simons i dont know how find messages.log. I dont have. I will try to write what I have:


    Scene 1:

    Actions:
    "at beginning of scene"

    shaderAddEffect("tv1")


    "at end of scene":

    shaderRemoveEffect("tv1")


    Scene 2 :
    Actions:
    "at beginning of scene" :

    shaderActivateLighting(2)


    shaderLamp(0, 0,{900,1300,1}, {0,100,100}, {0.001,0.000001,0},{0,0,0},{1,1,1},2,0.1, 0)
    bind("light1", "lights[0].targetpos", point(inverty(scrollfix(field("{x=1000,y=200}"))), 0))


    shaderLamp(1, 0,{2000,1000,1}, {0,100,100}, {0.001,0.000001,0},{0,0,0.001,0001},{1,1,1},0.5,30, 0)
    bind("light2", "lights[1].targetpos", point(inverty(scrollfix(field("{x=1000,y=900}"))), 0))

    "at end of scene":

    shaderDeactivateLighting()


    when I back to the scene 1 the shadereffects never work fine. Work half. It dont work good. Please this part is important..What I dont do good?. Thanks for everithing smile.
  10. · 12 years ago
    To find your message.log location:

    1. run game via vs editor.

    2. press TAB key to open up the developers console.

    3. type: exec print(localAppDir), then press ENTER.

    4. Now type: print log, then press ENTER to display the log.

    5. Locate one of the lines in the log which says something like: c:/users/... & that will be the folder in which your log files & save games etc are being stored.
  11. · 12 years ago
    bind("light2", "lights[1].targetpos", point(inverty(scrollfix(field("{x=1000,y=900}"))), 0))
    

    should be
    bind("light1", "lights[1].targetpos", point(inverty(scrollfix(field("{x=1000,y=900}"))), 0))
    


    "light1" is the name of the shader, you can't change this. The light id is in lights[0] etc.

    And it's working.
  12. · 12 years ago
    Omg! Im stupid! Thanks Simons!.
    and thanks afrlm to explain how find my .log.

    You can explain more details about developer console please.
    For what it importan use it. Can you explain useful uses? Thanks for everything! you are of great help. smile.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?