Skip to content
Snippets Groups Projects
Commit be347a9d authored by DarkGod's avatar DarkGod
Browse files

Trees and some big plants will gently swing in the wind

parent da9d7289
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,7 @@ function _M:makeTrees(base, max, bigheight_limit, tint)
display_h = treeid < (bigheight_limit or 9) and 1 or 2,
image = (base or "terrain/tree_alpha")..treeid..".png",
tint = tint,
shader = "tree",
}
end
......
......@@ -136,6 +136,7 @@ newEntity{
change_level = 1,
change_zone = "wilderness",
nice_editer = grass_editer,
shader = "tree",
}
newEntity{
......
......@@ -41,7 +41,7 @@ for i = 1, 4 do
newEntity{ base = "JUNGLE_GRASS", define_as = "JUNGLE_GRASS_PATCH"..(i+5+8+3), add_displays={class.new{z=3,image = "terrain/jungle/jungle_dirt_var_"..i.."_64_01.png"}} }
end
for i = 1, 4 do
newEntity{ base = "JUNGLE_GRASS", define_as = "JUNGLE_GRASS_PATCH"..(i+5+8+3+4), add_displays={class.new{z=3,image = "terrain/jungle/jungle_plant_0"..i..".png"}} }
newEntity{ base = "JUNGLE_GRASS", define_as = "JUNGLE_GRASS_PATCH"..(i+5+8+3+4), add_displays={class.new{z=3,image = "terrain/jungle/jungle_plant_0"..i..".png", shader="tree"}} }
end
newEntity{
......
uniform sampler2D tex;
uniform float tick;
uniform vec2 mapCoord;
void main(void)
{
float time = tick / 1000.0;
vec2 xy = gl_TexCoord[0].xy;
if (xy.y <= 0.5) xy.x = xy.x + (0.5-xy.y) * sin(time + mapCoord.x / 40 + mapCoord.y) / 14.0;
gl_FragColor = texture2D(tex, xy) * gl_Color;
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009 - 2014 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return {
frag = "tree",
vert = nil,
args = {
},
clone = false,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment