bg2e-js 2.2.3 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bg2e-js.js +1 -1
- package/dist/bg2e-js.js.map +1 -1
- package/package.json +1 -1
- package/src/shaders/webgl/uniforms.glsl +1 -1
- package/src/tools/MaterialModifier.ts +286 -116
package/dist/bg2e-js.js
CHANGED
|
@@ -10013,7 +10013,7 @@ float sampleLightEmission(sampler2D tex, vec2 uv0, vec2 uv1, PBRMaterialData mat
|
|
|
10013
10013
|
vec3 sampleNormal(sampler2D tex, vec2 uv0, vec2 uv1, PBRMaterialData mat, mat3 TBN)
|
|
10014
10014
|
{
|
|
10015
10015
|
vec2 uv = mat.normalUVSet == 0 ? uv0 : uv1;
|
|
10016
|
-
vec3 normal = texture2D(tex, uv).xyz * 2.0 - 1.0;
|
|
10016
|
+
vec3 normal = texture2D(tex, uv * mat.normalScale).xyz * 2.0 - 1.0;
|
|
10017
10017
|
return normalize(TBN * normal);
|
|
10018
10018
|
}
|
|
10019
10019
|
|