Pryme8 Posted November 21, 2017 Share Posted November 21, 2017 I see the method setArray3 but I assume thats for vector3 arrays I do not see a method for vector2's I need to be able to fill this in: #ifdef SHEETS uniform sampler2D sprites[SHEETS]; uniform vec2 inverseSheetSizes[SHEETS]; #endif I use: _setSheets : function(){ this.shader.setTextureArray('sprites', this._assignedSheets); }, To set the texture array, now I am looking to set the inverseSizes (which I store on the texture) at the same time so effectively: _setSheets : function(){ var ia = []; for(var i=0; i<this._assignedSheets; i++){ ia.push(this._assignedSheets.inverseSize);} this.shader.setTextureArray('sprites', this._assignedSheets); this.shader.setArray2('inverseSheetSizes', ia); },But I cant find any information on how to set a array of vector2's Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 21, 2017 Author Share Posted November 21, 2017 I was looking over https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/babylon.shaderMaterial.ts And it does not look like there is even a method for it... I will fix that! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 21, 2017 Author Share Posted November 21, 2017 Created pull request. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2017 Share Posted November 21, 2017 And merged Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 29, 2017 Author Share Posted November 29, 2017 @Deltakosh, what CDN link do I use to have access to the build that would have this? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 30, 2017 Share Posted November 30, 2017 https://preview.babylonjs.com/babylon.js preview points straight to dist/preview release from the preview branch of the repo in github Pryme8 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.