Where is the terra material->vs/ps assignment?
-
Nickak2003
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
Where is the terra material->vs/ps assignment?
I am studying terra, and am looking for where the terra vertex and pixel shaders are assigned. Is there a material file other than the .material.json that I have overlooked?
-
Lax
- Orc Shaman
- Posts: 725
- Joined: Mon Aug 06, 2007 12:53 pm
- Location: Saarland, Germany
- x 83
- Contact:
Re: Where is the terra material->vs/ps assignment?
Hi,
terra has its own hlms infrastructure. Which is located at: "..\Ogre2.2SDK\Samples\Media\Hlms\Terra".
Vertex and Pixelshader are also located there.
Best Regards
Lax
terra has its own hlms infrastructure. Which is located at: "..\Ogre2.2SDK\Samples\Media\Hlms\Terra".
Vertex and Pixelshader are also located there.
Best Regards
Lax
http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62
-
Nickak2003
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
Re: Where is the terra material->vs/ps assignment?
I know where that stuff is at. I mean, in the C++, I do not see where that stuff is linked, normally a material specifies its vs and ps programs. I do not see where the terra vs/ps. I know where they are in the file structure, but not where they are linked in the c++.
-
Nickak2003
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
Re: Where is the terra material->vs/ps assignment?
Ok, i guess it is through the custom terra-hlms.
- dark_sylinc
- OGRE Team Member

- Posts: 5588
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1413
- Contact:
Re: Where is the terra material->vs/ps assignment?
The vertex and pixel shaders are (do for each backend):
As for the C++ code, the shader is generated and linked by Hlms::compileShaderCode (overload 1) which loops and gathers through all piece files, finally processes VertexShader_vs.glsl/PixelShader_ps.glsl to generate the final shader source code and calls Hlms::compileShaderCode (overload 2) which actually performs gpuProgramManager->createProgram() and then calls gp->load() to compile it.
- Samples/Media/Hlms/Terra/GLSL/PixelShader_ps.glsl
- Samples/Media/Hlms/Terra/GLSL/VertexShader_vs.glsl
As for the C++ code, the shader is generated and linked by Hlms::compileShaderCode (overload 1) which loops and gathers through all piece files, finally processes VertexShader_vs.glsl/PixelShader_ps.glsl to generate the final shader source code and calls Hlms::compileShaderCode (overload 2) which actually performs gpuProgramManager->createProgram() and then calls gp->load() to compile it.