javalang Posted August 7, 2017 Share Posted August 7, 2017 Hi there, I did some comparison between StandardMaterial and PBRMaterial and found an odd effect with the level of the bumpTexture : setting this level to one, both materials have near the same "bump-amplitude" but lowering this value to zero seems to have no effect on the PBRMaterial, see playground. Any ideas, bug? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 7, 2017 Share Posted August 7, 2017 In the pbr material the normal map level is used to scale only the xy coordinates as it is defined in gltf and thanks to you I figured an issue in the scale code, the fix should be in soon but will still be different from the standard one so I will also add a parameter to help you scale bump like the standard material. vec3 map = texture2D(bumpSampler, uv).xyz; map.x = vNormalReoderParams.x + vNormalReoderParams.y * map.x; map.y = vNormalReoderParams.z + vNormalReoderParams.w * map.y; #ifdef NORMALXYSCALE map = normalize(map * vec3(vBumpInfos.y, vBumpInfos.y, 1.0)); #endif javalang and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 7, 2017 Share Posted August 7, 2017 The fix will be available in the PG tomorrow. Quote Link to comment Share on other sites More sharing options...
javalang Posted August 8, 2017 Author Share Posted August 8, 2017 @Sebavan Thank you very much , works well now. The fix is in "src/Shaders/ShadersInclude/bumpFragmentFunctions.fx", right? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 8, 2017 Share Posted August 8, 2017 yup and bumpFragment.fx if I remember well :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.