Add r_parallaxMapOffset.
This commit is contained in:
1 parent
66cb20a7f3
commit
69ec389335
5 files changed
+14
No files matched your search
@@ -89,6 +89,9 @@ float RayIntersectDisplaceMap(vec2 dp, vec2 ds, sampler2D normalMap)
|
||||
// current size of search window
|
||||
float size = 1.0 / float(linearSearchSteps);
|
||||
|
||||
// adjust position if offset above surface
|
||||
dp -= ds * r_parallaxMapOffset;
|
||||
|
||||
// current depth position
|
||||
float depth = 0.0;
|
||||
|
||||
@@ -142,6 +145,7 @@ float RayIntersectDisplaceMap(vec2 dp, vec2 ds, sampler2D normalMap)
|
||||
#endif
|
||||
|
||||
return bestDepth;
|
||||
return bestDepth - r_parallaxMapOffset;
|
||||
}
|
||||
|
||||
float LightRay(vec2 dp, vec2 ds, sampler2D normalMap)
|
||||
|
||||
Reference in new issue
Block a user