Game Development Community

TGEA legacy terrain lighting

by Steven Chiu · in Torque Game Engine Advanced · 09/30/2008 (5:32 am) · 2 replies

I need to adjust lighting, of the sun, for legacy terrain in TGEA 1.7.1 and wondering where is the shader to render the terrain? Also where is the code that I can pass the variables of the shaders need?

#1
09/30/2008 (5:43 am)
Quote:
where is the shader to render the terrain?

Legacy uses the Atlas blender, so it's in two spots:
shaders/legacyTerrain
shaders/atlas

Quote:
Also where is the code that I can pass the variables of the shaders need?

Inside terrRender.cpp or terrBatch.cpp, probably in the end () function. Search for "ShaderParam".
#2
09/30/2008 (9:35 am)
I put the shader variable setting code in various places and the terrain rendering seems not exactly what I expect.
Some part of the terrain is lit and other parts are dark. Just wondering if the clipmap cause this?