Info

Statistics

  • Download count965 total downloads
  • Latest download count 817 downloads of latest version
  • Average download count1 downloads per day average

Owners

ParallaxMap

Parallax Mapping based on depth map

Parameters:

  • ViewXPosition (0-1)
  • ViewYPosition (0-1)
  • ViewZPosition (0-1)
  • HeightScale (0-1) (scale height of depthmap impact on parallax effect)
  • WindowXResolution (pixels) (current window X resolution, must change if window size changes)
  • WindowYResolution (pixels) (current window Y resolution, must change if window size changes)

Effect based on simplest implementation of: https://learnopengl.com/Advanced-Lighting/Parallax-Mapping.

See example for the format of the depth map. It must be included in the same image as the base map, offset to the right at the same resolution. The 'R' channel of the depth map is used to represent the depth.