mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
floodfill offset geo-normal check
This commit is contained in:
parent
d5a0c9ddfc
commit
0886fb0916
@ -722,7 +722,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IS_LPV_ENABLED
|
#ifdef IS_LPV_ENABLED
|
||||||
vec3 normalOffset = 0.5*worldSpaceNormal;
|
vec3 normalOffset = vec3(0.0);
|
||||||
|
|
||||||
|
if (any(greaterThan(abs(worldSpaceNormal), vec3(1.0e-6))))
|
||||||
|
normalOffset = 0.5*worldSpaceNormal;
|
||||||
|
|
||||||
#if LPV_NORMAL_STRENGTH > 0
|
#if LPV_NORMAL_STRENGTH > 0
|
||||||
if (any(greaterThan(abs(normal), vec3(1.0e-6)))) {
|
if (any(greaterThan(abs(normal), vec3(1.0e-6)))) {
|
||||||
|
@ -1057,7 +1057,10 @@ void main() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IS_LPV_ENABLED
|
#ifdef IS_LPV_ENABLED
|
||||||
vec3 normalOffset = 0.5*viewToWorld(FlatNormals);
|
vec3 normalOffset = vec3(0.0);
|
||||||
|
|
||||||
|
if (any(greaterThan(abs(FlatNormals), vec3(1.0e-6))))
|
||||||
|
normalOffset = 0.5*viewToWorld(FlatNormals);
|
||||||
|
|
||||||
#if LPV_NORMAL_STRENGTH > 0
|
#if LPV_NORMAL_STRENGTH > 0
|
||||||
vec3 texNormalOffset = -normalOffset + slopednormal;
|
vec3 texNormalOffset = -normalOffset + slopednormal;
|
||||||
|
Loading…
Reference in New Issue
Block a user