Loading...

OpenGL Water Tutorial 8: Soft Edges (FINAL)

15,844 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Aug 22, 2015

Final episode of the tutorial series about programming 3D water using OpenGL!

Smoothing up those hard water edges this week!

DuDv Map and Normal Map:
https://www.dropbox.com/sh/z21kj5s448...

Conversion Code:
https://www.dropbox.com/s/4b0xv8crvn6...

Conversion Explanations:
http://web.archive.org/web/2013041619...
http://stackoverflow.com/questions/66...

gl_FragCoord:
https://www.opengl.org/sdk/docs/man/h...

One thing I didn't mention: if you want to make deeper water look murky then you can add something like this into the fragment shader:
refractColour = mix(refractColour, murkyWaterColour, clamp(waterDepth/60.0, 0.0, 1.0));


Common Problems:

-If the edges of the water quad look a bit glitchy and jagged (especially when you zoom out with the camera) then you may have a problem with the precision of the depth buffer. This can be fixed by increasing the NEAR_PLANE value of your projection matrix in the MasterRenderer, or by changing "new PixelFormat()" to "new PixelFormat().withDepthBits(24)" when creating the display.


Series Overview:

1. Introduction
2. Rendering to textures
3. Clipping planes
4. Projective texturing
5. Du Dv Maps
6. Fresnel Effect
7. Lighting
8. Depth Effects

Tumblr: http://thinmatrix.tumblr.com/
Facebook Page: https://www.facebook.com/thinmatrix
Instagram: http://instagram.com/thin_matrix
Twitter: https://twitter.com/ThinMatrix
Pinterest: https://uk.pinterest.com/thinmatrix/
Check out my game on IndieDB: http://www.indiedb.com/games/socuwan

Contact me: thinmatrix@gmail.com

End of video music- Kai Engel, "Waking Stars":
http://freemusicarchive.org/music/Kai...

  • Category

  • License

    • Standard YouTube License

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...