Home

Awesome

WebFX - online TressFX model viewer (Demo - Chrome recommended, see FAQ below)

This is a web viewer for .tfx AMD TressFX hair/fur file format. It also features a lot of modern rendering effects, so be sure to check out the code!

webfx-github-showcase

What is this?

A few months ago I've ported AMD's TressFX hair rendering/simulation library to OpenGL. Turns out that WebGL 2.0 offers enough capabilities to display .tfx file in the browser. This, combined with some modern rendering techniques like SSSSS, PBR, HDR makes for quite interesting demo project.

Use the [W, S, A, D] keys to move and [Z, SPACEBAR] to fly up or down. Click and drag to rotate the camera (be careful around the UI). All materials, effects and rendering techniques are configurable using the UI on the right side of the screen.

Usage

  1. yarn install
  2. yarn start <- dev server
  3. go to localhost:9000

Alternatively, yarn build for production build, outputs will be in dist folder.

FAQ

Q: Which effects are implemented?

Q: What to do if it does not work?

This demo uses a lot of different rendering techniques and sometimes WebGL does not keep up. If the scene renders incorrectly (e.g. no hair on firefox) there is nothing I can do. Baseline is support for WebGL 2.0, which has 55% adoption rate. All we really need are features like:

See also last question about my hardware config.

Q: Shadow controls stopped working?

This sometimes happens, but I don't think it's related to my code. For some reason, shadow depth map is rendered incorrectly/does not update. Checking 'Show dbg' in 'Shadow' section on UI fixes the problem (even though all it does is renders debug view on top of final image). BTW. debug depth map on the right is for SSSSS.

Q: How can I improve performance?

Uncheck Use MSAA. You can also play with SSAO settings, but the gains are limited. I did not focus much on performance, works 60fps for me (unless super close-up).

Q: That's a lot of code

Most of the code comes from other project I'm working on. Interesting snippets:

Q: Why Sintel?

If You know me, You probably know why I like Sintel so much.

Q: Your PC?

GTX 1050 Ti, Driver 398.36, Windows 10, Chrome 74.0.3729.13

Honorable mentions and other 3rd party stuff