Hi all
Everyone knows here that Cycles shaders can’t be exported. Apparently, it is not entirely true : Indeed, if we consider that the Godot shading language is (very) close to GLSL, maybe it is possible to export Cycles shaders to this shading language. So I found this Python script for Blender:
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Game_Engine/Export_GLSL
Seems to works perfectly in Blender and the script export 2 files from the material:
- a .frag file
- a .vert file
I tried to copy/paste the content of both files into the Godot shader editor, but it did not work (not surprised, It would have been too nice). In my case, it displays:
Unknow identifier in epression: uv1_scale
It is linked to this line of code:
UV=UV*uv1_scale.xy+uv1_offset.xy;
(I’m almost sure it is just a first error among others)
Is there someone who could explain a method (for noobs) for it to work?
Edit: And as this script is under GPLv3 license, I hope it will be usefull for Godot coders to implement a proper import/export in future versions :smiley: