Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


#define FORCE_ALLOW_DISCARD 1
     blending

Working with Foliage, Skybox and Fog

Because of the 20% minimum alpha value, and because foliage textures would be resized based on your distance from the mesh holding that texture, you would see artifacts of skybox and fog mixed into the edges of your textures, often producing blue rims around leaves and branches.

To get around this, you could pair your TGA or DDS file with a TXI file named the same as the texture.

In that file, you could add the line:

     blending punchthrough

This had the effect of clipping low transparency values at or lower than almost 50% opacity. The opacity of any value higher than 50% was set to 100%.

...

Another method used by Merricksdad was to create a version of punchthrough blending right in the shader.

This had a very similar effect to the TXI version, but allowed a little bit more alpha to remain on the more solid part.

Again it looked like paper cutouts in some uses, but at least allowed you to use normal and spec maps.

Changes in 8193.35

As of preview version .35 we have a new method which somewhat duplicates the old A-node modifications to draw order.

...


     if (FragmentColor.a <= 0.2) discard;

Again, change the ext text of FragmentColor to whatever color-holding vector you are working with in your functions.

...