[Bf-committers] License of Blender GLSL shaders for game assets?

Alberto Torres kungfoobar at gmail.com
Fri Dec 22 21:09:18 CET 2017


For the last few years I've been developing and using an open source game
engine called myou-engine[0] <http://myou.cat/#engine/features/editor>[1]

It's probably the first WebGL engine that supports Blender GLSL materials,
as early as 2013 after a month of development. It uses the BPY function
gpu.export shader() for that, modifying the exported library to support

This year I've started adding support for Blender PBR branch[2]
<http://www.clement-foucault.com/#blender_pbr> since Eevee is still too
unstable. The exported shader doesn't have the actual shader it uses, but
the classic Cycles preview. So I made a code generator from nodes.

Here[3] <http://pixelements.net/share/vokoscreen-2017-12-20_16-08-12.mp4>
you can see a recording of a test scene with PBR shaders. And if you have a
recent enough GPU you can see it in your browser with low[4]
<http://pixelements.net/myou/examples/room_low/> or high[5]
<http://pixelements.net/myou/examples/room_hi/> resolution textures. (Takes
5-15s to load; ignore the bad SSAO which I'll rewrite today)

Other than optimizing the scene itself[6], the next step is shader
optimization and starting adding Eevee features. For that I can't use the
shaders with small substitutions here and there, but instead I would need
to include modified shaders with the engine itself.

The problem is that I would like to keep the engine with a MIT license or
similar where engine users can create commercial games, and the vast
majority of potential users would avoid it if the shaders may be GPL. I
remember a thread in this list where Ton said that shaders are public
domain or similar since they're mostly taken from public sources, but I
can't find it. This is also an issue even if I don't include the shaders
with the engine.

While I can probably make do without Blender shaders, I would like to stay
in sync with Blender features to be able to contribute back, esp if I add
new features shared by both Blender and myou-engine, such a GLSL debugger
that helped me a lot to figure out differences and problems in shaders (the
patch is for PBR branch).

This question is both for Blender trunk/2.8 and for Clément Foucault's PBR
branch. It would be nice to have a license text in the shaders directory.

[0] http://myou.cat/#engine/features/editor (web in construction)
[1] https://github.com/myou-engine/myou-engine
[2] http://www.clement-foucault.com/#blender_pbr
[3] http://pixelements.net/share/vokoscreen-2017-12-20_16-08-12.mp4
[4] http://pixelements.net/myou/examples/room_low/
[5] http://pixelements.net/myou/examples/room_hi/
[6] Polycount is absurdly high and has no LoD levels. The scene is
originally designed for Cycles. It was downloaded from BlendSwap and has
CC-BY or CC0 license, but I can't find it right now.


More information about the Bf-committers mailing list