UPDATED: Convert GLSL ThreeJs Shader to Babylon Shader (See comment)
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Both ThreeJs and BabylonJs use the same shader language: GLSL.
The only difference is that the ThreeJS inserts different uniforms and varying to simplify the writing of the shader and uses a class to wrap all code: new THREE.ShaderMaterial.

Please convert the following code from ThreeJS to BabylonJs.
Code to convert: https://pastebin.com/V2AajMyy

You can test your code on http://editor.babylonjs.com/

...and use the
Tools->Material Builder which lets you test GLSL code for Babylon.

Useful reference: https://github.com/mrdoob/three.js/blob/master/src/materials/ShaderMaterial.js
You can use this file to understand how ThreeJS shader differs from Babylon shaders in general.

I found a VERY similar code to what I want to achieve, native to babylon: http://cyos.babylonjs.com/ With this link I think it would be easy for anyone to do a complete conversion of my code
georgefountain over 1 year ago
awarded to Chlegou

Crowdsource coding tasks.

1 Solution

Winning solution

This link might help you: https://www.clicktorelease.com/blog/creating-spherical-environment-mapping-shader/

i think this is what you are actually looking for.