Help

Discussion in 'Mod Discussions' started by tatsujb, March 8, 2015.

  1. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    How do I change a teamcolor in theparticle.fs shader to another shade?
    Last edited: March 9, 2015
  2. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    .
    Last edited: March 9, 2015
  3. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Last edited: March 9, 2015
  4. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
  5. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    What's that?

    Cause I think it's icon scale =52.
  6. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    .
    Last edited: March 9, 2015
  7. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    apparently it doesn't do nothing because when I change the value to 52 (and yes leave the > it's weird i dunno why it works) then the selected = TRUE becomes 0 (the last else)
  8. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    .
    Last edited: March 9, 2015
  9. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    Mouseover but not selected: vUVAndExtra.z < -1.0 vUVAndExtra.z == -2.0
    Mouseover and selected: vUVAndExtra.z > 1.0 vUVAndExtra.z == 2.0
    No mouseover but selected: vUVAndExtra.z > 0.0 && vUVAndExtra.z <= 1.5 vUVAndExtra.z == 1.0

    No mouseover, not selected: vUVAndExtra.z < 0.0 && vUVAndExtra.z >= -1.5 vUVAndExtra.z == -1.0
    Feature: vUVAndExtra.z==0.0


    edit: 1.0, not 1.5
    Last edited: March 8, 2015
    tatsujb likes this.
  10. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    The above is correct.

    -2 = hover
    -1 = default
    1 = selected
    2 = hover & selected

    I use abs(v_SelectedState) > 1.5 in the original shader, but abs(v_SelectedState) == 2.0 would of worked as well. In certain implementations of GL floating point numbers can drift a little, so == 2.0 can sometimes fail when it shouldn't, so using greater than at the halfway ensures it works 100% of the time.
    tatsujb, cola_colin and zx0 like this.
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    @bgolus
    @zx0
    OMGOMGOMGOMGOMGOMGOMGOMG


    thannnnnnk youuuuuuuuuuuuuuuu!!!!!

    I would've never guessed it.
  12. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    EDIT: nevermind figured it out using an ugly (but blatant) hack :
    Last edited: March 9, 2015

Share This Page