javalang Posted February 27, 2016 Share Posted February 27, 2016 Hi, I'm experimenting with fragment shaders and would like to ask if there is a workaround for inputting statements like "#extension GL_OES_standard_derivatives : enable" in the playground, which results in a syntax error? In CYOS such statements are accepted, so it's not a big topic for primary shader tests. BTW, I'm a new user and I enjoy this forum, it helped me a lot for the first steps learning babylonjs, thanks to all of you for the great effort for this amazing project! My first shader results: http://www.babylonjs-playground.com/#26UUE1#19 have fun Johann jerome 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 28, 2016 Share Posted February 28, 2016 Hello and welcome you should try with a '\n' after your extension line: http://www.babylonjs-playground.com/#26UUE1#21 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 28, 2016 Share Posted February 28, 2016 Other interesting think, new browsers now support string template literals:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals This is UTTERLY useful for shaders: (look what I did for shader customFragmentShader: http://www.babylonjs-playground.com/#26UUE1#23 jerome 1 Quote Link to comment Share on other sites More sharing options...
javalang Posted February 28, 2016 Author Share Posted February 28, 2016 Oh indeed, that's really helpful, thank you. Quote Link to comment Share on other sites More sharing options...
jerome Posted February 28, 2016 Share Posted February 28, 2016 wwaaaoowww will there be a dedicated syntax enlightning in the PG editor then ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 28, 2016 Share Posted February 28, 2016 Not yet but funnily the PG considers it as JS so you get a first set of syntax coloring Quote Link to comment Share on other sites More sharing options...
jerome Posted February 28, 2016 Share Posted February 28, 2016 yep, that's what I noticed 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.