Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
vec3 normal; // normals w/ normalmap
bool frontFacing; //gl_FrontFacing
float depth;
mat3 tbnMat;

// from texture
vec3 albedo;
Expand All @@ -36,4 +37,4 @@
#endstruct
#define PBRSurface StdPBRSurface
#endif
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
#if defined(NORMALMAP) || defined(PARALLAXMAP)
vec3 tan = normalize(wTangent.xyz);
mat3 tbnMat = mat3(tan, wTangent.w * cross( surface.geometryNormal, tan), surface.geometryNormal);
surface.tbnMat = tbnMat;
#endif

vec2 newTexCoord;
Expand Down Expand Up @@ -338,7 +339,7 @@
#endif
surface.normal = normalize(tbnMat * normal);
#else
surface.normal = normal;
surface.normal = surface.geometryNormal;
#endif

//spec gloss tex reads:
Expand Down Expand Up @@ -589,4 +590,4 @@
#endif


#endif
#endif
Loading