mpatton Posted April 17, 2012 Report Share Posted April 17, 2012 (edited) Hi,I'm kind of new to 0 A.d. and was looking for a little help. I've been working on some terrain deformation test code in a opengl/glsl program I wrote that I would like to try and port into 0 a.d. for some testing. My terrain manipulation code is applied to terrain vertices in the vertex shader, so I have been looking for where terrain rendering is past to the shader in 0 a.d. I believe it is done in TerrainRender.cpp - CShaderProgramPtr shaderBase(shaderManager.LoadProgram("terrain_base", defBasic)); where the terrain shader is set, however I can't seem to find the actual vertex and fragment code for the shader. I've been looking for hours now and can't seem to find it any where. Any help as to where I can locate the vertex and fragment code for where the terrain is rendered would be greatly appreciated.thanks in advanceMichaelMay have found it... terrain_common.vp Edited April 17, 2012 by mpatton Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted April 17, 2012 Report Share Posted April 17, 2012 The shader code is in binaries/data/mods/public/shaders/ in SVN, though if you're using one of the alpha releases you'll have to look inside the installed public.zip to find it. It looks like you're using a slightly old TerrainRenderer.cpp either way - there were quite a few changes to the shader system recently so files might be in different places if you don't update to the latest SVN version.In the current SVN, shaders/arb/terrain_common.vp is the default vertex shader, or if you open the in-game console (F11, I think) and enter "renderer.preferGLSL=true" (or put preferglsl=true in the config file) then it'll use the GLSL version instead. There's also a bit of high-level documentation that may be relevant (though terrain uses shader effects directly, it doesn't use materials, so ignore that part). Quote Link to comment Share on other sites More sharing options...
feneur Posted April 17, 2012 Report Share Posted April 17, 2012 [...] (F11, I think)[...]F11 opens the profiler unless it's been changed very recently F9 opens the console though Quote Link to comment Share on other sites More sharing options...
mpatton Posted April 18, 2012 Author Report Share Posted April 18, 2012 Awesome, it works thanks so muchMichael Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.