www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: nima.sh23 on October 07, 2015, 11:07:52 am

Title: write shader
Post by: nima.sh23 on October 07, 2015, 11:07:52 am
I try to use texture splatting, I create a 3d file on blender, set textures and materials on object, export 3d object and shader( by GLSL ), for each material I have shader.
Is it wrong way for use shader on jpct?
How can I write shader for my 3d object?
Title: Re: write shader
Post by: EgonOlsen on October 07, 2015, 01:24:13 pm
So Blender exports a GLSL shader for you?
Title: Re: write shader
Post by: nima.sh23 on October 07, 2015, 02:02:47 pm
Yes, It export for me, but I for each material, I mean, I have 3 materials and 3 vertex and fragment5 files.
Title: Re: write shader
Post by: EgonOlsen on October 07, 2015, 03:09:08 pm
Well, I gave you an example shader for texture splatting in the other thread. I've no idea what exactly Blender exports there, but I'm pretty sure that it won't work on Android anyway and even if it would, it doesn't follow the naming conventions that jPCT-AE uses for shaders (have a look at the GLSLShader documentation for more details). So I would just ignore these shaders and use the one from the example that I gave you. That requires of course that your texture setup matches the shader's requirements.
Title: Re: write shader
Post by: nima.sh23 on October 07, 2015, 04:30:31 pm
Thanks man.