Home Technical Talk

My Fog Shader

polycounter lvl 9
Offline / Send Message
Reverenddevil polycounter lvl 9
Can anyone show me why my fog shader is not working when i plug the bottom part into my opacity channel? I am trying to use depth biased alpha but it is not working for me. Thanks for the[IMG]file:///C:/Documents%20and%20Settings/Damien/Desktop/Fog/brokenshader.jpg[/IMG] help..

brokenshader.jpg

Replies

  • Farfarer
    Options
    Offline / Send Message
    The problem is that you're plugging a float3 into a slot that expects a float.

    Because you're using the RGB of that texture up top, it's giving you a float3 result the whole way down the chain.

    Try changing it from RGB to R (it looks like a greyscale texture, so it shouldn't make a difference).
  • rebb
    Options
    Offline / Send Message
    rebb polycounter lvl 17
    Also, afaik Fog Shader Materials only need to write to the Emissive Slot ( not related to your problem ).
  • Reverenddevil
    Options
    Offline / Send Message
    Reverenddevil polycounter lvl 9
    what do I need to do to change it to R instead of RGB?
    Ok I figured it out I think, I just used the red channel and plugged that in everywhere it needed. My second question now is that I am getting a hard edge on the material/mesh. What would be the best way to not have that hard edge?
Sign In or Register to comment.