Looking for a shader with...

Discussion in 'Car Modding' started by Bjørn, Jun 23, 2016.

  1. Bjørn

    Bjørn Registered

    Joined:
    Oct 4, 2010
    Messages:
    1,821
    Likes Received:
    919
    A shader with alpha channel controlled transparency
    but NOT reflections controlled by the alpha channel...

    Is there such a thing?
     
  2. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Any shader that doesn't have 'Add Alpha Reflect' will work. Just set the source and destination blends to 'Src Alpha' and 'Inv Src Alpha' respectively.
     
  3. Bjørn

    Bjørn Registered

    Joined:
    Oct 4, 2010
    Messages:
    1,821
    Likes Received:
    919
    Thanks for the reply... I'm using cube map specular map T1 (CMAPSPECMAPT0) diffuse lighting, cube map, spec map, tex1. I guess this should work. It doesn't though.

    My issue is I have everything pretty much on point by now, apart from the windows not doing what I want them to.

    It's glass so naturally I want it to reflect... But it has an alpha that determines the reflectiveness and solidness of the glass at the same time.

    [​IMG]
    As you can see the black border, not supposed to be transparen, around the glass (not the rubber seal) is super reflective compared to the transparent glass. I thought fine, I'll just try and make the border less than 255 in the alpha, but then it of course becomes transparent.

    It makes me want to kill kittens :/
     
  4. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    OK, now your question makes sense :) .
    You could split that behaviour by using the "Bump Cube Specular Map Add Specular Reflect T1" shader. Reflections will be modulated by spec alpha; diffuse alpha only controls transparency.
     
  5. Bjørn

    Bjørn Registered

    Joined:
    Oct 4, 2010
    Messages:
    1,821
    Likes Received:
    919
    Thanks, I will try that, I will let you know if I can make it work decently :)
     
  6. Bjørn

    Bjørn Registered

    Joined:
    Oct 4, 2010
    Messages:
    1,821
    Likes Received:
    919
    Yeah it does not work... In fact it's become much, much worse... Kittens...

    [​IMG]

    [​IMG]

    As you can see it's chrome now... Makes 0 sense all this to me.

    [​IMG]

    It's like the spec map alpha does absolutely nothing. It's still like it's using the main textures' alpha channel.

    EDIT: Cube Blend is on 5 - not that it seems to do anything though...
     
    Last edited by a moderator: Jun 24, 2016
  7. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Hmmm, all tracks use this shader for see-through glass ...
    Try playing with the Fresnel Reflect values (0.004; 0.5; 5.0 for instance)? This particular shader expects lower values by design.
     

Share This Page