Skip to content
This repository was archived by the owner on Mar 10, 2019. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

WebGL Parallax mappong

About

This demo shows the parallax offset mapping. It's based on normal mapping and uses an additional heightmap to add more depth to flat surfaces by offsetting the normals depending on the current view vector and scale and bias factors.

Parallax offset mapping for added depth :

Normal mapping :

Notes

If running from your hard drive (at least for Chrome) you need to allow your browser to access files from your disk (XSS).

Chrome : --allow-file-access-from-files

Controls

  • Left mouse button + drag : Rotate model
  • Mouse wheel : Zoom
  • "T" - Toggle between parallax offset mapping and basic normal mapping
  • "N" - Toggle between display of normal map and color map
  • "P" - Toggle animated light

External resources

JavaScript

Content