NasimiAsl Posted January 14, 2018 Share Posted January 14, 2018 hi i make this post for share some unexpected experience in shader code you can see a lot but you can fix it easly meteoritool and JackFalcon 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 14, 2018 Author Share Posted January 14, 2018 about variable when you use variable in shader code you most careful when you wanna use it in mathematical formula float a = 10; position.x = -a ; // return "a" value in some of android system position.x = -1.0*a ; // correct usage JackFalcon, adam and waverider 3 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 14, 2018 Author Share Posted January 14, 2018 different between integer and float when you wanna make shader string in javascript var a = 4; shaderCode = "position.y = "+a+";"; // shader dont be compiled because you set integer value to float shaderCode = "position.y = float("+a+");"; //correct usage JackFalcon and waverider 2 Quote Link to comment Share on other sites More sharing options...
JackFalcon Posted January 14, 2018 Share Posted January 14, 2018 How to debug WebGL? How did you catch such errors? Quote Link to comment Share on other sites More sharing options...
waverider Posted January 14, 2018 Share Posted January 14, 2018 Goood! added more to my think tank : ) JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 14, 2018 Author Share Posted January 14, 2018 you have error but step debug i don't think so ( don't ask so complicated question please ) IOS ( iphone ) have much lower than uniform count Compared with android system JackFalcon and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 14, 2018 Author Share Posted January 14, 2018 manage pointed size and shape by discard http://www.babylonjs-playground.com/#OCR2S#25 gl_PointCoord that parameter same as UV for each point that is between (0,0) and (1,1) adam 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 16, 2018 Share Posted January 16, 2018 Excellent idea!! NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 16, 2018 Share Posted January 16, 2018 because a float has to have a . On 1/13/2018 at 11:12 PM, NasimiAsl said: about variable when you use variable in shader code you most careful when you wanna use it in mathematical formula float a = 10; position.x = -a ; // return "a" value in some of android system position.x = -1.0*a ; // correct usage float a = 10.; position.x = -a; should validate Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 16, 2018 Author Share Posted January 16, 2018 6 minutes ago, Pryme8 said: because a float has to have a . float a = 10.; position.x = -a; should validate i saw that happen in some of android i can make some list of device ( samsung graphic cards for mobile ) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 16, 2018 Share Posted January 16, 2018 hmm is it experimental webGL enabled only then or something? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 16, 2018 Author Share Posted January 16, 2018 for make good test i show you some list ( i reset chrome setting and saw it in samsung j7 ) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 16, 2018 Share Posted January 16, 2018 That's a pretty decent phone. Hmm... did it do it even when you had the decimal place defined on the float? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 20, 2018 Author Share Posted January 20, 2018 you can control more than face pixel (i can't control it yet but i try ) https://www.babylonjs-playground.com/#L3PEXN#4 https://www.babylonjs-playground.com/#L3PEXN#5 Wingnut and JackFalcon 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted April 7, 2018 Author Share Posted April 7, 2018 some time that not have same result when A and B type is diffrent A * B and B * A we always look like both is variable in code but for math this is important who most used first for example world is a mat4 and pos is a vec3 ( world * vec4(pos,1.) ).xyz ( vec4(pos,1.) * world ).xyz look line 61 and 62 and look left and right side of separator http://www.babylonjs-playground.com/#WPM24S#3 *notice look on sphere's Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 7, 2018 Share Posted April 7, 2018 That is odd, I tried to mess around with the OOPs and make sure everything was in line and it seemed to be. No clue sorry >_<. 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.