diff --git a/game/modules/tome/data/gfx/shaders/cloud_anim.frag b/game/modules/tome/data/gfx/shaders/cloud_anim.frag new file mode 100644 index 0000000000000000000000000000000000000000..cdacb36f05bbd2b5763ad66e7f812df724cc9c9d --- /dev/null +++ b/game/modules/tome/data/gfx/shaders/cloud_anim.frag @@ -0,0 +1,19 @@ +#extension GL_EXT_gpu_shader4: enable + +uniform sampler2D tex; +uniform float tick; +uniform vec2 mapCoord; +uniform vec2 texSize; + +float rand(vec2 co){ + return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 uv = gl_TexCoord[0].xy; + vec2 r = rand(mapCoord / texSize); + vec4 c = texture2D(tex, uv); + c.a *= 0.3 + (((1 + r.x * sin(tick / 1000 + mapCoord.y)) / 2) * ((1 + r.y * cos(tick / 1000 + mapCoord.x)) / 2)) * 0.7; + gl_FragColor = c; +} diff --git a/game/modules/tome/data/gfx/shaders/cloud_anim.lua b/game/modules/tome/data/gfx/shaders/cloud_anim.lua new file mode 100644 index 0000000000000000000000000000000000000000..768116afe77b40e6fe00daed873543cb3a0e22b3 --- /dev/null +++ b/game/modules/tome/data/gfx/shaders/cloud_anim.lua @@ -0,0 +1,28 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 = "cloud_anim", + vert = nil, + args = { + tex = { texture = 0 }, + + }, + clone = false, +} diff --git a/game/modules/tome/data/gfx/shaders/cloud_anim.vert b/game/modules/tome/data/gfx/shaders/cloud_anim.vert new file mode 100644 index 0000000000000000000000000000000000000000..941cd54ba6d849c2f05054240dfab1aca1239049 --- /dev/null +++ b/game/modules/tome/data/gfx/shaders/cloud_anim.vert @@ -0,0 +1,5 @@ +void main() +{ + // Transforming The Vertex + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex+vec3(10.0,10.0,0.0); +} \ No newline at end of file diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_001.png b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_001.png new file mode 100644 index 0000000000000000000000000000000000000000..76cdfa9f55b1e8ec267ab31780270e911fb5d345 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_001.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_002.png b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_002.png new file mode 100644 index 0000000000000000000000000000000000000000..99ddd097e609ce0bbce11dd3bb1d668c3f5c6024 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_002.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_003.png b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_003.png new file mode 100644 index 0000000000000000000000000000000000000000..fd6e175e334c5098019a91444d427fa098a7f516 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/clouds/cloud_normal_003.png differ diff --git a/game/modules/tome/data/zones/dreamscape-talent/grids.lua b/game/modules/tome/data/zones/dreamscape-talent/grids.lua index bb83f99572ca7de95c5f9e5e929f657b423c32e0..a524bf830c70ceb52d960a04ebed9e8ebdfeae8f 100644 --- a/game/modules/tome/data/zones/dreamscape-talent/grids.lua +++ b/game/modules/tome/data/zones/dreamscape-talent/grids.lua @@ -18,4 +18,12 @@ -- darkgod@te4.org load("/data/general/grids/basic.lua") +load("/data/general/grids/void.lua") +newEntity{ + define_as = "CLOUD", + type = "floor", subtype = "cloud", + name = "floor", image = "terrain/clouds/cloud_normal_002.png", + display = '~', color_r=255, color_g=255, color_b=255, back_color=colors.DARK_GREY, + shader = "cloud_anim", +} \ No newline at end of file diff --git a/game/modules/tome/data/zones/dreamscape-talent/zone.lua b/game/modules/tome/data/zones/dreamscape-talent/zone.lua index 7244509c64c0ffc68dd1e0948fe852eccf2cb24c..77d915b063455be747a655b82a6ae6a310028cfe 100644 --- a/game/modules/tome/data/zones/dreamscape-talent/zone.lua +++ b/game/modules/tome/data/zones/dreamscape-talent/zone.lua @@ -38,11 +38,11 @@ return { zoom = 3, sqrt_percent = 45, noise = "fbm_perlin", - floor = "FLOOR", - wall = "WALL", - up = "FLOOR", - down = "FLOOR", - door = "FLOOR", + floor = "CLOUD", + wall = "OUTERSPACE", + up = "CLOUD", + down = "CLOUD", + door = "CLOUD", }, }, post_process = function(level)