royibernthal Posted April 6, 2018 Share Posted April 6, 2018 I'm trying to provide a way online for shader coders to test their shaders on scenes from a game I'm working on. Naturally CYOS will be used: http://cyos.babylonjs.com/ 1) I'm creating a ShaderMaterial that uses data stored in ShadersStore, like in here: http://www.babylonjs-playground.com/#1IUU00#1 Is it possible to pass a ShaderMaterial to a custom PostProcess instead of a url? https://doc.babylonjs.com/how_to/how_to_use_postprocesses#custom-postprocesses 2) My final goal is to create an underwater shader (water breaking light, bubbles, etc) in which the game's models are submerged - is PostProcess the right way to go? 3) Can CYOS be used to test a full screen post process? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2018 Share Posted April 6, 2018 1. You can still rely on blob: var blob = new Blob([buffer]); var blobURL = URL.createObjectURL(blob); 2. probably 3.Not directly royibernthal 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted April 7, 2018 Share Posted April 7, 2018 http://www.babylonjs-playground.com/#WPM24S#7 under progress royibernthal 1 Quote Link to comment Share on other sites More sharing options...
royibernthal Posted April 10, 2018 Author Share Posted April 10, 2018 Deltakosh - Regarding your first point - a. How do I pass both vertex and fragment shaders as a single URL? Does that URL point to a directory containing both shaders? If so, can blob still help? b. Do I need to translate the string into a Buffer somehow? NasimiAsl - It'd be great if you could pull this off Quote Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2018 Share Posted April 10, 2018 a. Postprocess only requires one shader (only fragment) b: If you have a string you can then create a DOM element and store it inside or simply use the string directly: https://www.babylonjs-playground.com/#DAC1WM Quote Link to comment Share on other sites More sharing options...
royibernthal Posted April 11, 2018 Author Share Posted April 11, 2018 Got it, thanks 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.