Game Development Community

Applying glow buffer to terrain and skybox, How?

by Tom · in Torque Game Engine Advanced · 11/10/2008 (9:51 am) · 2 replies

Hello everyone

i am in need of some assistance

over the last 8 days, i have been trying to apply the glow shader to the terrain and the skybox

for the terrain i came up with this code after reading a few old posts, and an old doc, and the new documentation

new Material(floorGlow)
{
   mapTo = "floor";
   baseTex[0] = "./floor";

   glow = true;
};
addMaterialMapping("floor", "material: floorGlow");

the terrain is painted using a tile called floor, so i think it should work, but sadly it doesnt :(

i am trying to use the glow shader that you can apply to normal dts shapes.

also,

i tired to use

new CustomMaterial(floorGlow)
   mapTo = "floor";
   baseTex[0] = "./floor";

   glow = true;
};
addMaterialMapping("floor", "material: floorGlow");

but likewise without success.

so now i am at the end of my rope, and im wondering if anyone knows the code to use the glow shader with the terrain tiles and the skybox?

that would be amazing

thank you to anyone who responds :)

#1
11/10/2008 (9:55 am)
I don't think you can apply materials to terrain any more.
#2
11/11/2008 (11:27 am)
Applying glow to TGEA TerrainBlock is currently a very bad idea. The performance of TerrainBlock isn't very good to begin with... rendering it a second time to do glow would be really painful.

If you still really want to do this get ready to get into the code. You would need to change the TerrRender.cpp to set the glow buffer render target and render the terrain a second time. For someone experienced with TGEA and coding it shouldn't take too long to do... mostly just cut and pasting existing code.