Skip to content

Commit

Permalink
Do not flip back face normals on Oblivion/FO3/NV/Skyrim meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
fo76utils committed Jan 6, 2025
1 parent 17cbb7d commit b6f82f6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions res/shaders/ob_default.frag
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ void main( void )
vec4 normalMap = texture2D( NormalMap, offset );

vec3 normal = normalize( normalMap.rgb * 2.0 - 1.0 );
if ( !gl_FrontFacing )
normal *= -1.0;

vec3 R = reflect( -L, normal );
vec3 H = normalize( L + E );
Expand Down
2 changes: 0 additions & 2 deletions res/shaders/sk_default.frag
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ void main( void )
vec4 glowMap = texture2D( GlowMap, offset );

vec3 normal = normalize(tbnMatrix_norm * (normalMap.rgb * 2.0 - 1.0));
if ( !gl_FrontFacing )
normal *= -1.0;

vec3 L = normalize(LightDir);
vec3 R = reflect(-L, normal);
Expand Down
2 changes: 0 additions & 2 deletions res/shaders/sk_multilayer.frag
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ void main( void )
vec4 normalMap = texture2D( NormalMap, offset );

vec3 normalTS = normalize(normalMap.rgb * 2.0 - 1.0);
if ( !gl_FrontFacing )
normalTS *= -1.0;
vec3 normal = normalize(tbnMatrix * normalTS);

// Sample the non-parallax offset alpha channel of the inner map
Expand Down

0 comments on commit b6f82f6

Please sign in to comment.