Skip to content
Permalink
Browse files

fix parallaxParallax typo

  • Loading branch information...
illwieckz committed Mar 26, 2019
1 parent d223adc commit a455bcd988ca5454d90351de3d12f4913542b948
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/engine/renderer/glsl_source/reliefMapping_fp.glsl
@@ -273,18 +273,18 @@ vec3 NormalInWorldSpace(sampler2D normalMap, vec2 texNormal, mat3 tangentToWorld
// most of the code doing somewhat the same is likely to be named
// RayIntersectDisplaceMap in other id tech3-based engines
// so please keep the comment above to enable cross-tree look-up
vec2 ParallaxTexOffset(sampler2D normalMap, vec2 rayStartTexCoords, float parallaxParallaxDepthScale, float parallaxParallaxOffsetBias, vec3 viewDir, mat3 tangentToWorldMatrix)
vec2 ParallaxTexOffset(sampler2D normalMap, vec2 rayStartTexCoords, float parallaxDepthScale, float parallaxOffsetBias, vec3 viewDir, mat3 tangentToWorldMatrix)
{
// compute view direction in tangent space
vec3 tangentViewDir = normalize(viewDir * tangentToWorldMatrix);

vec2 displacement = tangentViewDir.xy * -parallaxParallaxDepthScale / tangentViewDir.z;
vec2 displacement = tangentViewDir.xy * -parallaxDepthScale / tangentViewDir.z;

const int linearSearchSteps = 16;
const int binarySearchSteps = 6;

float depthStep = 1.0 / float(linearSearchSteps);
float topDepth = 1.0 - parallaxParallaxOffsetBias;
float topDepth = 1.0 - parallaxOffsetBias;

// current size of search window
float currentSize = depthStep;

0 comments on commit a455bcd

Please sign in to comment.
You can’t perform that action at this time.