Apply the shader effect to only one scene object

  • #1, z red363Wednesday, 20. July 2022, 01:31 hodinky 2 years ago
    Hello!

    Tell me, please, is it possible to apply the shader effect to only one scene object?

    I tried using this script from Afrlme

    function setObjectEffect(eff)
     shaderAddEffect(eff)
     shaderRemoveEffect(eff)
     shader_effects[eff].num.strength=1
     bind(eff, "time", field("shader_iTime"))
     shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 1)
    end

    But for some reason it doesn't work for me (Visionaire version 5.1.8.1),
    the object to which I apply is simply not displayed (smeared with a black square).

    Thanks



    Fanoušek fóra

    101 Posts


  • #2, z afrlmeWednesday, 20. July 2022, 12:49 hodinky 2 years ago
    That thread is really old & I don't know if the shader toolkit still works that way. Also you need to make sure you include the latest version of the shader toolkit as a definition script in your project, because if you are using an older version it may not work correctly.

    You can always find the most recent version here.

    Imperátor

    7285 Posts