3d - Using depth buffer to make water edge soft -


I want to make soft edge water. So I created a render target to keep the depth of the scene, and then I render the geometry of water.

and water to the alpha = (visible dipeth - waterdepp) * scale

Given the results of the chart given below, the edge of the water will be softened But it looks awkward like a ladder.

So how to deal with it?

Thanks a lot!

water alpha

I've been working on a similar issue recently.

I use transparency to soften the edges

To use the depth of water to determine the alpha value, I am between 0.75 F and 1.0 F Use HLSL and function to return ambiguity value:

  // color whatever your light equations can be float 3 color = (R, G, B); If (Seedet & lt; = 0.2f) sacrifice; Float opacity = depression (lube (0. F, 12 F, C dipeth), .75 F, 1. F); Return float 4 (color .x, opacity);    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -