The Snow Irbix Posted August 11, 2015 Share Posted August 11, 2015 Hello everyone ! I wanted to show you a problem with multitexturing and Heightmap, when I notice that the Heightmap Custom example of the Playground http://www.babylonjs-playground.com/ doesn't work. It seems to have an issue with the shader. Also my problem is that getTotalVertices of a Ground (From Heightmap) return 0. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 11, 2015 Share Posted August 11, 2015 Hey! Works well for me Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted August 11, 2015 Author Share Posted August 11, 2015 Both ? Logs from Babylon Playground :[18:50:50]: Error: ERROR: 0:560: '=' : cannot convert from 'const int' to 'mediump float'[18:50:50]: Defines: #define LIGHT0 #define POINTDIRLIGHT0 #define NORMAL #define UV1[18:50:50]: Fragment shader:default[18:50:50]: Vertex shader:default[18:50:50]: Unable to compile effect:[18:50:50]: Error: ERROR: 0:560: '=' : cannot convert from 'const int' to 'mediump float'[18:50:50]: Defines: #define DIFFUSE #define LIGHT0 #define POINTDIRLIGHT0 #define NORMAL #define UV1[18:50:50]: Fragment shader:default[18:50:50]: Vertex shader:default[18:50:50]: Unable to compile effect:[18:50:48]: Error: ERROR: 0:558: '=' : cannot convert from 'const int' to 'mediump float'[18:50:48]: Defines: #define LIGHT0 #define POINTDIRLIGHT0 #define NORMAL[18:50:48]: Fragment shader:default[18:50:48]: Vertex shader:default[18:50:48]: Unable to compile effect:[18:50:48]: Babylon.js engine (v2.2.0-alpha) launched[18:50:45]: Babylon.js engine (v2.2.0-alpha) launched Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 11, 2015 Share Posted August 11, 2015 Try to clear your cache The Snow Irbix 1 Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted August 11, 2015 Author Share Posted August 11, 2015 Obviously ! It was the cache, now it works ! Also, come back to my first problem, how can we apply multitexture on Heightmap ? http://www.babylonjs-playground.com/#1IDXJ3 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 11, 2015 Share Posted August 11, 2015 The problem you are facing is due to async: CreateGroundFromHeightMap uses a texture to create the mesh so it will first load it. You have to check mesh.isReady() before trying to get the number of vertices The Snow Irbix 1 Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted August 11, 2015 Author Share Posted August 11, 2015 Okay, thank you, I will try this ! GameMonetize 1 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.