playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 423 B
TypeScript
declare const _default: "\nuniform float material_heightMapFactor;\n\nvoid getParallax() {\n float parallaxScale = material_heightMapFactor;\n\n float height = texture2DBias($SAMPLER, $UV, textureBias).$CH;\n height = height * parallaxScale - parallaxScale*0.5;\n vec3 viewDirT = dViewDirW * dTBN;\n\n viewDirT.z += 0.42;\n dUvOffset = height * (viewDirT.xy / viewDirT.z);\n}\n";
export default _default;