Search the Community
Showing results for tags 'sahder'.
-
Hi Guys IM trying to create a water shader from some code I found online, but I having this error , if you guys know how to fix it please let me know how. blow the error and the code
-
hi all i started for make easy shader one years ago i build one design pattern and i work now to refactor this and share it in git hub. i want from any one see my design and have any suggest for me ( change and usage pattern say it)share that here .thanks 1. why problem: we know shader source is a hard to write and debug and not oop and not have template 2.what solution : a: we know we last output is 2 string (vertex , fragment ) we most send parameters too b: we need make string builder 3. design : a: see shader structure // uniforms // attributes // varyings // void main(){ // calculate a vec4 and set to gl_position | gl_FragColor } b: make javascript function for build shader parts we need c: make babylonjs javascript to build a shader material Instance or postprocess inistance // sample of shader usage mesh.material = eash.shader( sh_range({ mat1:sh_solid(0xff0000,1.0) ,mat2:sh_noise({ pos:"pos*.01+vec3( time*0.6,time*0.1,time*0.1)"}) ,start:0 ,end:700 ,dir:'pos.x' }) + sh_frensel({color:0x000000,nrm:flat_nrm }) ); http://185.88.152.218/eash/pub/preview#10202