How did cycles manage to be one of the most flexible and advanced renderers? One of the major reasons is the OSL implementation that made almost every shader possible to be recreated in Cycles and merged easily with the existing node materials or even other OSL shaders, making almost everything possible.
So, why not do the same thing within BI/BGE GLSL? So instead of making material shaders and applying them the ordinary way (shader.setSource(…)), making them as a script node in material node editor so you’d have the ability to create inputs, color / value outputs and possibly read-only from bge data (game properties, positions, …etc).
- Solution for the lack of BGE-available inputs in material node editor.
- Ability to mix various custom shaders with existing blender materials which would open up possibilities for getting every shader to interact / generate from existing blender materials.
- Ability to modify textures and generate procedural textures.
- Ability to loop through specified lists so you can for example create a new lighting system without having to douplicate nodes for each individual lamp.
- It’s possibly a very long term goal.
- The existing GLSL shaders will have to be re-adapted to work inside a node with the sufficient inputs and outputs.
Tried to make this as short as possible, discuss.