Hi,
For our game we need a animated scifi wormhole portal that really looks good. We created a texture atlas with a real cool animation. For best effect we want to blend between different pictures from this atlas. I understood that for this we would need to write our own shader chunk.
Normally I would not even dare to think about that. But until now we managed to do (for us) rather complex things in PlayCanvas thanks to the clean API and lots of help from this forum. So why not give it a try? I studied the OpenGL shader language. Not to difficult for a C programmer.
The biggest problem is that there is very little documentation about the shader chunk system. So even to get started we would need some help.
We do not want to write a complete fragment shader. I guess it is better to adapt a fragment shader that already does some things we need. But the standard shader may already be to complex to adapt.
To render the wormhole effect we only need diffuse and emission. No metalic or reflections. But we may want to use parallax mapping (or add that later ourselve?).
So what is the best way to start?
Some questions:
- Which version of the OpenGL shader language is supported / is used?
- We need transparency in the textures. What are the consequences of that?
- Is there any demo that swaps the fragment shader with a custom one?
- Can we use the standard shader and adapt it (or does it consist of more then one pieces?)
- Is it best to give our object already some textures so that we only have to change the textures?
- Or is it best to begin without any texture and add them by software?
Maybe these questions make no sense. But that is because we probably do not understand the chunk system and will have to learn that.