Advertisement
FeelTheBurn

main-log

Jun 28th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 200.44 KB | None | 0 0
  1. [17:27:20, logging.cpp:199] Git sha1: GITDIR-NOTFOUND
  2. [17:27:20, logging.cpp:202] Git tag: HEAD-HASH-NOTFOUND
  3. [17:27:20, logging.cpp:205] CMAKE_BUILD_TYPE: RelWithDebInfo
  4. [17:27:20, logging.cpp:208] Log started at: Fri Jun 28 17:27:20 2013 CEST
  5. [17:27:20, logging.cpp:211] version: 1.9.3
  6. [17:27:20, elconfig.c:1494] Warning: Can't find var 'no_adjust_shadows = 0
  7. ', type 2
  8. [17:27:20, elconfig.c:1494] Warning: Can't find var 'shadows_on = 0
  9. ', type 2
  10. [17:27:20, elconfig.c:1494] Warning: Can't find var 'use_shadow_mapping = 1
  11. ', type 2
  12. [17:27:20, elconfig.c:1494] Warning: Can't find var 'clouds_shadows = 0
  13. ', type 2
  14. [17:27:20, elconfig.c:1494] Warning: Can't find var 'show_reflection = 0
  15. ', type 2
  16. [17:27:20, elconfig.c:1494] Warning: Can't find var 'use_vertex_array = 1
  17. ', type 2
  18. [17:27:20, elconfig.c:1494] Warning: Can't find var 'use_mipmaps = 0
  19. ', type 2
  20. [17:27:20, elconfig.c:1494] Warning: Can't find var 'particles_percentage = 100
  21. ', type 2
  22. [17:27:20, elconfig.c:1494] Warning: Can't find var 'text_filter_replace = smeg
  23. ', type 2
  24. [17:27:20, elconfig.c:1494] Warning: Can't find var 'render_fog = 0
  25. ', type 2
  26. [17:27:20, elconfig.c:1494] Warning: Can't find var 'use_vertex_buffers = 1
  27. ', type 2
  28. [17:27:20, elconfig.c:1494] Warning: Can't find var 'compass_north = 1
  29. ', type 2
  30. [17:27:20, elconfig.c:1494] Warning: Can't find var 'isometric = 1
  31. ', type 2
  32. [17:27:20, elconfig.c:1494] Warning: Can't find var 'perspective = 0.8
  33. ', type 2
  34. [17:27:20, elconfig.c:1494] Warning: Can't find var 'near_plane = 35
  35. ', type 2
  36. [17:27:20, elconfig.c:1494] Warning: Can't find var 'use_compiled_vertex_array = 1
  37. ', type 2
  38. [17:27:20, init.c:192] Info: No language set so defaulting to [en] and using language selection window
  39. [17:27:21, elconfig.c:1432] Warning: Can't find var 'clouds_shadows', type 'IN_GAME_VAR'
  40. [17:27:21, elconfig.c:1432] Warning: Can't find var 'water_shader_quality', type 'IN_GAME_VAR'
  41. [17:27:22, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  42. Dynamic exception type: eternal_lands::InvalidParameterException
  43. std::exception::what: std::exception
  44. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  45. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  46. 0:119(69): error: type mismatch
  47. 0:119(79): error: Operands to arithmetic operators must be numeric
  48. 0:119(87): error: Operands to arithmetic operators must be numeric
  49. 0:119(92): error: Operands to arithmetic operators must be numeric
  50.  
  51. [eternal_lands::errinfo_stack_string_*] =
  52. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  53. /* actor default*/
  54. const int lights_count = 3;
  55. const int bones_count = 80;
  56. const int shadow_maps_count = 0;
  57. const int clipmap_terrain_slices = 4;
  58. const int render_targets = 1;
  59.  
  60. /* functions */
  61. /**
  62. * Converts from Lambert Azimuthal Equal-Area
  63. * projection. Optimized for normalized Uint8 values.
  64. * @param value The Lambert Azimuthal Equal-Area
  65. * projection vector to use (0..1).
  66. * @return The normalized vector.
  67. */
  68. vec3 decode_normal(const in vec2 normal)
  69. {
  70. vec2 fenc;
  71. float f, g;
  72.  
  73. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  74. f = dot(fenc, fenc);
  75. g = sqrt(1.0 - f / 4.0);
  76. return vec3(fenc * g, 1.0 - f / 2.0);
  77. }
  78.  
  79. /**
  80. * Convertes the normalized rgb10_a2 vector to the
  81. * scaled terrain displacement vector.
  82. * @param value The rgb10_a2 normalized value (0..1).
  83. * @return The terrain displacement vector.
  84. */
  85. vec3 decode_terrain_displacement(const in vec4 vector)
  86. {
  87. vec3 result, tmp;
  88.  
  89. result = vector.xyz;
  90. result.xy = result.xy * 2.0 - 1.0;
  91. result *= vec3(32,32,64);
  92.  
  93. return result;
  94. }
  95.  
  96.  
  97. /* uniforms */
  98. uniform vec4 camera; /* default_view_direction */
  99. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  100. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  101. uniform vec4 light_colors[3]; /* lighting */
  102. uniform vec4 light_positions[3]; /* lighting */
  103. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  104. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  105.  
  106. /* uniform buffers */
  107.  
  108. /* fragment shader input */
  109. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  110. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  111. varying vec2 world_uv; /* static_uv */
  112.  
  113. void main()
  114. {
  115. vec4 world_view_direction; /* default_view_direction */
  116. vec4 albedo; /* skin_mapping_main_effect */
  117. vec3 emission; /* skin_mapping_main_effect */
  118. vec3 fragment_normal; /* skin_mapping_main_effect */
  119. float gloss; /* skin_mapping_main_effect */
  120. vec3 specular; /* skin_mapping_main_effect */
  121. vec3 fragment_color; /* lighting */
  122.  
  123. {
  124. world_view_direction.xyz = world_position - camera.xyz;
  125. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  126. world_view_direction *= inversesqrt(world_view_direction.w);
  127.  
  128. }
  129. {
  130. albedo = texture2D(effect_sampler_0, world_uv);
  131. emission = vec3(0.0);
  132. specular = vec3(0.0);
  133. gloss = 0.0;
  134. fragment_normal = normalize(world_normal);
  135.  
  136. }
  137. /* lighting */
  138. {
  139. int i; /* lighting */
  140. vec3 shadow_values; /* lighting */
  141. vec3 diffuse_colors_sum; /* lighting */
  142. vec3 specular_colors_sum; /* lighting */
  143. vec4 light_color; /* lighting */
  144. vec4 light_position; /* lighting */
  145. vec3 diffuse_color; /* skin_specular_light */
  146. vec3 specular_color; /* skin_specular_light */
  147.  
  148. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  149. diffuse_colors_sum += emission;
  150. specular_colors_sum = vec3(0.0);
  151.  
  152. for (i = 0; i < 3; ++i)
  153. {
  154. light_color = light_colors[i];
  155. light_position = light_positions[i];
  156. {
  157.  
  158. vec4 rim;
  159. vec3 diffuse, dir, reflect_dir, h;
  160. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  161. dir = light_position.xyz - world_position * light_color.a;
  162. dist = dot(dir, dir);
  163. dir *= inversesqrt(dist);
  164. h = normalize(-world_view_direction.xyz + dir);
  165. n_dot_l = dot(fragment_normal, dir);
  166. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  167. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  168. rim = texture(effect_sampler_1, vec2(n_dot_v));
  169. scale = max(0.0, 1.0 - dist * light_position.w);
  170. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  171. exponent = exp2(12.0 * gloss);
  172. specular = pow(n_dot_h, exponent) * rim.a * scale;
  173. diffuse_color = light_color.rgb * diffuse;
  174. specular_color = light_color.rgb * specular;
  175.  
  176. }
  177. diffuse_colors_sum += diffuse_color;
  178. specular_colors_sum += specular_color;
  179. }
  180.  
  181. fragment_color = diffuse_colors_sum * albedo.rgb;
  182. fragment_color += specular * specular_colors_sum;
  183. }
  184. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  185. gl_FragColor.a = albedo.a;
  186. }
  187.  
  188. [17:27:22, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  189. Dynamic exception type: eternal_lands::InvalidParameterException
  190. std::exception::what: std::exception
  191. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  192. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  193. 0:123(69): error: type mismatch
  194. 0:123(79): error: Operands to arithmetic operators must be numeric
  195. 0:123(87): error: Operands to arithmetic operators must be numeric
  196. 0:123(92): error: Operands to arithmetic operators must be numeric
  197.  
  198. [eternal_lands::errinfo_stack_string_*] =
  199. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  200. /* actor-alpha default*/
  201. const int lights_count = 3;
  202. const int bones_count = 80;
  203. const int shadow_maps_count = 0;
  204. const int clipmap_terrain_slices = 4;
  205. const int render_targets = 1;
  206.  
  207. /* functions */
  208. /**
  209. * Converts from Lambert Azimuthal Equal-Area
  210. * projection. Optimized for normalized Uint8 values.
  211. * @param value The Lambert Azimuthal Equal-Area
  212. * projection vector to use (0..1).
  213. * @return The normalized vector.
  214. */
  215. vec3 decode_normal(const in vec2 normal)
  216. {
  217. vec2 fenc;
  218. float f, g;
  219.  
  220. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  221. f = dot(fenc, fenc);
  222. g = sqrt(1.0 - f / 4.0);
  223. return vec3(fenc * g, 1.0 - f / 2.0);
  224. }
  225.  
  226. /**
  227. * Convertes the normalized rgb10_a2 vector to the
  228. * scaled terrain displacement vector.
  229. * @param value The rgb10_a2 normalized value (0..1).
  230. * @return The terrain displacement vector.
  231. */
  232. vec3 decode_terrain_displacement(const in vec4 vector)
  233. {
  234. vec3 result, tmp;
  235.  
  236. result = vector.xyz;
  237. result.xy = result.xy * 2.0 - 1.0;
  238. result *= vec3(32,32,64);
  239.  
  240. return result;
  241. }
  242.  
  243.  
  244. /* uniforms */
  245. uniform vec4 camera; /* default_view_direction */
  246. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  247. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  248. uniform vec4 light_colors[3]; /* lighting */
  249. uniform vec4 light_positions[3]; /* lighting */
  250. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  251. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  252.  
  253. /* uniform buffers */
  254.  
  255. /* fragment shader input */
  256. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  257. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  258. varying vec2 world_uv; /* static_uv */
  259.  
  260. void main()
  261. {
  262. vec4 world_view_direction; /* default_view_direction */
  263. vec4 albedo; /* skin_mapping_main_effect */
  264. vec3 emission; /* skin_mapping_main_effect */
  265. vec3 fragment_normal; /* skin_mapping_main_effect */
  266. float gloss; /* skin_mapping_main_effect */
  267. vec3 specular; /* skin_mapping_main_effect */
  268. vec3 fragment_color; /* lighting */
  269.  
  270. {
  271. world_view_direction.xyz = world_position - camera.xyz;
  272. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  273. world_view_direction *= inversesqrt(world_view_direction.w);
  274.  
  275. }
  276. {
  277. albedo = texture2D(effect_sampler_0, world_uv);
  278. emission = vec3(0.0);
  279. specular = vec3(0.0);
  280. gloss = 0.0;
  281. fragment_normal = normalize(world_normal);
  282.  
  283. }
  284. if (albedo.a < 0.5)
  285. {
  286. discard;
  287. }
  288. /* lighting */
  289. {
  290. int i; /* lighting */
  291. vec3 shadow_values; /* lighting */
  292. vec3 diffuse_colors_sum; /* lighting */
  293. vec3 specular_colors_sum; /* lighting */
  294. vec4 light_color; /* lighting */
  295. vec4 light_position; /* lighting */
  296. vec3 diffuse_color; /* skin_specular_light */
  297. vec3 specular_color; /* skin_specular_light */
  298.  
  299. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  300. diffuse_colors_sum += emission;
  301. specular_colors_sum = vec3(0.0);
  302.  
  303. for (i = 0; i < 3; ++i)
  304. {
  305. light_color = light_colors[i];
  306. light_position = light_positions[i];
  307. {
  308.  
  309. vec4 rim;
  310. vec3 diffuse, dir, reflect_dir, h;
  311. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  312. dir = light_position.xyz - world_position * light_color.a;
  313. dist = dot(dir, dir);
  314. dir *= inversesqrt(dist);
  315. h = normalize(-world_view_direction.xyz + dir);
  316. n_dot_l = dot(fragment_normal, dir);
  317. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  318. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  319. rim = texture(effect_sampler_1, vec2(n_dot_v));
  320. scale = max(0.0, 1.0 - dist * light_position.w);
  321. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  322. exponent = exp2(12.0 * gloss);
  323. specular = pow(n_dot_h, exponent) * rim.a * scale;
  324. diffuse_color = light_color.rgb * diffuse;
  325. specular_color = light_color.rgb * specular;
  326.  
  327. }
  328. diffuse_colors_sum += diffuse_color;
  329. specular_colors_sum += specular_color;
  330. }
  331.  
  332. fragment_color = diffuse_colors_sum * albedo.rgb;
  333. fragment_color += specular * specular_colors_sum;
  334. }
  335. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  336. gl_FragColor.a = albedo.a;
  337. }
  338.  
  339. [17:27:23, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  340. Dynamic exception type: eternal_lands::OpenGlException
  341. std::exception::what: std::exception
  342. [eternal_lands::errinfo_message_*] = Fragment info
  343. -------------
  344. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  345.  
  346. [eternal_lands::errinfo_item_name_*] = ad2912ff-7d56-48b5-8530-3e1eaa8bf3fe
  347. [eternal_lands::errinfo_stack_string_*] =
  348. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  349. /* cdlod-terrain-high-quality default*/
  350. invariant gl_Position; /* make existing gl_Position be invariant */
  351. varying vec2 terrain_uvs[4];
  352. varying vec3 world_position;
  353. varying vec3 world_normal;
  354. uniform vec4 terrain_scale;
  355. uniform mat2x3 clipmap_terrain_matrices[4];
  356. uniform mat4 projection_view_matrix;
  357. attribute vec4 position;
  358. attribute vec4 normal;
  359. void main ()
  360. {
  361. vec3 tmpvar_1;
  362. world_position = position.xyz;
  363. world_normal = normal.xyz;
  364. vec4 tmpvar_2;
  365. tmpvar_2.w = 1.0;
  366. tmpvar_2.xyz = position.xyz;
  367. gl_Position = (projection_view_matrix * tmpvar_2);
  368. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  369. tmpvar_1.z = 1.0;
  370. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  371. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  372. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  373. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  374. }
  375.  
  376.  
  377. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  378. /* cdlod-terrain-high-quality default*/
  379. varying vec2 terrain_uvs[4];
  380. varying vec3 world_position;
  381. varying vec3 world_normal;
  382. uniform vec4 light_positions[3];
  383. uniform vec4 light_colors[3];
  384. uniform mat2x4 sky_ground_hemispheres;
  385. uniform sampler3D effect_sampler_0;
  386. uniform vec4 camera;
  387. void main ()
  388. {
  389. vec3 tmpvar_1;
  390. vec3 tmpvar_2;
  391. vec3 tmpvar_3;
  392. int tmpvar_4;
  393. int tmpvar_5;
  394. vec4 tmpvar_6;
  395. tmpvar_6.xyz = (world_position - camera.xyz);
  396. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  397. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  398. tmpvar_4 = 3;
  399. tmpvar_5 = 2;
  400. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  401. tmpvar_4 = tmpvar_5;
  402. };
  403. tmpvar_5 = 1;
  404. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  405. if ((1 < tmpvar_4)) {
  406. tmpvar_4 = tmpvar_5;
  407. };
  408. };
  409. tmpvar_5 = 0;
  410. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  411. if ((0 < tmpvar_4)) {
  412. tmpvar_4 = tmpvar_5;
  413. };
  414. };
  415. tmpvar_5 = -1;
  416. vec3 tmpvar_7;
  417. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  418. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  419. vec4 tmpvar_8;
  420. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  421. vec3 tmpvar_9;
  422. tmpvar_9 = normalize (world_normal);
  423. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  424. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  425. vec4 tmpvar_10;
  426. tmpvar_10 = light_colors[0];
  427. vec4 tmpvar_11;
  428. tmpvar_11 = light_positions[0];
  429. vec3 tmpvar_12;
  430. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  431. float tmpvar_13;
  432. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  433. vec3 tmpvar_14;
  434. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  435. vec3 tmpvar_15;
  436. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  437. float tmpvar_16;
  438. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  439. float tmpvar_17;
  440. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  441. float tmpvar_18;
  442. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  443. float tmpvar_19;
  444. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  445. vec3 tmpvar_20;
  446. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  447. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  448. vec4 tmpvar_21;
  449. tmpvar_21.x = tmpvar_18;
  450. tmpvar_21.y = tmpvar_17;
  451. tmpvar_21.z = tmpvar_16;
  452. tmpvar_21.w = tmpvar_19;
  453. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  454. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  455. };
  456. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  457. tmpvar_2 = tmpvar_1;
  458. vec4 tmpvar_22;
  459. tmpvar_22 = light_colors[1];
  460. vec4 tmpvar_23;
  461. tmpvar_23 = light_positions[1];
  462. vec3 tmpvar_24;
  463. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  464. float tmpvar_25;
  465. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  466. vec3 tmpvar_26;
  467. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  468. vec3 tmpvar_27;
  469. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  470. float tmpvar_28;
  471. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  472. float tmpvar_29;
  473. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  474. float tmpvar_30;
  475. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  476. float tmpvar_31;
  477. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  478. vec3 tmpvar_32;
  479. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  480. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  481. vec4 tmpvar_33;
  482. tmpvar_33.x = tmpvar_30;
  483. tmpvar_33.y = tmpvar_29;
  484. tmpvar_33.z = tmpvar_28;
  485. tmpvar_33.w = tmpvar_31;
  486. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  487. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  488. };
  489. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  490. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  491. vec4 tmpvar_34;
  492. tmpvar_34 = light_colors[2];
  493. vec4 tmpvar_35;
  494. tmpvar_35 = light_positions[2];
  495. vec3 tmpvar_36;
  496. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  497. float tmpvar_37;
  498. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  499. vec3 tmpvar_38;
  500. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  501. vec3 tmpvar_39;
  502. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  503. float tmpvar_40;
  504. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  505. float tmpvar_41;
  506. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  507. float tmpvar_42;
  508. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  509. float tmpvar_43;
  510. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  511. vec3 tmpvar_44;
  512. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  513. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  514. vec4 tmpvar_45;
  515. tmpvar_45.x = tmpvar_42;
  516. tmpvar_45.y = tmpvar_41;
  517. tmpvar_45.z = tmpvar_40;
  518. tmpvar_45.w = tmpvar_43;
  519. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  520. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  521. };
  522. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  523. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  524. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  525. gl_FragColor.w = tmpvar_8.w;
  526. }
  527.  
  528.  
  529. [eternal_lands::errinfo_geometry_shader_*] =
  530. [17:27:23, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  531. Dynamic exception type: eternal_lands::OpenGlException
  532. std::exception::what: std::exception
  533. [eternal_lands::errinfo_message_*] = Fragment info
  534. -------------
  535. 0(34) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  536.  
  537. [eternal_lands::errinfo_item_name_*] = 3129857c-82cc-41eb-8558-3c7cfa73cff5
  538. [eternal_lands::errinfo_stack_string_*] =
  539. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  540. /* cdlod-terrain-low-quality default*/
  541. invariant gl_Position; /* make existing gl_Position be invariant */
  542. varying vec2 terrain_uvs[4];
  543. varying vec3 world_position;
  544. varying vec3 world_normal;
  545. uniform vec4 terrain_scale;
  546. uniform mat2x3 clipmap_terrain_matrices[4];
  547. uniform mat4 projection_view_matrix;
  548. attribute vec4 position;
  549. attribute vec4 normal;
  550. void main ()
  551. {
  552. vec3 tmpvar_1;
  553. world_position = position.xyz;
  554. world_normal = normal.xyz;
  555. vec4 tmpvar_2;
  556. tmpvar_2.w = 1.0;
  557. tmpvar_2.xyz = position.xyz;
  558. gl_Position = (projection_view_matrix * tmpvar_2);
  559. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  560. tmpvar_1.z = 1.0;
  561. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  562. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  563. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  564. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  565. }
  566.  
  567.  
  568. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  569. /* cdlod-terrain-low-quality default*/
  570. varying vec2 terrain_uvs[4];
  571. varying vec3 world_position;
  572. varying vec3 world_normal;
  573. uniform vec4 light_positions[3];
  574. uniform vec4 light_colors[3];
  575. uniform mat2x4 sky_ground_hemispheres;
  576. uniform sampler3D effect_sampler_0;
  577. void main ()
  578. {
  579. vec3 tmpvar_1;
  580. int tmpvar_2;
  581. int tmpvar_3;
  582. tmpvar_2 = 3;
  583. tmpvar_3 = 2;
  584. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  585. tmpvar_2 = tmpvar_3;
  586. };
  587. tmpvar_3 = 1;
  588. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  589. if ((1 < tmpvar_2)) {
  590. tmpvar_2 = tmpvar_3;
  591. };
  592. };
  593. tmpvar_3 = 0;
  594. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  595. if ((0 < tmpvar_2)) {
  596. tmpvar_2 = tmpvar_3;
  597. };
  598. };
  599. tmpvar_3 = -1;
  600. vec3 tmpvar_4;
  601. tmpvar_4.xy = terrain_uvs[tmpvar_2];
  602. tmpvar_4.z = ((float(tmpvar_2) + 0.5) / 4.0);
  603. vec4 tmpvar_5;
  604. tmpvar_5 = texture3D (effect_sampler_0, tmpvar_4);
  605. vec3 tmpvar_6;
  606. tmpvar_6 = normalize (world_normal);
  607. tmpvar_1 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_6.z) + 0.5)));
  608. vec4 tmpvar_7;
  609. tmpvar_7 = light_colors[0];
  610. vec4 tmpvar_8;
  611. tmpvar_8 = light_positions[0];
  612. vec3 tmpvar_9;
  613. tmpvar_9 = (tmpvar_8.xyz - (world_position * tmpvar_7.w));
  614. float tmpvar_10;
  615. tmpvar_10 = dot (tmpvar_9, tmpvar_9);
  616. tmpvar_1 = (tmpvar_1 + ((tmpvar_7.xyz * max (0.0, (1.0 - (tmpvar_10 * tmpvar_8.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_9 * inversesqrt (tmpvar_10))))));
  617. vec4 tmpvar_11;
  618. tmpvar_11 = light_colors[1];
  619. vec4 tmpvar_12;
  620. tmpvar_12 = light_positions[1];
  621. vec3 tmpvar_13;
  622. tmpvar_13 = (tmpvar_12.xyz - (world_position * tmpvar_11.w));
  623. float tmpvar_14;
  624. tmpvar_14 = dot (tmpvar_13, tmpvar_13);
  625. tmpvar_1 = (tmpvar_1 + ((tmpvar_11.xyz * max (0.0, (1.0 - (tmpvar_14 * tmpvar_12.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_13 * inversesqrt (tmpvar_14))))));
  626. vec4 tmpvar_15;
  627. tmpvar_15 = light_colors[2];
  628. vec4 tmpvar_16;
  629. tmpvar_16 = light_positions[2];
  630. vec3 tmpvar_17;
  631. tmpvar_17 = (tmpvar_16.xyz - (world_position * tmpvar_15.w));
  632. float tmpvar_18;
  633. tmpvar_18 = dot (tmpvar_17, tmpvar_17);
  634. tmpvar_1 = (tmpvar_1 + ((tmpvar_15.xyz * max (0.0, (1.0 - (tmpvar_18 * tmpvar_16.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_17 * inversesqrt (tmpvar_18))))));
  635. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_1 * tmpvar_5.xyz))));
  636. gl_FragColor.w = tmpvar_5.w;
  637. }
  638.  
  639.  
  640. [eternal_lands::errinfo_geometry_shader_*] =
  641. [17:27:23, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  642. Dynamic exception type: eternal_lands::OpenGlException
  643. std::exception::what: std::exception
  644. [eternal_lands::errinfo_message_*] = Fragment info
  645. -------------
  646. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  647.  
  648. [eternal_lands::errinfo_item_name_*] = c5e389a8-a4f5-4986-938d-605c606ddb7a
  649. [eternal_lands::errinfo_stack_string_*] =
  650. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  651. /* cdlod-terrain-medium-quality default*/
  652. invariant gl_Position; /* make existing gl_Position be invariant */
  653. varying vec2 terrain_uvs[4];
  654. varying vec3 world_position;
  655. varying vec3 world_normal;
  656. uniform vec4 terrain_scale;
  657. uniform mat2x3 clipmap_terrain_matrices[4];
  658. uniform mat4 projection_view_matrix;
  659. attribute vec4 position;
  660. attribute vec4 normal;
  661. void main ()
  662. {
  663. vec3 tmpvar_1;
  664. world_position = position.xyz;
  665. world_normal = normal.xyz;
  666. vec4 tmpvar_2;
  667. tmpvar_2.w = 1.0;
  668. tmpvar_2.xyz = position.xyz;
  669. gl_Position = (projection_view_matrix * tmpvar_2);
  670. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  671. tmpvar_1.z = 1.0;
  672. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  673. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  674. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  675. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  676. }
  677.  
  678.  
  679. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  680. /* cdlod-terrain-medium-quality default*/
  681. varying vec2 terrain_uvs[4];
  682. varying vec3 world_position;
  683. varying vec3 world_normal;
  684. uniform vec4 light_positions[3];
  685. uniform vec4 light_colors[3];
  686. uniform mat2x4 sky_ground_hemispheres;
  687. uniform sampler3D effect_sampler_0;
  688. uniform vec4 camera;
  689. void main ()
  690. {
  691. vec3 tmpvar_1;
  692. vec3 tmpvar_2;
  693. vec3 tmpvar_3;
  694. int tmpvar_4;
  695. int tmpvar_5;
  696. vec4 tmpvar_6;
  697. tmpvar_6.xyz = (world_position - camera.xyz);
  698. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  699. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  700. tmpvar_4 = 3;
  701. tmpvar_5 = 2;
  702. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  703. tmpvar_4 = tmpvar_5;
  704. };
  705. tmpvar_5 = 1;
  706. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  707. if ((1 < tmpvar_4)) {
  708. tmpvar_4 = tmpvar_5;
  709. };
  710. };
  711. tmpvar_5 = 0;
  712. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  713. if ((0 < tmpvar_4)) {
  714. tmpvar_4 = tmpvar_5;
  715. };
  716. };
  717. tmpvar_5 = -1;
  718. vec3 tmpvar_7;
  719. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  720. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  721. vec4 tmpvar_8;
  722. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  723. vec3 tmpvar_9;
  724. tmpvar_9 = normalize (world_normal);
  725. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  726. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  727. vec4 tmpvar_10;
  728. tmpvar_10 = light_colors[0];
  729. vec4 tmpvar_11;
  730. tmpvar_11 = light_positions[0];
  731. vec3 tmpvar_12;
  732. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  733. float tmpvar_13;
  734. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  735. vec3 tmpvar_14;
  736. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  737. vec3 tmpvar_15;
  738. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  739. float tmpvar_16;
  740. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  741. float tmpvar_17;
  742. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  743. float tmpvar_18;
  744. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  745. float tmpvar_19;
  746. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  747. vec3 tmpvar_20;
  748. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  749. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  750. vec4 tmpvar_21;
  751. tmpvar_21.x = tmpvar_18;
  752. tmpvar_21.y = tmpvar_17;
  753. tmpvar_21.z = tmpvar_16;
  754. tmpvar_21.w = tmpvar_19;
  755. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  756. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  757. };
  758. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  759. tmpvar_2 = tmpvar_1;
  760. vec4 tmpvar_22;
  761. tmpvar_22 = light_colors[1];
  762. vec4 tmpvar_23;
  763. tmpvar_23 = light_positions[1];
  764. vec3 tmpvar_24;
  765. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  766. float tmpvar_25;
  767. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  768. vec3 tmpvar_26;
  769. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  770. vec3 tmpvar_27;
  771. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  772. float tmpvar_28;
  773. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  774. float tmpvar_29;
  775. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  776. float tmpvar_30;
  777. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  778. float tmpvar_31;
  779. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  780. vec3 tmpvar_32;
  781. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  782. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  783. vec4 tmpvar_33;
  784. tmpvar_33.x = tmpvar_30;
  785. tmpvar_33.y = tmpvar_29;
  786. tmpvar_33.z = tmpvar_28;
  787. tmpvar_33.w = tmpvar_31;
  788. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  789. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  790. };
  791. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  792. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  793. vec4 tmpvar_34;
  794. tmpvar_34 = light_colors[2];
  795. vec4 tmpvar_35;
  796. tmpvar_35 = light_positions[2];
  797. vec3 tmpvar_36;
  798. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  799. float tmpvar_37;
  800. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  801. vec3 tmpvar_38;
  802. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  803. vec3 tmpvar_39;
  804. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  805. float tmpvar_40;
  806. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  807. float tmpvar_41;
  808. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  809. float tmpvar_42;
  810. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  811. float tmpvar_43;
  812. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  813. vec3 tmpvar_44;
  814. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  815. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  816. vec4 tmpvar_45;
  817. tmpvar_45.x = tmpvar_42;
  818. tmpvar_45.y = tmpvar_41;
  819. tmpvar_45.z = tmpvar_40;
  820. tmpvar_45.w = tmpvar_43;
  821. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  822. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  823. };
  824. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  825. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  826. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  827. gl_FragColor.w = tmpvar_8.w;
  828. }
  829.  
  830.  
  831. [eternal_lands::errinfo_geometry_shader_*] =
  832. [17:27:24, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  833. Dynamic exception type: eternal_lands::InvalidParameterException
  834. std::exception::what: std::exception
  835. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  836. 0:95(57): error: type mismatch
  837.  
  838. [eternal_lands::errinfo_stack_string_*] =
  839. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  840. /* normal and specular mapping default*/
  841. const int lights_count = 3;
  842. const int bones_count = 80;
  843. const int shadow_maps_count = 0;
  844. const int clipmap_terrain_slices = 4;
  845. const int render_targets = 1;
  846.  
  847. /* functions */
  848. /**
  849. * Converts from Lambert Azimuthal Equal-Area
  850. * projection. Optimized for normalized Uint8 values.
  851. * @param value The Lambert Azimuthal Equal-Area
  852. * projection vector to use (0..1).
  853. * @return The normalized vector.
  854. */
  855. vec3 decode_normal(const in vec2 normal)
  856. {
  857. vec2 fenc;
  858. float f, g;
  859.  
  860. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  861. f = dot(fenc, fenc);
  862. g = sqrt(1.0 - f / 4.0);
  863. return vec3(fenc * g, 1.0 - f / 2.0);
  864. }
  865.  
  866. /**
  867. * Convertes the normalized rgb10_a2 vector to the
  868. * scaled terrain displacement vector.
  869. * @param value The rgb10_a2 normalized value (0..1).
  870. * @return The terrain displacement vector.
  871. */
  872. vec3 decode_terrain_displacement(const in vec4 vector)
  873. {
  874. vec3 result, tmp;
  875.  
  876. result = vector.xyz;
  877. result.xy = result.xy * 2.0 - 1.0;
  878. result *= vec3(32,32,64);
  879.  
  880. return result;
  881. }
  882.  
  883.  
  884. /* uniforms */
  885. uniform vec4 camera; /* default_view_direction */
  886. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  887. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  888. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  889. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  890. uniform vec4 light_colors[3]; /* lighting */
  891. uniform vec4 light_positions[3]; /* lighting */
  892.  
  893. /* uniform buffers */
  894.  
  895. /* fragment shader input */
  896. varying vec3 world_normal; /* static_world_tangent_transformation */
  897. varying vec3 world_position; /* static_world_tangent_transformation */
  898. varying vec4 world_tangent; /* static_world_tangent_transformation */
  899. varying vec2 world_uv; /* static_uv */
  900.  
  901. void main()
  902. {
  903. vec4 world_view_direction; /* default_view_direction */
  904. mat3 tbn_matrix; /* default_tbn_matrix */
  905. vec4 albedo; /* normal_specular_mapping_main_effect */
  906. vec3 emission; /* normal_specular_mapping_main_effect */
  907. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  908. float gloss; /* normal_specular_mapping_main_effect */
  909. vec3 specular; /* normal_specular_mapping_main_effect */
  910. vec3 fragment_color; /* lighting */
  911.  
  912. {
  913. world_view_direction.xyz = world_position - camera.xyz;
  914. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  915. world_view_direction *= inversesqrt(world_view_direction.w);
  916.  
  917. }
  918. {
  919. tbn_matrix[0] = world_tangent.xyz;
  920. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  921. tbn_matrix[2] = world_normal;
  922.  
  923. }
  924. {
  925. vec3 normal;
  926. vec2 specular_gloss;
  927. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  928. normal.xy = normal.xy * 2.0 - 1.0;
  929. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  930. fragment_normal = tbn_matrix * normal.xyz;
  931. albedo = texture2D(effect_sampler_0, world_uv);
  932. emission = vec3(0.0);
  933. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  934. specular = specular_gloss.rrr;
  935. gloss = specular_gloss.g;
  936.  
  937. }
  938. /* lighting */
  939. {
  940. int i; /* lighting */
  941. vec3 shadow_values; /* lighting */
  942. vec3 diffuse_colors_sum; /* lighting */
  943. vec3 specular_colors_sum; /* lighting */
  944. vec4 light_color; /* lighting */
  945. vec4 light_position; /* lighting */
  946. vec3 diffuse_color; /* specular_light */
  947. vec3 specular_color; /* specular_light */
  948.  
  949. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  950. diffuse_colors_sum += emission;
  951. specular_colors_sum = vec3(0.0);
  952.  
  953. for (i = 0; i < 3; ++i)
  954. {
  955. light_color = light_colors[i];
  956. light_position = light_positions[i];
  957. {
  958. vec3 dir, reflect_dir, h;
  959. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  960. dir = light_position.xyz - world_position * light_color.a;
  961. dist = dot(dir, dir);
  962. dir *= inversesqrt(dist);
  963. h = normalize(-world_view_direction.xyz + dir);
  964. #if 0
  965. n_dot_l = max(0.0, dot(fragment_normal, dir));
  966. n_dot_h = max(0.0, dot(fragment_normal, h));
  967. l_dot_h = max(0.0, dot(dir, h));
  968. #else
  969. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  970. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  971. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  972. #endif
  973. nxdir = n_dot_l;
  974. scale = max(0.0, 1.0 - dist * light_position.w);
  975. diffuse = scale * nxdir;
  976. diffuse_color = light_color.rgb * diffuse;
  977. specular_color = vec3(0.0);
  978. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  979. {
  980. exponent = exp2(12.0 * gloss);
  981. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  982. specular_color += light_color.rgb * specular;
  983. }
  984.  
  985. }
  986. diffuse_colors_sum += diffuse_color;
  987. specular_colors_sum += specular_color;
  988. }
  989.  
  990. fragment_color = diffuse_colors_sum * albedo.rgb;
  991. fragment_color += specular * specular_colors_sum;
  992. }
  993. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  994. gl_FragColor.a = albedo.a;
  995. }
  996.  
  997. [17:27:24, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  998. Dynamic exception type: eternal_lands::InvalidParameterException
  999. std::exception::what: std::exception
  1000. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  1001. 0:95(57): error: type mismatch
  1002.  
  1003. [eternal_lands::errinfo_stack_string_*] =
  1004. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1005. /* normal and specular mapping with alpha default*/
  1006. const int lights_count = 3;
  1007. const int bones_count = 80;
  1008. const int shadow_maps_count = 0;
  1009. const int clipmap_terrain_slices = 4;
  1010. const int render_targets = 1;
  1011.  
  1012. /* functions */
  1013. /**
  1014. * Converts from Lambert Azimuthal Equal-Area
  1015. * projection. Optimized for normalized Uint8 values.
  1016. * @param value The Lambert Azimuthal Equal-Area
  1017. * projection vector to use (0..1).
  1018. * @return The normalized vector.
  1019. */
  1020. vec3 decode_normal(const in vec2 normal)
  1021. {
  1022. vec2 fenc;
  1023. float f, g;
  1024.  
  1025. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  1026. f = dot(fenc, fenc);
  1027. g = sqrt(1.0 - f / 4.0);
  1028. return vec3(fenc * g, 1.0 - f / 2.0);
  1029. }
  1030.  
  1031. /**
  1032. * Convertes the normalized rgb10_a2 vector to the
  1033. * scaled terrain displacement vector.
  1034. * @param value The rgb10_a2 normalized value (0..1).
  1035. * @return The terrain displacement vector.
  1036. */
  1037. vec3 decode_terrain_displacement(const in vec4 vector)
  1038. {
  1039. vec3 result, tmp;
  1040.  
  1041. result = vector.xyz;
  1042. result.xy = result.xy * 2.0 - 1.0;
  1043. result *= vec3(32,32,64);
  1044.  
  1045. return result;
  1046. }
  1047.  
  1048.  
  1049. /* uniforms */
  1050. uniform vec4 camera; /* default_view_direction */
  1051. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  1052. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  1053. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  1054. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  1055. uniform vec4 light_colors[3]; /* lighting */
  1056. uniform vec4 light_positions[3]; /* lighting */
  1057.  
  1058. /* uniform buffers */
  1059.  
  1060. /* fragment shader input */
  1061. varying vec3 world_normal; /* static_world_tangent_transformation */
  1062. varying vec3 world_position; /* static_world_tangent_transformation */
  1063. varying vec4 world_tangent; /* static_world_tangent_transformation */
  1064. varying vec2 world_uv; /* static_uv */
  1065.  
  1066. void main()
  1067. {
  1068. vec4 world_view_direction; /* default_view_direction */
  1069. mat3 tbn_matrix; /* default_tbn_matrix */
  1070. vec4 albedo; /* normal_specular_mapping_main_effect */
  1071. vec3 emission; /* normal_specular_mapping_main_effect */
  1072. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  1073. float gloss; /* normal_specular_mapping_main_effect */
  1074. vec3 specular; /* normal_specular_mapping_main_effect */
  1075. vec3 fragment_color; /* lighting */
  1076.  
  1077. {
  1078. world_view_direction.xyz = world_position - camera.xyz;
  1079. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  1080. world_view_direction *= inversesqrt(world_view_direction.w);
  1081.  
  1082. }
  1083. {
  1084. tbn_matrix[0] = world_tangent.xyz;
  1085. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  1086. tbn_matrix[2] = world_normal;
  1087.  
  1088. }
  1089. {
  1090. vec3 normal;
  1091. vec2 specular_gloss;
  1092. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  1093. normal.xy = normal.xy * 2.0 - 1.0;
  1094. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  1095. fragment_normal = tbn_matrix * normal.xyz;
  1096. albedo = texture2D(effect_sampler_0, world_uv);
  1097. emission = vec3(0.0);
  1098. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  1099. specular = specular_gloss.rrr;
  1100. gloss = specular_gloss.g;
  1101.  
  1102. }
  1103. if (albedo.a < 0.5)
  1104. {
  1105. discard;
  1106. }
  1107. /* lighting */
  1108. {
  1109. int i; /* lighting */
  1110. vec3 shadow_values; /* lighting */
  1111. vec3 diffuse_colors_sum; /* lighting */
  1112. vec3 specular_colors_sum; /* lighting */
  1113. vec4 light_color; /* lighting */
  1114. vec4 light_position; /* lighting */
  1115. vec3 diffuse_color; /* specular_light */
  1116. vec3 specular_color; /* specular_light */
  1117.  
  1118. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  1119. diffuse_colors_sum += emission;
  1120. specular_colors_sum = vec3(0.0);
  1121.  
  1122. for (i = 0; i < 3; ++i)
  1123. {
  1124. light_color = light_colors[i];
  1125. light_position = light_positions[i];
  1126. {
  1127. vec3 dir, reflect_dir, h;
  1128. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  1129. dir = light_position.xyz - world_position * light_color.a;
  1130. dist = dot(dir, dir);
  1131. dir *= inversesqrt(dist);
  1132. h = normalize(-world_view_direction.xyz + dir);
  1133. #if 0
  1134. n_dot_l = max(0.0, dot(fragment_normal, dir));
  1135. n_dot_h = max(0.0, dot(fragment_normal, h));
  1136. l_dot_h = max(0.0, dot(dir, h));
  1137. #else
  1138. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  1139. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  1140. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  1141. #endif
  1142. nxdir = n_dot_l;
  1143. scale = max(0.0, 1.0 - dist * light_position.w);
  1144. diffuse = scale * nxdir;
  1145. diffuse_color = light_color.rgb * diffuse;
  1146. specular_color = vec3(0.0);
  1147. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  1148. {
  1149. exponent = exp2(12.0 * gloss);
  1150. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  1151. specular_color += light_color.rgb * specular;
  1152. }
  1153.  
  1154. }
  1155. diffuse_colors_sum += diffuse_color;
  1156. specular_colors_sum += specular_color;
  1157. }
  1158.  
  1159. fragment_color = diffuse_colors_sum * albedo.rgb;
  1160. fragment_color += specular * specular_colors_sum;
  1161. }
  1162. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  1163. gl_FragColor.a = albedo.a;
  1164. }
  1165.  
  1166. [17:27:24, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  1167. Dynamic exception type: eternal_lands::OpenGlException
  1168. std::exception::what: std::exception
  1169. [eternal_lands::errinfo_message_*] = Fragment info
  1170. -------------
  1171. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  1172.  
  1173. [eternal_lands::errinfo_item_name_*] = 60d56e3e-c235-4070-a84e-141882c75b62
  1174. [eternal_lands::errinfo_stack_string_*] =
  1175. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  1176. /* simple-terrain-all-quality default*/
  1177. invariant gl_Position; /* make existing gl_Position be invariant */
  1178. varying vec2 terrain_uvs[4];
  1179. varying vec3 world_position;
  1180. varying vec3 world_normal;
  1181. uniform vec4 terrain_scale;
  1182. uniform mat2x3 clipmap_terrain_matrices[4];
  1183. uniform mat4 projection_view_matrix;
  1184. uniform mat3x4 world_transformation;
  1185. uniform vec4 dudv_scale_offset;
  1186. attribute vec4 position;
  1187. attribute vec4 morph_position;
  1188. attribute vec4 morph_normal;
  1189. void main ()
  1190. {
  1191. vec3 tmpvar_1;
  1192. vec3 tmpvar_2;
  1193. tmpvar_2 = morph_position.xyz;
  1194. tmpvar_2.xy = ((morph_position.xy * 2.0) - 1.0);
  1195. vec3 tmpvar_3;
  1196. tmpvar_3 = (tmpvar_2 * vec3(32.0, 32.0, 64.0));
  1197. tmpvar_2 = tmpvar_3;
  1198. vec2 tmpvar_4;
  1199. tmpvar_4 = ((morph_normal.xy * vec2(3.96887, 3.96887)) - vec2(1.98444, 1.98444));
  1200. float tmpvar_5;
  1201. tmpvar_5 = dot (tmpvar_4, tmpvar_4);
  1202. vec3 tmpvar_6;
  1203. tmpvar_6.xy = (tmpvar_4 * sqrt ((1.0 - (tmpvar_5 / 4.0))));
  1204. tmpvar_6.z = (1.0 - (tmpvar_5 / 2.0));
  1205. vec4 tmpvar_7;
  1206. tmpvar_7.w = 1.0;
  1207. tmpvar_7.xyz = (tmpvar_3 + position.xyz);
  1208. vec3 tmpvar_8;
  1209. tmpvar_8 = (tmpvar_7 * world_transformation);
  1210. world_position = tmpvar_8;
  1211. mat3 tmpvar_9;
  1212. tmpvar_9[0] = world_transformation[0].xyz;
  1213. tmpvar_9[1] = world_transformation[1].xyz;
  1214. tmpvar_9[2] = world_transformation[2].xyz;
  1215. world_normal = normalize ((tmpvar_6 * tmpvar_9));
  1216. vec4 tmpvar_10;
  1217. tmpvar_10.w = 1.0;
  1218. tmpvar_10.xyz = position.xyz;
  1219. vec4 tmpvar_11;
  1220. tmpvar_11.w = 1.0;
  1221. tmpvar_11.xyz = tmpvar_8;
  1222. gl_Position = (projection_view_matrix * tmpvar_11);
  1223. tmpvar_1.xy = (((tmpvar_10 * world_transformation).xy + ((morph_normal.zw * dudv_scale_offset.xy) + dudv_scale_offset.zw)) * terrain_scale.zw);
  1224. tmpvar_1.z = 1.0;
  1225. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  1226. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  1227. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  1228. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  1229. }
  1230.  
  1231.  
  1232. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1233. /* simple-terrain-all-quality default*/
  1234. varying vec2 terrain_uvs[4];
  1235. varying vec3 world_position;
  1236. varying vec3 world_normal;
  1237. uniform vec4 light_positions[3];
  1238. uniform vec4 light_colors[3];
  1239. uniform mat2x4 sky_ground_hemispheres;
  1240. uniform sampler3D effect_sampler_0;
  1241. uniform vec4 camera;
  1242. void main ()
  1243. {
  1244. vec3 tmpvar_1;
  1245. vec3 tmpvar_2;
  1246. vec3 tmpvar_3;
  1247. int tmpvar_4;
  1248. int tmpvar_5;
  1249. vec4 tmpvar_6;
  1250. tmpvar_6.xyz = (world_position - camera.xyz);
  1251. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  1252. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  1253. tmpvar_4 = 3;
  1254. tmpvar_5 = 2;
  1255. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1256. tmpvar_4 = tmpvar_5;
  1257. };
  1258. tmpvar_5 = 1;
  1259. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1260. if ((1 < tmpvar_4)) {
  1261. tmpvar_4 = tmpvar_5;
  1262. };
  1263. };
  1264. tmpvar_5 = 0;
  1265. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1266. if ((0 < tmpvar_4)) {
  1267. tmpvar_4 = tmpvar_5;
  1268. };
  1269. };
  1270. tmpvar_5 = -1;
  1271. vec3 tmpvar_7;
  1272. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  1273. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  1274. vec4 tmpvar_8;
  1275. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  1276. vec3 tmpvar_9;
  1277. tmpvar_9 = normalize (world_normal);
  1278. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  1279. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  1280. vec4 tmpvar_10;
  1281. tmpvar_10 = light_colors[0];
  1282. vec4 tmpvar_11;
  1283. tmpvar_11 = light_positions[0];
  1284. vec3 tmpvar_12;
  1285. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  1286. float tmpvar_13;
  1287. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  1288. vec3 tmpvar_14;
  1289. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  1290. vec3 tmpvar_15;
  1291. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  1292. float tmpvar_16;
  1293. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  1294. float tmpvar_17;
  1295. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  1296. float tmpvar_18;
  1297. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  1298. float tmpvar_19;
  1299. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  1300. vec3 tmpvar_20;
  1301. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  1302. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1303. vec4 tmpvar_21;
  1304. tmpvar_21.x = tmpvar_18;
  1305. tmpvar_21.y = tmpvar_17;
  1306. tmpvar_21.z = tmpvar_16;
  1307. tmpvar_21.w = tmpvar_19;
  1308. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1309. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  1310. };
  1311. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  1312. tmpvar_2 = tmpvar_1;
  1313. vec4 tmpvar_22;
  1314. tmpvar_22 = light_colors[1];
  1315. vec4 tmpvar_23;
  1316. tmpvar_23 = light_positions[1];
  1317. vec3 tmpvar_24;
  1318. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  1319. float tmpvar_25;
  1320. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  1321. vec3 tmpvar_26;
  1322. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  1323. vec3 tmpvar_27;
  1324. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  1325. float tmpvar_28;
  1326. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  1327. float tmpvar_29;
  1328. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  1329. float tmpvar_30;
  1330. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  1331. float tmpvar_31;
  1332. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  1333. vec3 tmpvar_32;
  1334. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  1335. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1336. vec4 tmpvar_33;
  1337. tmpvar_33.x = tmpvar_30;
  1338. tmpvar_33.y = tmpvar_29;
  1339. tmpvar_33.z = tmpvar_28;
  1340. tmpvar_33.w = tmpvar_31;
  1341. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1342. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  1343. };
  1344. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  1345. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  1346. vec4 tmpvar_34;
  1347. tmpvar_34 = light_colors[2];
  1348. vec4 tmpvar_35;
  1349. tmpvar_35 = light_positions[2];
  1350. vec3 tmpvar_36;
  1351. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  1352. float tmpvar_37;
  1353. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  1354. vec3 tmpvar_38;
  1355. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  1356. vec3 tmpvar_39;
  1357. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  1358. float tmpvar_40;
  1359. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  1360. float tmpvar_41;
  1361. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  1362. float tmpvar_42;
  1363. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  1364. float tmpvar_43;
  1365. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  1366. vec3 tmpvar_44;
  1367. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  1368. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1369. vec4 tmpvar_45;
  1370. tmpvar_45.x = tmpvar_42;
  1371. tmpvar_45.y = tmpvar_41;
  1372. tmpvar_45.z = tmpvar_40;
  1373. tmpvar_45.w = tmpvar_43;
  1374. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1375. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  1376. };
  1377. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  1378. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  1379. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  1380. gl_FragColor.w = tmpvar_8.w;
  1381. }
  1382.  
  1383.  
  1384. [eternal_lands::errinfo_geometry_shader_*] =
  1385. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersource.cpp(192): Throw in function const eternal_lands::ShaderSourceData& eternal_lands::ShaderSource::get_data(eternal_lands::ShaderType, eternal_lands::ShaderVersionType) const
  1386. Dynamic exception type: eternal_lands::ItemNotFoundException
  1387. std::exception::what: std::exception
  1388. [eternal_lands::errinfo_message_*] = No shader source data with shader vertex version 120 in 'water_animation_world_normal_transformation' found.
  1389. [eternal_lands::errinfo_stack_string_*] =
  1390. [17:27:25, elfilewrapper.c:305] Error: Can't load zip file /home/Flame/.elc/custom_clothes.zip
  1391. [17:27:25, elfilewrapper.c:305] Error: Can't load zip file /home/Flame/.elc/unofficial_custom_clothes.zip
  1392. [17:27:25, elconfig.c:1432] Warning: Can't find var 'clouds_shadows', type 'IN_GAME_VAR'
  1393. [17:27:25, elconfig.c:1432] Warning: Can't find var 'water_shader_quality', type 'IN_GAME_VAR'
  1394. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  1395. Dynamic exception type: eternal_lands::InvalidParameterException
  1396. std::exception::what: std::exception
  1397. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  1398. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  1399. 0:119(69): error: type mismatch
  1400. 0:119(79): error: Operands to arithmetic operators must be numeric
  1401. 0:119(87): error: Operands to arithmetic operators must be numeric
  1402. 0:119(92): error: Operands to arithmetic operators must be numeric
  1403.  
  1404. [eternal_lands::errinfo_stack_string_*] =
  1405. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1406. /* actor default*/
  1407. const int lights_count = 3;
  1408. const int bones_count = 80;
  1409. const int shadow_maps_count = 0;
  1410. const int clipmap_terrain_slices = 4;
  1411. const int render_targets = 1;
  1412.  
  1413. /* functions */
  1414. /**
  1415. * Converts from Lambert Azimuthal Equal-Area
  1416. * projection. Optimized for normalized Uint8 values.
  1417. * @param value The Lambert Azimuthal Equal-Area
  1418. * projection vector to use (0..1).
  1419. * @return The normalized vector.
  1420. */
  1421. vec3 decode_normal(const in vec2 normal)
  1422. {
  1423. vec2 fenc;
  1424. float f, g;
  1425.  
  1426. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  1427. f = dot(fenc, fenc);
  1428. g = sqrt(1.0 - f / 4.0);
  1429. return vec3(fenc * g, 1.0 - f / 2.0);
  1430. }
  1431.  
  1432. /**
  1433. * Convertes the normalized rgb10_a2 vector to the
  1434. * scaled terrain displacement vector.
  1435. * @param value The rgb10_a2 normalized value (0..1).
  1436. * @return The terrain displacement vector.
  1437. */
  1438. vec3 decode_terrain_displacement(const in vec4 vector)
  1439. {
  1440. vec3 result, tmp;
  1441.  
  1442. result = vector.xyz;
  1443. result.xy = result.xy * 2.0 - 1.0;
  1444. result *= vec3(32,32,64);
  1445.  
  1446. return result;
  1447. }
  1448.  
  1449.  
  1450. /* uniforms */
  1451. uniform vec4 camera; /* default_view_direction */
  1452. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  1453. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  1454. uniform vec4 light_colors[3]; /* lighting */
  1455. uniform vec4 light_positions[3]; /* lighting */
  1456. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  1457. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  1458.  
  1459. /* uniform buffers */
  1460.  
  1461. /* fragment shader input */
  1462. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  1463. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  1464. varying vec2 world_uv; /* static_uv */
  1465.  
  1466. void main()
  1467. {
  1468. vec4 world_view_direction; /* default_view_direction */
  1469. vec4 albedo; /* skin_mapping_main_effect */
  1470. vec3 emission; /* skin_mapping_main_effect */
  1471. vec3 fragment_normal; /* skin_mapping_main_effect */
  1472. float gloss; /* skin_mapping_main_effect */
  1473. vec3 specular; /* skin_mapping_main_effect */
  1474. vec3 fragment_color; /* lighting */
  1475.  
  1476. {
  1477. world_view_direction.xyz = world_position - camera.xyz;
  1478. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  1479. world_view_direction *= inversesqrt(world_view_direction.w);
  1480.  
  1481. }
  1482. {
  1483. albedo = texture2D(effect_sampler_0, world_uv);
  1484. emission = vec3(0.0);
  1485. specular = vec3(0.0);
  1486. gloss = 0.0;
  1487. fragment_normal = normalize(world_normal);
  1488.  
  1489. }
  1490. /* lighting */
  1491. {
  1492. int i; /* lighting */
  1493. vec3 shadow_values; /* lighting */
  1494. vec3 diffuse_colors_sum; /* lighting */
  1495. vec3 specular_colors_sum; /* lighting */
  1496. vec4 light_color; /* lighting */
  1497. vec4 light_position; /* lighting */
  1498. vec3 diffuse_color; /* skin_specular_light */
  1499. vec3 specular_color; /* skin_specular_light */
  1500.  
  1501. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  1502. diffuse_colors_sum += emission;
  1503. specular_colors_sum = vec3(0.0);
  1504.  
  1505. for (i = 0; i < 3; ++i)
  1506. {
  1507. light_color = light_colors[i];
  1508. light_position = light_positions[i];
  1509. {
  1510.  
  1511. vec4 rim;
  1512. vec3 diffuse, dir, reflect_dir, h;
  1513. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  1514. dir = light_position.xyz - world_position * light_color.a;
  1515. dist = dot(dir, dir);
  1516. dir *= inversesqrt(dist);
  1517. h = normalize(-world_view_direction.xyz + dir);
  1518. n_dot_l = dot(fragment_normal, dir);
  1519. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  1520. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  1521. rim = texture(effect_sampler_1, vec2(n_dot_v));
  1522. scale = max(0.0, 1.0 - dist * light_position.w);
  1523. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  1524. exponent = exp2(12.0 * gloss);
  1525. specular = pow(n_dot_h, exponent) * rim.a * scale;
  1526. diffuse_color = light_color.rgb * diffuse;
  1527. specular_color = light_color.rgb * specular;
  1528.  
  1529. }
  1530. diffuse_colors_sum += diffuse_color;
  1531. specular_colors_sum += specular_color;
  1532. }
  1533.  
  1534. fragment_color = diffuse_colors_sum * albedo.rgb;
  1535. fragment_color += specular * specular_colors_sum;
  1536. }
  1537. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  1538. gl_FragColor.a = albedo.a;
  1539. }
  1540.  
  1541. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  1542. Dynamic exception type: eternal_lands::InvalidParameterException
  1543. std::exception::what: std::exception
  1544. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  1545. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  1546. 0:123(69): error: type mismatch
  1547. 0:123(79): error: Operands to arithmetic operators must be numeric
  1548. 0:123(87): error: Operands to arithmetic operators must be numeric
  1549. 0:123(92): error: Operands to arithmetic operators must be numeric
  1550.  
  1551. [eternal_lands::errinfo_stack_string_*] =
  1552. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1553. /* actor-alpha default*/
  1554. const int lights_count = 3;
  1555. const int bones_count = 80;
  1556. const int shadow_maps_count = 0;
  1557. const int clipmap_terrain_slices = 4;
  1558. const int render_targets = 1;
  1559.  
  1560. /* functions */
  1561. /**
  1562. * Converts from Lambert Azimuthal Equal-Area
  1563. * projection. Optimized for normalized Uint8 values.
  1564. * @param value The Lambert Azimuthal Equal-Area
  1565. * projection vector to use (0..1).
  1566. * @return The normalized vector.
  1567. */
  1568. vec3 decode_normal(const in vec2 normal)
  1569. {
  1570. vec2 fenc;
  1571. float f, g;
  1572.  
  1573. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  1574. f = dot(fenc, fenc);
  1575. g = sqrt(1.0 - f / 4.0);
  1576. return vec3(fenc * g, 1.0 - f / 2.0);
  1577. }
  1578.  
  1579. /**
  1580. * Convertes the normalized rgb10_a2 vector to the
  1581. * scaled terrain displacement vector.
  1582. * @param value The rgb10_a2 normalized value (0..1).
  1583. * @return The terrain displacement vector.
  1584. */
  1585. vec3 decode_terrain_displacement(const in vec4 vector)
  1586. {
  1587. vec3 result, tmp;
  1588.  
  1589. result = vector.xyz;
  1590. result.xy = result.xy * 2.0 - 1.0;
  1591. result *= vec3(32,32,64);
  1592.  
  1593. return result;
  1594. }
  1595.  
  1596.  
  1597. /* uniforms */
  1598. uniform vec4 camera; /* default_view_direction */
  1599. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  1600. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  1601. uniform vec4 light_colors[3]; /* lighting */
  1602. uniform vec4 light_positions[3]; /* lighting */
  1603. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  1604. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  1605.  
  1606. /* uniform buffers */
  1607.  
  1608. /* fragment shader input */
  1609. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  1610. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  1611. varying vec2 world_uv; /* static_uv */
  1612.  
  1613. void main()
  1614. {
  1615. vec4 world_view_direction; /* default_view_direction */
  1616. vec4 albedo; /* skin_mapping_main_effect */
  1617. vec3 emission; /* skin_mapping_main_effect */
  1618. vec3 fragment_normal; /* skin_mapping_main_effect */
  1619. float gloss; /* skin_mapping_main_effect */
  1620. vec3 specular; /* skin_mapping_main_effect */
  1621. vec3 fragment_color; /* lighting */
  1622.  
  1623. {
  1624. world_view_direction.xyz = world_position - camera.xyz;
  1625. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  1626. world_view_direction *= inversesqrt(world_view_direction.w);
  1627.  
  1628. }
  1629. {
  1630. albedo = texture2D(effect_sampler_0, world_uv);
  1631. emission = vec3(0.0);
  1632. specular = vec3(0.0);
  1633. gloss = 0.0;
  1634. fragment_normal = normalize(world_normal);
  1635.  
  1636. }
  1637. if (albedo.a < 0.5)
  1638. {
  1639. discard;
  1640. }
  1641. /* lighting */
  1642. {
  1643. int i; /* lighting */
  1644. vec3 shadow_values; /* lighting */
  1645. vec3 diffuse_colors_sum; /* lighting */
  1646. vec3 specular_colors_sum; /* lighting */
  1647. vec4 light_color; /* lighting */
  1648. vec4 light_position; /* lighting */
  1649. vec3 diffuse_color; /* skin_specular_light */
  1650. vec3 specular_color; /* skin_specular_light */
  1651.  
  1652. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  1653. diffuse_colors_sum += emission;
  1654. specular_colors_sum = vec3(0.0);
  1655.  
  1656. for (i = 0; i < 3; ++i)
  1657. {
  1658. light_color = light_colors[i];
  1659. light_position = light_positions[i];
  1660. {
  1661.  
  1662. vec4 rim;
  1663. vec3 diffuse, dir, reflect_dir, h;
  1664. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  1665. dir = light_position.xyz - world_position * light_color.a;
  1666. dist = dot(dir, dir);
  1667. dir *= inversesqrt(dist);
  1668. h = normalize(-world_view_direction.xyz + dir);
  1669. n_dot_l = dot(fragment_normal, dir);
  1670. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  1671. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  1672. rim = texture(effect_sampler_1, vec2(n_dot_v));
  1673. scale = max(0.0, 1.0 - dist * light_position.w);
  1674. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  1675. exponent = exp2(12.0 * gloss);
  1676. specular = pow(n_dot_h, exponent) * rim.a * scale;
  1677. diffuse_color = light_color.rgb * diffuse;
  1678. specular_color = light_color.rgb * specular;
  1679.  
  1680. }
  1681. diffuse_colors_sum += diffuse_color;
  1682. specular_colors_sum += specular_color;
  1683. }
  1684.  
  1685. fragment_color = diffuse_colors_sum * albedo.rgb;
  1686. fragment_color += specular * specular_colors_sum;
  1687. }
  1688. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  1689. gl_FragColor.a = albedo.a;
  1690. }
  1691.  
  1692. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  1693. Dynamic exception type: eternal_lands::OpenGlException
  1694. std::exception::what: std::exception
  1695. [eternal_lands::errinfo_message_*] = Fragment info
  1696. -------------
  1697. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  1698.  
  1699. [eternal_lands::errinfo_item_name_*] = 8ab51829-6e00-4471-95d2-b8db32fde9cf
  1700. [eternal_lands::errinfo_stack_string_*] =
  1701. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  1702. /* cdlod-terrain-high-quality default*/
  1703. invariant gl_Position; /* make existing gl_Position be invariant */
  1704. varying vec2 terrain_uvs[4];
  1705. varying vec3 world_position;
  1706. varying vec3 world_normal;
  1707. uniform vec4 terrain_scale;
  1708. uniform mat2x3 clipmap_terrain_matrices[4];
  1709. uniform mat4 projection_view_matrix;
  1710. attribute vec4 position;
  1711. attribute vec4 normal;
  1712. void main ()
  1713. {
  1714. vec3 tmpvar_1;
  1715. world_position = position.xyz;
  1716. world_normal = normal.xyz;
  1717. vec4 tmpvar_2;
  1718. tmpvar_2.w = 1.0;
  1719. tmpvar_2.xyz = position.xyz;
  1720. gl_Position = (projection_view_matrix * tmpvar_2);
  1721. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  1722. tmpvar_1.z = 1.0;
  1723. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  1724. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  1725. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  1726. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  1727. }
  1728.  
  1729.  
  1730. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1731. /* cdlod-terrain-high-quality default*/
  1732. varying vec2 terrain_uvs[4];
  1733. varying vec3 world_position;
  1734. varying vec3 world_normal;
  1735. uniform vec4 light_positions[3];
  1736. uniform vec4 light_colors[3];
  1737. uniform mat2x4 sky_ground_hemispheres;
  1738. uniform sampler3D effect_sampler_0;
  1739. uniform vec4 camera;
  1740. void main ()
  1741. {
  1742. vec3 tmpvar_1;
  1743. vec3 tmpvar_2;
  1744. vec3 tmpvar_3;
  1745. int tmpvar_4;
  1746. int tmpvar_5;
  1747. vec4 tmpvar_6;
  1748. tmpvar_6.xyz = (world_position - camera.xyz);
  1749. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  1750. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  1751. tmpvar_4 = 3;
  1752. tmpvar_5 = 2;
  1753. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1754. tmpvar_4 = tmpvar_5;
  1755. };
  1756. tmpvar_5 = 1;
  1757. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1758. if ((1 < tmpvar_4)) {
  1759. tmpvar_4 = tmpvar_5;
  1760. };
  1761. };
  1762. tmpvar_5 = 0;
  1763. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1764. if ((0 < tmpvar_4)) {
  1765. tmpvar_4 = tmpvar_5;
  1766. };
  1767. };
  1768. tmpvar_5 = -1;
  1769. vec3 tmpvar_7;
  1770. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  1771. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  1772. vec4 tmpvar_8;
  1773. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  1774. vec3 tmpvar_9;
  1775. tmpvar_9 = normalize (world_normal);
  1776. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  1777. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  1778. vec4 tmpvar_10;
  1779. tmpvar_10 = light_colors[0];
  1780. vec4 tmpvar_11;
  1781. tmpvar_11 = light_positions[0];
  1782. vec3 tmpvar_12;
  1783. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  1784. float tmpvar_13;
  1785. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  1786. vec3 tmpvar_14;
  1787. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  1788. vec3 tmpvar_15;
  1789. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  1790. float tmpvar_16;
  1791. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  1792. float tmpvar_17;
  1793. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  1794. float tmpvar_18;
  1795. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  1796. float tmpvar_19;
  1797. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  1798. vec3 tmpvar_20;
  1799. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  1800. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1801. vec4 tmpvar_21;
  1802. tmpvar_21.x = tmpvar_18;
  1803. tmpvar_21.y = tmpvar_17;
  1804. tmpvar_21.z = tmpvar_16;
  1805. tmpvar_21.w = tmpvar_19;
  1806. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1807. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  1808. };
  1809. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  1810. tmpvar_2 = tmpvar_1;
  1811. vec4 tmpvar_22;
  1812. tmpvar_22 = light_colors[1];
  1813. vec4 tmpvar_23;
  1814. tmpvar_23 = light_positions[1];
  1815. vec3 tmpvar_24;
  1816. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  1817. float tmpvar_25;
  1818. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  1819. vec3 tmpvar_26;
  1820. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  1821. vec3 tmpvar_27;
  1822. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  1823. float tmpvar_28;
  1824. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  1825. float tmpvar_29;
  1826. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  1827. float tmpvar_30;
  1828. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  1829. float tmpvar_31;
  1830. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  1831. vec3 tmpvar_32;
  1832. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  1833. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1834. vec4 tmpvar_33;
  1835. tmpvar_33.x = tmpvar_30;
  1836. tmpvar_33.y = tmpvar_29;
  1837. tmpvar_33.z = tmpvar_28;
  1838. tmpvar_33.w = tmpvar_31;
  1839. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1840. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  1841. };
  1842. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  1843. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  1844. vec4 tmpvar_34;
  1845. tmpvar_34 = light_colors[2];
  1846. vec4 tmpvar_35;
  1847. tmpvar_35 = light_positions[2];
  1848. vec3 tmpvar_36;
  1849. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  1850. float tmpvar_37;
  1851. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  1852. vec3 tmpvar_38;
  1853. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  1854. vec3 tmpvar_39;
  1855. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  1856. float tmpvar_40;
  1857. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  1858. float tmpvar_41;
  1859. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  1860. float tmpvar_42;
  1861. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  1862. float tmpvar_43;
  1863. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  1864. vec3 tmpvar_44;
  1865. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  1866. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  1867. vec4 tmpvar_45;
  1868. tmpvar_45.x = tmpvar_42;
  1869. tmpvar_45.y = tmpvar_41;
  1870. tmpvar_45.z = tmpvar_40;
  1871. tmpvar_45.w = tmpvar_43;
  1872. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  1873. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  1874. };
  1875. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  1876. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  1877. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  1878. gl_FragColor.w = tmpvar_8.w;
  1879. }
  1880.  
  1881.  
  1882. [eternal_lands::errinfo_geometry_shader_*] =
  1883. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  1884. Dynamic exception type: eternal_lands::OpenGlException
  1885. std::exception::what: std::exception
  1886. [eternal_lands::errinfo_message_*] = Fragment info
  1887. -------------
  1888. 0(34) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  1889.  
  1890. [eternal_lands::errinfo_item_name_*] = d217ad4a-2108-4e6d-9204-de48f24a75ff
  1891. [eternal_lands::errinfo_stack_string_*] =
  1892. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  1893. /* cdlod-terrain-low-quality default*/
  1894. invariant gl_Position; /* make existing gl_Position be invariant */
  1895. varying vec2 terrain_uvs[4];
  1896. varying vec3 world_position;
  1897. varying vec3 world_normal;
  1898. uniform vec4 terrain_scale;
  1899. uniform mat2x3 clipmap_terrain_matrices[4];
  1900. uniform mat4 projection_view_matrix;
  1901. attribute vec4 position;
  1902. attribute vec4 normal;
  1903. void main ()
  1904. {
  1905. vec3 tmpvar_1;
  1906. world_position = position.xyz;
  1907. world_normal = normal.xyz;
  1908. vec4 tmpvar_2;
  1909. tmpvar_2.w = 1.0;
  1910. tmpvar_2.xyz = position.xyz;
  1911. gl_Position = (projection_view_matrix * tmpvar_2);
  1912. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  1913. tmpvar_1.z = 1.0;
  1914. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  1915. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  1916. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  1917. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  1918. }
  1919.  
  1920.  
  1921. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  1922. /* cdlod-terrain-low-quality default*/
  1923. varying vec2 terrain_uvs[4];
  1924. varying vec3 world_position;
  1925. varying vec3 world_normal;
  1926. uniform vec4 light_positions[3];
  1927. uniform vec4 light_colors[3];
  1928. uniform mat2x4 sky_ground_hemispheres;
  1929. uniform sampler3D effect_sampler_0;
  1930. void main ()
  1931. {
  1932. vec3 tmpvar_1;
  1933. int tmpvar_2;
  1934. int tmpvar_3;
  1935. tmpvar_2 = 3;
  1936. tmpvar_3 = 2;
  1937. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1938. tmpvar_2 = tmpvar_3;
  1939. };
  1940. tmpvar_3 = 1;
  1941. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1942. if ((1 < tmpvar_2)) {
  1943. tmpvar_2 = tmpvar_3;
  1944. };
  1945. };
  1946. tmpvar_3 = 0;
  1947. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  1948. if ((0 < tmpvar_2)) {
  1949. tmpvar_2 = tmpvar_3;
  1950. };
  1951. };
  1952. tmpvar_3 = -1;
  1953. vec3 tmpvar_4;
  1954. tmpvar_4.xy = terrain_uvs[tmpvar_2];
  1955. tmpvar_4.z = ((float(tmpvar_2) + 0.5) / 4.0);
  1956. vec4 tmpvar_5;
  1957. tmpvar_5 = texture3D (effect_sampler_0, tmpvar_4);
  1958. vec3 tmpvar_6;
  1959. tmpvar_6 = normalize (world_normal);
  1960. tmpvar_1 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_6.z) + 0.5)));
  1961. vec4 tmpvar_7;
  1962. tmpvar_7 = light_colors[0];
  1963. vec4 tmpvar_8;
  1964. tmpvar_8 = light_positions[0];
  1965. vec3 tmpvar_9;
  1966. tmpvar_9 = (tmpvar_8.xyz - (world_position * tmpvar_7.w));
  1967. float tmpvar_10;
  1968. tmpvar_10 = dot (tmpvar_9, tmpvar_9);
  1969. tmpvar_1 = (tmpvar_1 + ((tmpvar_7.xyz * max (0.0, (1.0 - (tmpvar_10 * tmpvar_8.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_9 * inversesqrt (tmpvar_10))))));
  1970. vec4 tmpvar_11;
  1971. tmpvar_11 = light_colors[1];
  1972. vec4 tmpvar_12;
  1973. tmpvar_12 = light_positions[1];
  1974. vec3 tmpvar_13;
  1975. tmpvar_13 = (tmpvar_12.xyz - (world_position * tmpvar_11.w));
  1976. float tmpvar_14;
  1977. tmpvar_14 = dot (tmpvar_13, tmpvar_13);
  1978. tmpvar_1 = (tmpvar_1 + ((tmpvar_11.xyz * max (0.0, (1.0 - (tmpvar_14 * tmpvar_12.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_13 * inversesqrt (tmpvar_14))))));
  1979. vec4 tmpvar_15;
  1980. tmpvar_15 = light_colors[2];
  1981. vec4 tmpvar_16;
  1982. tmpvar_16 = light_positions[2];
  1983. vec3 tmpvar_17;
  1984. tmpvar_17 = (tmpvar_16.xyz - (world_position * tmpvar_15.w));
  1985. float tmpvar_18;
  1986. tmpvar_18 = dot (tmpvar_17, tmpvar_17);
  1987. tmpvar_1 = (tmpvar_1 + ((tmpvar_15.xyz * max (0.0, (1.0 - (tmpvar_18 * tmpvar_16.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_17 * inversesqrt (tmpvar_18))))));
  1988. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_1 * tmpvar_5.xyz))));
  1989. gl_FragColor.w = tmpvar_5.w;
  1990. }
  1991.  
  1992.  
  1993. [eternal_lands::errinfo_geometry_shader_*] =
  1994. [17:27:25, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  1995. Dynamic exception type: eternal_lands::OpenGlException
  1996. std::exception::what: std::exception
  1997. [eternal_lands::errinfo_message_*] = Fragment info
  1998. -------------
  1999. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  2000.  
  2001. [eternal_lands::errinfo_item_name_*] = d5e2eb9d-753d-4cd5-bdab-3d8ea2cc54ac
  2002. [eternal_lands::errinfo_stack_string_*] =
  2003. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  2004. /* cdlod-terrain-medium-quality default*/
  2005. invariant gl_Position; /* make existing gl_Position be invariant */
  2006. varying vec2 terrain_uvs[4];
  2007. varying vec3 world_position;
  2008. varying vec3 world_normal;
  2009. uniform vec4 terrain_scale;
  2010. uniform mat2x3 clipmap_terrain_matrices[4];
  2011. uniform mat4 projection_view_matrix;
  2012. attribute vec4 position;
  2013. attribute vec4 normal;
  2014. void main ()
  2015. {
  2016. vec3 tmpvar_1;
  2017. world_position = position.xyz;
  2018. world_normal = normal.xyz;
  2019. vec4 tmpvar_2;
  2020. tmpvar_2.w = 1.0;
  2021. tmpvar_2.xyz = position.xyz;
  2022. gl_Position = (projection_view_matrix * tmpvar_2);
  2023. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  2024. tmpvar_1.z = 1.0;
  2025. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  2026. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  2027. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  2028. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  2029. }
  2030.  
  2031.  
  2032. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2033. /* cdlod-terrain-medium-quality default*/
  2034. varying vec2 terrain_uvs[4];
  2035. varying vec3 world_position;
  2036. varying vec3 world_normal;
  2037. uniform vec4 light_positions[3];
  2038. uniform vec4 light_colors[3];
  2039. uniform mat2x4 sky_ground_hemispheres;
  2040. uniform sampler3D effect_sampler_0;
  2041. uniform vec4 camera;
  2042. void main ()
  2043. {
  2044. vec3 tmpvar_1;
  2045. vec3 tmpvar_2;
  2046. vec3 tmpvar_3;
  2047. int tmpvar_4;
  2048. int tmpvar_5;
  2049. vec4 tmpvar_6;
  2050. tmpvar_6.xyz = (world_position - camera.xyz);
  2051. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  2052. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  2053. tmpvar_4 = 3;
  2054. tmpvar_5 = 2;
  2055. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2056. tmpvar_4 = tmpvar_5;
  2057. };
  2058. tmpvar_5 = 1;
  2059. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2060. if ((1 < tmpvar_4)) {
  2061. tmpvar_4 = tmpvar_5;
  2062. };
  2063. };
  2064. tmpvar_5 = 0;
  2065. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2066. if ((0 < tmpvar_4)) {
  2067. tmpvar_4 = tmpvar_5;
  2068. };
  2069. };
  2070. tmpvar_5 = -1;
  2071. vec3 tmpvar_7;
  2072. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  2073. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  2074. vec4 tmpvar_8;
  2075. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  2076. vec3 tmpvar_9;
  2077. tmpvar_9 = normalize (world_normal);
  2078. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  2079. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  2080. vec4 tmpvar_10;
  2081. tmpvar_10 = light_colors[0];
  2082. vec4 tmpvar_11;
  2083. tmpvar_11 = light_positions[0];
  2084. vec3 tmpvar_12;
  2085. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  2086. float tmpvar_13;
  2087. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  2088. vec3 tmpvar_14;
  2089. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  2090. vec3 tmpvar_15;
  2091. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  2092. float tmpvar_16;
  2093. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  2094. float tmpvar_17;
  2095. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  2096. float tmpvar_18;
  2097. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  2098. float tmpvar_19;
  2099. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  2100. vec3 tmpvar_20;
  2101. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  2102. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2103. vec4 tmpvar_21;
  2104. tmpvar_21.x = tmpvar_18;
  2105. tmpvar_21.y = tmpvar_17;
  2106. tmpvar_21.z = tmpvar_16;
  2107. tmpvar_21.w = tmpvar_19;
  2108. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2109. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  2110. };
  2111. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  2112. tmpvar_2 = tmpvar_1;
  2113. vec4 tmpvar_22;
  2114. tmpvar_22 = light_colors[1];
  2115. vec4 tmpvar_23;
  2116. tmpvar_23 = light_positions[1];
  2117. vec3 tmpvar_24;
  2118. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  2119. float tmpvar_25;
  2120. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  2121. vec3 tmpvar_26;
  2122. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  2123. vec3 tmpvar_27;
  2124. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  2125. float tmpvar_28;
  2126. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  2127. float tmpvar_29;
  2128. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  2129. float tmpvar_30;
  2130. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  2131. float tmpvar_31;
  2132. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  2133. vec3 tmpvar_32;
  2134. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  2135. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2136. vec4 tmpvar_33;
  2137. tmpvar_33.x = tmpvar_30;
  2138. tmpvar_33.y = tmpvar_29;
  2139. tmpvar_33.z = tmpvar_28;
  2140. tmpvar_33.w = tmpvar_31;
  2141. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2142. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  2143. };
  2144. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  2145. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  2146. vec4 tmpvar_34;
  2147. tmpvar_34 = light_colors[2];
  2148. vec4 tmpvar_35;
  2149. tmpvar_35 = light_positions[2];
  2150. vec3 tmpvar_36;
  2151. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  2152. float tmpvar_37;
  2153. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  2154. vec3 tmpvar_38;
  2155. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  2156. vec3 tmpvar_39;
  2157. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  2158. float tmpvar_40;
  2159. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  2160. float tmpvar_41;
  2161. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  2162. float tmpvar_42;
  2163. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  2164. float tmpvar_43;
  2165. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  2166. vec3 tmpvar_44;
  2167. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  2168. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2169. vec4 tmpvar_45;
  2170. tmpvar_45.x = tmpvar_42;
  2171. tmpvar_45.y = tmpvar_41;
  2172. tmpvar_45.z = tmpvar_40;
  2173. tmpvar_45.w = tmpvar_43;
  2174. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2175. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  2176. };
  2177. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  2178. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  2179. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  2180. gl_FragColor.w = tmpvar_8.w;
  2181. }
  2182.  
  2183.  
  2184. [eternal_lands::errinfo_geometry_shader_*] =
  2185. [17:27:26, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  2186. Dynamic exception type: eternal_lands::InvalidParameterException
  2187. std::exception::what: std::exception
  2188. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2189. 0:95(57): error: type mismatch
  2190.  
  2191. [eternal_lands::errinfo_stack_string_*] =
  2192. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2193. /* normal and specular mapping default*/
  2194. const int lights_count = 3;
  2195. const int bones_count = 80;
  2196. const int shadow_maps_count = 0;
  2197. const int clipmap_terrain_slices = 4;
  2198. const int render_targets = 1;
  2199.  
  2200. /* functions */
  2201. /**
  2202. * Converts from Lambert Azimuthal Equal-Area
  2203. * projection. Optimized for normalized Uint8 values.
  2204. * @param value The Lambert Azimuthal Equal-Area
  2205. * projection vector to use (0..1).
  2206. * @return The normalized vector.
  2207. */
  2208. vec3 decode_normal(const in vec2 normal)
  2209. {
  2210. vec2 fenc;
  2211. float f, g;
  2212.  
  2213. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  2214. f = dot(fenc, fenc);
  2215. g = sqrt(1.0 - f / 4.0);
  2216. return vec3(fenc * g, 1.0 - f / 2.0);
  2217. }
  2218.  
  2219. /**
  2220. * Convertes the normalized rgb10_a2 vector to the
  2221. * scaled terrain displacement vector.
  2222. * @param value The rgb10_a2 normalized value (0..1).
  2223. * @return The terrain displacement vector.
  2224. */
  2225. vec3 decode_terrain_displacement(const in vec4 vector)
  2226. {
  2227. vec3 result, tmp;
  2228.  
  2229. result = vector.xyz;
  2230. result.xy = result.xy * 2.0 - 1.0;
  2231. result *= vec3(32,32,64);
  2232.  
  2233. return result;
  2234. }
  2235.  
  2236.  
  2237. /* uniforms */
  2238. uniform vec4 camera; /* default_view_direction */
  2239. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  2240. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  2241. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  2242. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  2243. uniform vec4 light_colors[3]; /* lighting */
  2244. uniform vec4 light_positions[3]; /* lighting */
  2245.  
  2246. /* uniform buffers */
  2247.  
  2248. /* fragment shader input */
  2249. varying vec3 world_normal; /* static_world_tangent_transformation */
  2250. varying vec3 world_position; /* static_world_tangent_transformation */
  2251. varying vec4 world_tangent; /* static_world_tangent_transformation */
  2252. varying vec2 world_uv; /* static_uv */
  2253.  
  2254. void main()
  2255. {
  2256. vec4 world_view_direction; /* default_view_direction */
  2257. mat3 tbn_matrix; /* default_tbn_matrix */
  2258. vec4 albedo; /* normal_specular_mapping_main_effect */
  2259. vec3 emission; /* normal_specular_mapping_main_effect */
  2260. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  2261. float gloss; /* normal_specular_mapping_main_effect */
  2262. vec3 specular; /* normal_specular_mapping_main_effect */
  2263. vec3 fragment_color; /* lighting */
  2264.  
  2265. {
  2266. world_view_direction.xyz = world_position - camera.xyz;
  2267. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  2268. world_view_direction *= inversesqrt(world_view_direction.w);
  2269.  
  2270. }
  2271. {
  2272. tbn_matrix[0] = world_tangent.xyz;
  2273. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  2274. tbn_matrix[2] = world_normal;
  2275.  
  2276. }
  2277. {
  2278. vec3 normal;
  2279. vec2 specular_gloss;
  2280. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  2281. normal.xy = normal.xy * 2.0 - 1.0;
  2282. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  2283. fragment_normal = tbn_matrix * normal.xyz;
  2284. albedo = texture2D(effect_sampler_0, world_uv);
  2285. emission = vec3(0.0);
  2286. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  2287. specular = specular_gloss.rrr;
  2288. gloss = specular_gloss.g;
  2289.  
  2290. }
  2291. /* lighting */
  2292. {
  2293. int i; /* lighting */
  2294. vec3 shadow_values; /* lighting */
  2295. vec3 diffuse_colors_sum; /* lighting */
  2296. vec3 specular_colors_sum; /* lighting */
  2297. vec4 light_color; /* lighting */
  2298. vec4 light_position; /* lighting */
  2299. vec3 diffuse_color; /* specular_light */
  2300. vec3 specular_color; /* specular_light */
  2301.  
  2302. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  2303. diffuse_colors_sum += emission;
  2304. specular_colors_sum = vec3(0.0);
  2305.  
  2306. for (i = 0; i < 3; ++i)
  2307. {
  2308. light_color = light_colors[i];
  2309. light_position = light_positions[i];
  2310. {
  2311. vec3 dir, reflect_dir, h;
  2312. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  2313. dir = light_position.xyz - world_position * light_color.a;
  2314. dist = dot(dir, dir);
  2315. dir *= inversesqrt(dist);
  2316. h = normalize(-world_view_direction.xyz + dir);
  2317. #if 0
  2318. n_dot_l = max(0.0, dot(fragment_normal, dir));
  2319. n_dot_h = max(0.0, dot(fragment_normal, h));
  2320. l_dot_h = max(0.0, dot(dir, h));
  2321. #else
  2322. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  2323. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  2324. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  2325. #endif
  2326. nxdir = n_dot_l;
  2327. scale = max(0.0, 1.0 - dist * light_position.w);
  2328. diffuse = scale * nxdir;
  2329. diffuse_color = light_color.rgb * diffuse;
  2330. specular_color = vec3(0.0);
  2331. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  2332. {
  2333. exponent = exp2(12.0 * gloss);
  2334. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  2335. specular_color += light_color.rgb * specular;
  2336. }
  2337.  
  2338. }
  2339. diffuse_colors_sum += diffuse_color;
  2340. specular_colors_sum += specular_color;
  2341. }
  2342.  
  2343. fragment_color = diffuse_colors_sum * albedo.rgb;
  2344. fragment_color += specular * specular_colors_sum;
  2345. }
  2346. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  2347. gl_FragColor.a = albedo.a;
  2348. }
  2349.  
  2350. [17:27:26, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  2351. Dynamic exception type: eternal_lands::InvalidParameterException
  2352. std::exception::what: std::exception
  2353. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2354. 0:95(57): error: type mismatch
  2355.  
  2356. [eternal_lands::errinfo_stack_string_*] =
  2357. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2358. /* normal and specular mapping with alpha default*/
  2359. const int lights_count = 3;
  2360. const int bones_count = 80;
  2361. const int shadow_maps_count = 0;
  2362. const int clipmap_terrain_slices = 4;
  2363. const int render_targets = 1;
  2364.  
  2365. /* functions */
  2366. /**
  2367. * Converts from Lambert Azimuthal Equal-Area
  2368. * projection. Optimized for normalized Uint8 values.
  2369. * @param value The Lambert Azimuthal Equal-Area
  2370. * projection vector to use (0..1).
  2371. * @return The normalized vector.
  2372. */
  2373. vec3 decode_normal(const in vec2 normal)
  2374. {
  2375. vec2 fenc;
  2376. float f, g;
  2377.  
  2378. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  2379. f = dot(fenc, fenc);
  2380. g = sqrt(1.0 - f / 4.0);
  2381. return vec3(fenc * g, 1.0 - f / 2.0);
  2382. }
  2383.  
  2384. /**
  2385. * Convertes the normalized rgb10_a2 vector to the
  2386. * scaled terrain displacement vector.
  2387. * @param value The rgb10_a2 normalized value (0..1).
  2388. * @return The terrain displacement vector.
  2389. */
  2390. vec3 decode_terrain_displacement(const in vec4 vector)
  2391. {
  2392. vec3 result, tmp;
  2393.  
  2394. result = vector.xyz;
  2395. result.xy = result.xy * 2.0 - 1.0;
  2396. result *= vec3(32,32,64);
  2397.  
  2398. return result;
  2399. }
  2400.  
  2401.  
  2402. /* uniforms */
  2403. uniform vec4 camera; /* default_view_direction */
  2404. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  2405. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  2406. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  2407. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  2408. uniform vec4 light_colors[3]; /* lighting */
  2409. uniform vec4 light_positions[3]; /* lighting */
  2410.  
  2411. /* uniform buffers */
  2412.  
  2413. /* fragment shader input */
  2414. varying vec3 world_normal; /* static_world_tangent_transformation */
  2415. varying vec3 world_position; /* static_world_tangent_transformation */
  2416. varying vec4 world_tangent; /* static_world_tangent_transformation */
  2417. varying vec2 world_uv; /* static_uv */
  2418.  
  2419. void main()
  2420. {
  2421. vec4 world_view_direction; /* default_view_direction */
  2422. mat3 tbn_matrix; /* default_tbn_matrix */
  2423. vec4 albedo; /* normal_specular_mapping_main_effect */
  2424. vec3 emission; /* normal_specular_mapping_main_effect */
  2425. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  2426. float gloss; /* normal_specular_mapping_main_effect */
  2427. vec3 specular; /* normal_specular_mapping_main_effect */
  2428. vec3 fragment_color; /* lighting */
  2429.  
  2430. {
  2431. world_view_direction.xyz = world_position - camera.xyz;
  2432. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  2433. world_view_direction *= inversesqrt(world_view_direction.w);
  2434.  
  2435. }
  2436. {
  2437. tbn_matrix[0] = world_tangent.xyz;
  2438. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  2439. tbn_matrix[2] = world_normal;
  2440.  
  2441. }
  2442. {
  2443. vec3 normal;
  2444. vec2 specular_gloss;
  2445. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  2446. normal.xy = normal.xy * 2.0 - 1.0;
  2447. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  2448. fragment_normal = tbn_matrix * normal.xyz;
  2449. albedo = texture2D(effect_sampler_0, world_uv);
  2450. emission = vec3(0.0);
  2451. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  2452. specular = specular_gloss.rrr;
  2453. gloss = specular_gloss.g;
  2454.  
  2455. }
  2456. if (albedo.a < 0.5)
  2457. {
  2458. discard;
  2459. }
  2460. /* lighting */
  2461. {
  2462. int i; /* lighting */
  2463. vec3 shadow_values; /* lighting */
  2464. vec3 diffuse_colors_sum; /* lighting */
  2465. vec3 specular_colors_sum; /* lighting */
  2466. vec4 light_color; /* lighting */
  2467. vec4 light_position; /* lighting */
  2468. vec3 diffuse_color; /* specular_light */
  2469. vec3 specular_color; /* specular_light */
  2470.  
  2471. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  2472. diffuse_colors_sum += emission;
  2473. specular_colors_sum = vec3(0.0);
  2474.  
  2475. for (i = 0; i < 3; ++i)
  2476. {
  2477. light_color = light_colors[i];
  2478. light_position = light_positions[i];
  2479. {
  2480. vec3 dir, reflect_dir, h;
  2481. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  2482. dir = light_position.xyz - world_position * light_color.a;
  2483. dist = dot(dir, dir);
  2484. dir *= inversesqrt(dist);
  2485. h = normalize(-world_view_direction.xyz + dir);
  2486. #if 0
  2487. n_dot_l = max(0.0, dot(fragment_normal, dir));
  2488. n_dot_h = max(0.0, dot(fragment_normal, h));
  2489. l_dot_h = max(0.0, dot(dir, h));
  2490. #else
  2491. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  2492. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  2493. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  2494. #endif
  2495. nxdir = n_dot_l;
  2496. scale = max(0.0, 1.0 - dist * light_position.w);
  2497. diffuse = scale * nxdir;
  2498. diffuse_color = light_color.rgb * diffuse;
  2499. specular_color = vec3(0.0);
  2500. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  2501. {
  2502. exponent = exp2(12.0 * gloss);
  2503. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  2504. specular_color += light_color.rgb * specular;
  2505. }
  2506.  
  2507. }
  2508. diffuse_colors_sum += diffuse_color;
  2509. specular_colors_sum += specular_color;
  2510. }
  2511.  
  2512. fragment_color = diffuse_colors_sum * albedo.rgb;
  2513. fragment_color += specular * specular_colors_sum;
  2514. }
  2515. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  2516. gl_FragColor.a = albedo.a;
  2517. }
  2518.  
  2519. [17:27:26, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  2520. Dynamic exception type: eternal_lands::OpenGlException
  2521. std::exception::what: std::exception
  2522. [eternal_lands::errinfo_message_*] = Fragment info
  2523. -------------
  2524. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  2525.  
  2526. [eternal_lands::errinfo_item_name_*] = 5389df64-dc73-47d4-bc2e-d068dea31d94
  2527. [eternal_lands::errinfo_stack_string_*] =
  2528. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  2529. /* simple-terrain-all-quality default*/
  2530. invariant gl_Position; /* make existing gl_Position be invariant */
  2531. varying vec2 terrain_uvs[4];
  2532. varying vec3 world_position;
  2533. varying vec3 world_normal;
  2534. uniform vec4 terrain_scale;
  2535. uniform mat2x3 clipmap_terrain_matrices[4];
  2536. uniform mat4 projection_view_matrix;
  2537. uniform mat3x4 world_transformation;
  2538. uniform vec4 dudv_scale_offset;
  2539. attribute vec4 position;
  2540. attribute vec4 morph_position;
  2541. attribute vec4 morph_normal;
  2542. void main ()
  2543. {
  2544. vec3 tmpvar_1;
  2545. vec3 tmpvar_2;
  2546. tmpvar_2 = morph_position.xyz;
  2547. tmpvar_2.xy = ((morph_position.xy * 2.0) - 1.0);
  2548. vec3 tmpvar_3;
  2549. tmpvar_3 = (tmpvar_2 * vec3(32.0, 32.0, 64.0));
  2550. tmpvar_2 = tmpvar_3;
  2551. vec2 tmpvar_4;
  2552. tmpvar_4 = ((morph_normal.xy * vec2(3.96887, 3.96887)) - vec2(1.98444, 1.98444));
  2553. float tmpvar_5;
  2554. tmpvar_5 = dot (tmpvar_4, tmpvar_4);
  2555. vec3 tmpvar_6;
  2556. tmpvar_6.xy = (tmpvar_4 * sqrt ((1.0 - (tmpvar_5 / 4.0))));
  2557. tmpvar_6.z = (1.0 - (tmpvar_5 / 2.0));
  2558. vec4 tmpvar_7;
  2559. tmpvar_7.w = 1.0;
  2560. tmpvar_7.xyz = (tmpvar_3 + position.xyz);
  2561. vec3 tmpvar_8;
  2562. tmpvar_8 = (tmpvar_7 * world_transformation);
  2563. world_position = tmpvar_8;
  2564. mat3 tmpvar_9;
  2565. tmpvar_9[0] = world_transformation[0].xyz;
  2566. tmpvar_9[1] = world_transformation[1].xyz;
  2567. tmpvar_9[2] = world_transformation[2].xyz;
  2568. world_normal = normalize ((tmpvar_6 * tmpvar_9));
  2569. vec4 tmpvar_10;
  2570. tmpvar_10.w = 1.0;
  2571. tmpvar_10.xyz = position.xyz;
  2572. vec4 tmpvar_11;
  2573. tmpvar_11.w = 1.0;
  2574. tmpvar_11.xyz = tmpvar_8;
  2575. gl_Position = (projection_view_matrix * tmpvar_11);
  2576. tmpvar_1.xy = (((tmpvar_10 * world_transformation).xy + ((morph_normal.zw * dudv_scale_offset.xy) + dudv_scale_offset.zw)) * terrain_scale.zw);
  2577. tmpvar_1.z = 1.0;
  2578. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  2579. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  2580. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  2581. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  2582. }
  2583.  
  2584.  
  2585. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2586. /* simple-terrain-all-quality default*/
  2587. varying vec2 terrain_uvs[4];
  2588. varying vec3 world_position;
  2589. varying vec3 world_normal;
  2590. uniform vec4 light_positions[3];
  2591. uniform vec4 light_colors[3];
  2592. uniform mat2x4 sky_ground_hemispheres;
  2593. uniform sampler3D effect_sampler_0;
  2594. uniform vec4 camera;
  2595. void main ()
  2596. {
  2597. vec3 tmpvar_1;
  2598. vec3 tmpvar_2;
  2599. vec3 tmpvar_3;
  2600. int tmpvar_4;
  2601. int tmpvar_5;
  2602. vec4 tmpvar_6;
  2603. tmpvar_6.xyz = (world_position - camera.xyz);
  2604. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  2605. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  2606. tmpvar_4 = 3;
  2607. tmpvar_5 = 2;
  2608. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2609. tmpvar_4 = tmpvar_5;
  2610. };
  2611. tmpvar_5 = 1;
  2612. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2613. if ((1 < tmpvar_4)) {
  2614. tmpvar_4 = tmpvar_5;
  2615. };
  2616. };
  2617. tmpvar_5 = 0;
  2618. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  2619. if ((0 < tmpvar_4)) {
  2620. tmpvar_4 = tmpvar_5;
  2621. };
  2622. };
  2623. tmpvar_5 = -1;
  2624. vec3 tmpvar_7;
  2625. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  2626. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  2627. vec4 tmpvar_8;
  2628. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  2629. vec3 tmpvar_9;
  2630. tmpvar_9 = normalize (world_normal);
  2631. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  2632. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  2633. vec4 tmpvar_10;
  2634. tmpvar_10 = light_colors[0];
  2635. vec4 tmpvar_11;
  2636. tmpvar_11 = light_positions[0];
  2637. vec3 tmpvar_12;
  2638. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  2639. float tmpvar_13;
  2640. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  2641. vec3 tmpvar_14;
  2642. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  2643. vec3 tmpvar_15;
  2644. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  2645. float tmpvar_16;
  2646. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  2647. float tmpvar_17;
  2648. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  2649. float tmpvar_18;
  2650. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  2651. float tmpvar_19;
  2652. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  2653. vec3 tmpvar_20;
  2654. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  2655. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2656. vec4 tmpvar_21;
  2657. tmpvar_21.x = tmpvar_18;
  2658. tmpvar_21.y = tmpvar_17;
  2659. tmpvar_21.z = tmpvar_16;
  2660. tmpvar_21.w = tmpvar_19;
  2661. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2662. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  2663. };
  2664. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  2665. tmpvar_2 = tmpvar_1;
  2666. vec4 tmpvar_22;
  2667. tmpvar_22 = light_colors[1];
  2668. vec4 tmpvar_23;
  2669. tmpvar_23 = light_positions[1];
  2670. vec3 tmpvar_24;
  2671. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  2672. float tmpvar_25;
  2673. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  2674. vec3 tmpvar_26;
  2675. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  2676. vec3 tmpvar_27;
  2677. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  2678. float tmpvar_28;
  2679. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  2680. float tmpvar_29;
  2681. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  2682. float tmpvar_30;
  2683. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  2684. float tmpvar_31;
  2685. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  2686. vec3 tmpvar_32;
  2687. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  2688. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2689. vec4 tmpvar_33;
  2690. tmpvar_33.x = tmpvar_30;
  2691. tmpvar_33.y = tmpvar_29;
  2692. tmpvar_33.z = tmpvar_28;
  2693. tmpvar_33.w = tmpvar_31;
  2694. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2695. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  2696. };
  2697. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  2698. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  2699. vec4 tmpvar_34;
  2700. tmpvar_34 = light_colors[2];
  2701. vec4 tmpvar_35;
  2702. tmpvar_35 = light_positions[2];
  2703. vec3 tmpvar_36;
  2704. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  2705. float tmpvar_37;
  2706. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  2707. vec3 tmpvar_38;
  2708. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  2709. vec3 tmpvar_39;
  2710. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  2711. float tmpvar_40;
  2712. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  2713. float tmpvar_41;
  2714. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  2715. float tmpvar_42;
  2716. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  2717. float tmpvar_43;
  2718. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  2719. vec3 tmpvar_44;
  2720. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  2721. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  2722. vec4 tmpvar_45;
  2723. tmpvar_45.x = tmpvar_42;
  2724. tmpvar_45.y = tmpvar_41;
  2725. tmpvar_45.z = tmpvar_40;
  2726. tmpvar_45.w = tmpvar_43;
  2727. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  2728. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  2729. };
  2730. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  2731. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  2732. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  2733. gl_FragColor.w = tmpvar_8.w;
  2734. }
  2735.  
  2736.  
  2737. [eternal_lands::errinfo_geometry_shader_*] =
  2738. [17:27:26, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersource.cpp(192): Throw in function const eternal_lands::ShaderSourceData& eternal_lands::ShaderSource::get_data(eternal_lands::ShaderType, eternal_lands::ShaderVersionType) const
  2739. Dynamic exception type: eternal_lands::ItemNotFoundException
  2740. std::exception::what: std::exception
  2741. [eternal_lands::errinfo_message_*] = No shader source data with shader vertex version 120 in 'water_animation_world_normal_transformation' found.
  2742. [eternal_lands::errinfo_stack_string_*] =
  2743. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  2744. Dynamic exception type: eternal_lands::InvalidParameterException
  2745. std::exception::what: std::exception
  2746. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2747. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2748. 0:119(69): error: type mismatch
  2749. 0:119(79): error: Operands to arithmetic operators must be numeric
  2750. 0:119(87): error: Operands to arithmetic operators must be numeric
  2751. 0:119(92): error: Operands to arithmetic operators must be numeric
  2752.  
  2753. [eternal_lands::errinfo_stack_string_*] =
  2754. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2755. /* actor default*/
  2756. const int lights_count = 3;
  2757. const int bones_count = 80;
  2758. const int shadow_maps_count = 0;
  2759. const int clipmap_terrain_slices = 4;
  2760. const int render_targets = 1;
  2761.  
  2762. /* functions */
  2763. /**
  2764. * Converts from Lambert Azimuthal Equal-Area
  2765. * projection. Optimized for normalized Uint8 values.
  2766. * @param value The Lambert Azimuthal Equal-Area
  2767. * projection vector to use (0..1).
  2768. * @return The normalized vector.
  2769. */
  2770. vec3 decode_normal(const in vec2 normal)
  2771. {
  2772. vec2 fenc;
  2773. float f, g;
  2774.  
  2775. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  2776. f = dot(fenc, fenc);
  2777. g = sqrt(1.0 - f / 4.0);
  2778. return vec3(fenc * g, 1.0 - f / 2.0);
  2779. }
  2780.  
  2781. /**
  2782. * Convertes the normalized rgb10_a2 vector to the
  2783. * scaled terrain displacement vector.
  2784. * @param value The rgb10_a2 normalized value (0..1).
  2785. * @return The terrain displacement vector.
  2786. */
  2787. vec3 decode_terrain_displacement(const in vec4 vector)
  2788. {
  2789. vec3 result, tmp;
  2790.  
  2791. result = vector.xyz;
  2792. result.xy = result.xy * 2.0 - 1.0;
  2793. result *= vec3(32,32,64);
  2794.  
  2795. return result;
  2796. }
  2797.  
  2798.  
  2799. /* uniforms */
  2800. uniform vec4 camera; /* default_view_direction */
  2801. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  2802. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  2803. uniform vec4 light_colors[3]; /* lighting */
  2804. uniform vec4 light_positions[3]; /* lighting */
  2805. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  2806. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  2807.  
  2808. /* uniform buffers */
  2809.  
  2810. /* fragment shader input */
  2811. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  2812. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  2813. varying vec2 world_uv; /* static_uv */
  2814.  
  2815. void main()
  2816. {
  2817. vec4 world_view_direction; /* default_view_direction */
  2818. vec4 albedo; /* skin_mapping_main_effect */
  2819. vec3 emission; /* skin_mapping_main_effect */
  2820. vec3 fragment_normal; /* skin_mapping_main_effect */
  2821. float gloss; /* skin_mapping_main_effect */
  2822. vec3 specular; /* skin_mapping_main_effect */
  2823. vec3 fragment_color; /* lighting */
  2824.  
  2825. {
  2826. world_view_direction.xyz = world_position - camera.xyz;
  2827. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  2828. world_view_direction *= inversesqrt(world_view_direction.w);
  2829.  
  2830. }
  2831. {
  2832. albedo = texture2D(effect_sampler_0, world_uv);
  2833. emission = vec3(0.0);
  2834. specular = vec3(0.0);
  2835. gloss = 0.0;
  2836. fragment_normal = normalize(world_normal);
  2837.  
  2838. }
  2839. /* lighting */
  2840. {
  2841. int i; /* lighting */
  2842. vec3 shadow_values; /* lighting */
  2843. vec3 diffuse_colors_sum; /* lighting */
  2844. vec3 specular_colors_sum; /* lighting */
  2845. vec4 light_color; /* lighting */
  2846. vec4 light_position; /* lighting */
  2847. vec3 diffuse_color; /* skin_specular_light */
  2848. vec3 specular_color; /* skin_specular_light */
  2849.  
  2850. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  2851. diffuse_colors_sum += emission;
  2852. specular_colors_sum = vec3(0.0);
  2853.  
  2854. for (i = 0; i < 3; ++i)
  2855. {
  2856. light_color = light_colors[i];
  2857. light_position = light_positions[i];
  2858. {
  2859.  
  2860. vec4 rim;
  2861. vec3 diffuse, dir, reflect_dir, h;
  2862. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  2863. dir = light_position.xyz - world_position * light_color.a;
  2864. dist = dot(dir, dir);
  2865. dir *= inversesqrt(dist);
  2866. h = normalize(-world_view_direction.xyz + dir);
  2867. n_dot_l = dot(fragment_normal, dir);
  2868. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  2869. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  2870. rim = texture(effect_sampler_1, vec2(n_dot_v));
  2871. scale = max(0.0, 1.0 - dist * light_position.w);
  2872. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  2873. exponent = exp2(12.0 * gloss);
  2874. specular = pow(n_dot_h, exponent) * rim.a * scale;
  2875. diffuse_color = light_color.rgb * diffuse;
  2876. specular_color = light_color.rgb * specular;
  2877.  
  2878. }
  2879. diffuse_colors_sum += diffuse_color;
  2880. specular_colors_sum += specular_color;
  2881. }
  2882.  
  2883. fragment_color = diffuse_colors_sum * albedo.rgb;
  2884. fragment_color += specular * specular_colors_sum;
  2885. }
  2886. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  2887. gl_FragColor.a = albedo.a;
  2888. }
  2889.  
  2890. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  2891. Dynamic exception type: eternal_lands::InvalidParameterException
  2892. std::exception::what: std::exception
  2893. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2894. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  2895. 0:123(69): error: type mismatch
  2896. 0:123(79): error: Operands to arithmetic operators must be numeric
  2897. 0:123(87): error: Operands to arithmetic operators must be numeric
  2898. 0:123(92): error: Operands to arithmetic operators must be numeric
  2899.  
  2900. [eternal_lands::errinfo_stack_string_*] =
  2901. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  2902. /* actor-alpha default*/
  2903. const int lights_count = 3;
  2904. const int bones_count = 80;
  2905. const int shadow_maps_count = 0;
  2906. const int clipmap_terrain_slices = 4;
  2907. const int render_targets = 1;
  2908.  
  2909. /* functions */
  2910. /**
  2911. * Converts from Lambert Azimuthal Equal-Area
  2912. * projection. Optimized for normalized Uint8 values.
  2913. * @param value The Lambert Azimuthal Equal-Area
  2914. * projection vector to use (0..1).
  2915. * @return The normalized vector.
  2916. */
  2917. vec3 decode_normal(const in vec2 normal)
  2918. {
  2919. vec2 fenc;
  2920. float f, g;
  2921.  
  2922. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  2923. f = dot(fenc, fenc);
  2924. g = sqrt(1.0 - f / 4.0);
  2925. return vec3(fenc * g, 1.0 - f / 2.0);
  2926. }
  2927.  
  2928. /**
  2929. * Convertes the normalized rgb10_a2 vector to the
  2930. * scaled terrain displacement vector.
  2931. * @param value The rgb10_a2 normalized value (0..1).
  2932. * @return The terrain displacement vector.
  2933. */
  2934. vec3 decode_terrain_displacement(const in vec4 vector)
  2935. {
  2936. vec3 result, tmp;
  2937.  
  2938. result = vector.xyz;
  2939. result.xy = result.xy * 2.0 - 1.0;
  2940. result *= vec3(32,32,64);
  2941.  
  2942. return result;
  2943. }
  2944.  
  2945.  
  2946. /* uniforms */
  2947. uniform vec4 camera; /* default_view_direction */
  2948. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  2949. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  2950. uniform vec4 light_colors[3]; /* lighting */
  2951. uniform vec4 light_positions[3]; /* lighting */
  2952. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  2953. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  2954.  
  2955. /* uniform buffers */
  2956.  
  2957. /* fragment shader input */
  2958. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  2959. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  2960. varying vec2 world_uv; /* static_uv */
  2961.  
  2962. void main()
  2963. {
  2964. vec4 world_view_direction; /* default_view_direction */
  2965. vec4 albedo; /* skin_mapping_main_effect */
  2966. vec3 emission; /* skin_mapping_main_effect */
  2967. vec3 fragment_normal; /* skin_mapping_main_effect */
  2968. float gloss; /* skin_mapping_main_effect */
  2969. vec3 specular; /* skin_mapping_main_effect */
  2970. vec3 fragment_color; /* lighting */
  2971.  
  2972. {
  2973. world_view_direction.xyz = world_position - camera.xyz;
  2974. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  2975. world_view_direction *= inversesqrt(world_view_direction.w);
  2976.  
  2977. }
  2978. {
  2979. albedo = texture2D(effect_sampler_0, world_uv);
  2980. emission = vec3(0.0);
  2981. specular = vec3(0.0);
  2982. gloss = 0.0;
  2983. fragment_normal = normalize(world_normal);
  2984.  
  2985. }
  2986. if (albedo.a < 0.5)
  2987. {
  2988. discard;
  2989. }
  2990. /* lighting */
  2991. {
  2992. int i; /* lighting */
  2993. vec3 shadow_values; /* lighting */
  2994. vec3 diffuse_colors_sum; /* lighting */
  2995. vec3 specular_colors_sum; /* lighting */
  2996. vec4 light_color; /* lighting */
  2997. vec4 light_position; /* lighting */
  2998. vec3 diffuse_color; /* skin_specular_light */
  2999. vec3 specular_color; /* skin_specular_light */
  3000.  
  3001. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  3002. diffuse_colors_sum += emission;
  3003. specular_colors_sum = vec3(0.0);
  3004.  
  3005. for (i = 0; i < 3; ++i)
  3006. {
  3007. light_color = light_colors[i];
  3008. light_position = light_positions[i];
  3009. {
  3010.  
  3011. vec4 rim;
  3012. vec3 diffuse, dir, reflect_dir, h;
  3013. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  3014. dir = light_position.xyz - world_position * light_color.a;
  3015. dist = dot(dir, dir);
  3016. dir *= inversesqrt(dist);
  3017. h = normalize(-world_view_direction.xyz + dir);
  3018. n_dot_l = dot(fragment_normal, dir);
  3019. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  3020. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  3021. rim = texture(effect_sampler_1, vec2(n_dot_v));
  3022. scale = max(0.0, 1.0 - dist * light_position.w);
  3023. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  3024. exponent = exp2(12.0 * gloss);
  3025. specular = pow(n_dot_h, exponent) * rim.a * scale;
  3026. diffuse_color = light_color.rgb * diffuse;
  3027. specular_color = light_color.rgb * specular;
  3028.  
  3029. }
  3030. diffuse_colors_sum += diffuse_color;
  3031. specular_colors_sum += specular_color;
  3032. }
  3033.  
  3034. fragment_color = diffuse_colors_sum * albedo.rgb;
  3035. fragment_color += specular * specular_colors_sum;
  3036. }
  3037. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  3038. gl_FragColor.a = albedo.a;
  3039. }
  3040.  
  3041. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  3042. Dynamic exception type: eternal_lands::OpenGlException
  3043. std::exception::what: std::exception
  3044. [eternal_lands::errinfo_message_*] = Fragment info
  3045. -------------
  3046. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  3047.  
  3048. [eternal_lands::errinfo_item_name_*] = b139b922-797f-4d2e-a1df-a1818ed357b6
  3049. [eternal_lands::errinfo_stack_string_*] =
  3050. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  3051. /* cdlod-terrain-high-quality default*/
  3052. invariant gl_Position; /* make existing gl_Position be invariant */
  3053. varying vec2 terrain_uvs[4];
  3054. varying vec3 world_position;
  3055. varying vec3 world_normal;
  3056. uniform vec4 terrain_scale;
  3057. uniform mat2x3 clipmap_terrain_matrices[4];
  3058. uniform mat4 projection_view_matrix;
  3059. attribute vec4 position;
  3060. attribute vec4 normal;
  3061. void main ()
  3062. {
  3063. vec3 tmpvar_1;
  3064. world_position = position.xyz;
  3065. world_normal = normal.xyz;
  3066. vec4 tmpvar_2;
  3067. tmpvar_2.w = 1.0;
  3068. tmpvar_2.xyz = position.xyz;
  3069. gl_Position = (projection_view_matrix * tmpvar_2);
  3070. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  3071. tmpvar_1.z = 1.0;
  3072. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  3073. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  3074. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  3075. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  3076. }
  3077.  
  3078.  
  3079. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3080. /* cdlod-terrain-high-quality default*/
  3081. varying vec2 terrain_uvs[4];
  3082. varying vec3 world_position;
  3083. varying vec3 world_normal;
  3084. uniform vec4 light_positions[3];
  3085. uniform vec4 light_colors[3];
  3086. uniform mat2x4 sky_ground_hemispheres;
  3087. uniform sampler3D effect_sampler_0;
  3088. uniform vec4 camera;
  3089. void main ()
  3090. {
  3091. vec3 tmpvar_1;
  3092. vec3 tmpvar_2;
  3093. vec3 tmpvar_3;
  3094. int tmpvar_4;
  3095. int tmpvar_5;
  3096. vec4 tmpvar_6;
  3097. tmpvar_6.xyz = (world_position - camera.xyz);
  3098. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  3099. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  3100. tmpvar_4 = 3;
  3101. tmpvar_5 = 2;
  3102. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3103. tmpvar_4 = tmpvar_5;
  3104. };
  3105. tmpvar_5 = 1;
  3106. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3107. if ((1 < tmpvar_4)) {
  3108. tmpvar_4 = tmpvar_5;
  3109. };
  3110. };
  3111. tmpvar_5 = 0;
  3112. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3113. if ((0 < tmpvar_4)) {
  3114. tmpvar_4 = tmpvar_5;
  3115. };
  3116. };
  3117. tmpvar_5 = -1;
  3118. vec3 tmpvar_7;
  3119. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  3120. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  3121. vec4 tmpvar_8;
  3122. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  3123. vec3 tmpvar_9;
  3124. tmpvar_9 = normalize (world_normal);
  3125. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  3126. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  3127. vec4 tmpvar_10;
  3128. tmpvar_10 = light_colors[0];
  3129. vec4 tmpvar_11;
  3130. tmpvar_11 = light_positions[0];
  3131. vec3 tmpvar_12;
  3132. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  3133. float tmpvar_13;
  3134. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  3135. vec3 tmpvar_14;
  3136. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  3137. vec3 tmpvar_15;
  3138. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  3139. float tmpvar_16;
  3140. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  3141. float tmpvar_17;
  3142. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  3143. float tmpvar_18;
  3144. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  3145. float tmpvar_19;
  3146. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  3147. vec3 tmpvar_20;
  3148. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  3149. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3150. vec4 tmpvar_21;
  3151. tmpvar_21.x = tmpvar_18;
  3152. tmpvar_21.y = tmpvar_17;
  3153. tmpvar_21.z = tmpvar_16;
  3154. tmpvar_21.w = tmpvar_19;
  3155. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3156. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  3157. };
  3158. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  3159. tmpvar_2 = tmpvar_1;
  3160. vec4 tmpvar_22;
  3161. tmpvar_22 = light_colors[1];
  3162. vec4 tmpvar_23;
  3163. tmpvar_23 = light_positions[1];
  3164. vec3 tmpvar_24;
  3165. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  3166. float tmpvar_25;
  3167. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  3168. vec3 tmpvar_26;
  3169. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  3170. vec3 tmpvar_27;
  3171. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  3172. float tmpvar_28;
  3173. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  3174. float tmpvar_29;
  3175. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  3176. float tmpvar_30;
  3177. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  3178. float tmpvar_31;
  3179. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  3180. vec3 tmpvar_32;
  3181. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  3182. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3183. vec4 tmpvar_33;
  3184. tmpvar_33.x = tmpvar_30;
  3185. tmpvar_33.y = tmpvar_29;
  3186. tmpvar_33.z = tmpvar_28;
  3187. tmpvar_33.w = tmpvar_31;
  3188. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3189. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  3190. };
  3191. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  3192. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  3193. vec4 tmpvar_34;
  3194. tmpvar_34 = light_colors[2];
  3195. vec4 tmpvar_35;
  3196. tmpvar_35 = light_positions[2];
  3197. vec3 tmpvar_36;
  3198. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  3199. float tmpvar_37;
  3200. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  3201. vec3 tmpvar_38;
  3202. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  3203. vec3 tmpvar_39;
  3204. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  3205. float tmpvar_40;
  3206. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  3207. float tmpvar_41;
  3208. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  3209. float tmpvar_42;
  3210. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  3211. float tmpvar_43;
  3212. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  3213. vec3 tmpvar_44;
  3214. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  3215. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3216. vec4 tmpvar_45;
  3217. tmpvar_45.x = tmpvar_42;
  3218. tmpvar_45.y = tmpvar_41;
  3219. tmpvar_45.z = tmpvar_40;
  3220. tmpvar_45.w = tmpvar_43;
  3221. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3222. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  3223. };
  3224. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  3225. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  3226. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  3227. gl_FragColor.w = tmpvar_8.w;
  3228. }
  3229.  
  3230.  
  3231. [eternal_lands::errinfo_geometry_shader_*] =
  3232. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  3233. Dynamic exception type: eternal_lands::OpenGlException
  3234. std::exception::what: std::exception
  3235. [eternal_lands::errinfo_message_*] = Fragment info
  3236. -------------
  3237. 0(34) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  3238.  
  3239. [eternal_lands::errinfo_item_name_*] = 4fff1418-51d7-470d-b0fc-dacac4616790
  3240. [eternal_lands::errinfo_stack_string_*] =
  3241. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  3242. /* cdlod-terrain-low-quality default*/
  3243. invariant gl_Position; /* make existing gl_Position be invariant */
  3244. varying vec2 terrain_uvs[4];
  3245. varying vec3 world_position;
  3246. varying vec3 world_normal;
  3247. uniform vec4 terrain_scale;
  3248. uniform mat2x3 clipmap_terrain_matrices[4];
  3249. uniform mat4 projection_view_matrix;
  3250. attribute vec4 position;
  3251. attribute vec4 normal;
  3252. void main ()
  3253. {
  3254. vec3 tmpvar_1;
  3255. world_position = position.xyz;
  3256. world_normal = normal.xyz;
  3257. vec4 tmpvar_2;
  3258. tmpvar_2.w = 1.0;
  3259. tmpvar_2.xyz = position.xyz;
  3260. gl_Position = (projection_view_matrix * tmpvar_2);
  3261. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  3262. tmpvar_1.z = 1.0;
  3263. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  3264. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  3265. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  3266. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  3267. }
  3268.  
  3269.  
  3270. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3271. /* cdlod-terrain-low-quality default*/
  3272. varying vec2 terrain_uvs[4];
  3273. varying vec3 world_position;
  3274. varying vec3 world_normal;
  3275. uniform vec4 light_positions[3];
  3276. uniform vec4 light_colors[3];
  3277. uniform mat2x4 sky_ground_hemispheres;
  3278. uniform sampler3D effect_sampler_0;
  3279. void main ()
  3280. {
  3281. vec3 tmpvar_1;
  3282. int tmpvar_2;
  3283. int tmpvar_3;
  3284. tmpvar_2 = 3;
  3285. tmpvar_3 = 2;
  3286. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3287. tmpvar_2 = tmpvar_3;
  3288. };
  3289. tmpvar_3 = 1;
  3290. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3291. if ((1 < tmpvar_2)) {
  3292. tmpvar_2 = tmpvar_3;
  3293. };
  3294. };
  3295. tmpvar_3 = 0;
  3296. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3297. if ((0 < tmpvar_2)) {
  3298. tmpvar_2 = tmpvar_3;
  3299. };
  3300. };
  3301. tmpvar_3 = -1;
  3302. vec3 tmpvar_4;
  3303. tmpvar_4.xy = terrain_uvs[tmpvar_2];
  3304. tmpvar_4.z = ((float(tmpvar_2) + 0.5) / 4.0);
  3305. vec4 tmpvar_5;
  3306. tmpvar_5 = texture3D (effect_sampler_0, tmpvar_4);
  3307. vec3 tmpvar_6;
  3308. tmpvar_6 = normalize (world_normal);
  3309. tmpvar_1 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_6.z) + 0.5)));
  3310. vec4 tmpvar_7;
  3311. tmpvar_7 = light_colors[0];
  3312. vec4 tmpvar_8;
  3313. tmpvar_8 = light_positions[0];
  3314. vec3 tmpvar_9;
  3315. tmpvar_9 = (tmpvar_8.xyz - (world_position * tmpvar_7.w));
  3316. float tmpvar_10;
  3317. tmpvar_10 = dot (tmpvar_9, tmpvar_9);
  3318. tmpvar_1 = (tmpvar_1 + ((tmpvar_7.xyz * max (0.0, (1.0 - (tmpvar_10 * tmpvar_8.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_9 * inversesqrt (tmpvar_10))))));
  3319. vec4 tmpvar_11;
  3320. tmpvar_11 = light_colors[1];
  3321. vec4 tmpvar_12;
  3322. tmpvar_12 = light_positions[1];
  3323. vec3 tmpvar_13;
  3324. tmpvar_13 = (tmpvar_12.xyz - (world_position * tmpvar_11.w));
  3325. float tmpvar_14;
  3326. tmpvar_14 = dot (tmpvar_13, tmpvar_13);
  3327. tmpvar_1 = (tmpvar_1 + ((tmpvar_11.xyz * max (0.0, (1.0 - (tmpvar_14 * tmpvar_12.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_13 * inversesqrt (tmpvar_14))))));
  3328. vec4 tmpvar_15;
  3329. tmpvar_15 = light_colors[2];
  3330. vec4 tmpvar_16;
  3331. tmpvar_16 = light_positions[2];
  3332. vec3 tmpvar_17;
  3333. tmpvar_17 = (tmpvar_16.xyz - (world_position * tmpvar_15.w));
  3334. float tmpvar_18;
  3335. tmpvar_18 = dot (tmpvar_17, tmpvar_17);
  3336. tmpvar_1 = (tmpvar_1 + ((tmpvar_15.xyz * max (0.0, (1.0 - (tmpvar_18 * tmpvar_16.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_17 * inversesqrt (tmpvar_18))))));
  3337. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_1 * tmpvar_5.xyz))));
  3338. gl_FragColor.w = tmpvar_5.w;
  3339. }
  3340.  
  3341.  
  3342. [eternal_lands::errinfo_geometry_shader_*] =
  3343. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  3344. Dynamic exception type: eternal_lands::OpenGlException
  3345. std::exception::what: std::exception
  3346. [eternal_lands::errinfo_message_*] = Fragment info
  3347. -------------
  3348. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  3349.  
  3350. [eternal_lands::errinfo_item_name_*] = df0fc431-a73f-4a52-acef-036af89390c3
  3351. [eternal_lands::errinfo_stack_string_*] =
  3352. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  3353. /* cdlod-terrain-medium-quality default*/
  3354. invariant gl_Position; /* make existing gl_Position be invariant */
  3355. varying vec2 terrain_uvs[4];
  3356. varying vec3 world_position;
  3357. varying vec3 world_normal;
  3358. uniform vec4 terrain_scale;
  3359. uniform mat2x3 clipmap_terrain_matrices[4];
  3360. uniform mat4 projection_view_matrix;
  3361. attribute vec4 position;
  3362. attribute vec4 normal;
  3363. void main ()
  3364. {
  3365. vec3 tmpvar_1;
  3366. world_position = position.xyz;
  3367. world_normal = normal.xyz;
  3368. vec4 tmpvar_2;
  3369. tmpvar_2.w = 1.0;
  3370. tmpvar_2.xyz = position.xyz;
  3371. gl_Position = (projection_view_matrix * tmpvar_2);
  3372. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  3373. tmpvar_1.z = 1.0;
  3374. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  3375. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  3376. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  3377. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  3378. }
  3379.  
  3380.  
  3381. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3382. /* cdlod-terrain-medium-quality default*/
  3383. varying vec2 terrain_uvs[4];
  3384. varying vec3 world_position;
  3385. varying vec3 world_normal;
  3386. uniform vec4 light_positions[3];
  3387. uniform vec4 light_colors[3];
  3388. uniform mat2x4 sky_ground_hemispheres;
  3389. uniform sampler3D effect_sampler_0;
  3390. uniform vec4 camera;
  3391. void main ()
  3392. {
  3393. vec3 tmpvar_1;
  3394. vec3 tmpvar_2;
  3395. vec3 tmpvar_3;
  3396. int tmpvar_4;
  3397. int tmpvar_5;
  3398. vec4 tmpvar_6;
  3399. tmpvar_6.xyz = (world_position - camera.xyz);
  3400. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  3401. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  3402. tmpvar_4 = 3;
  3403. tmpvar_5 = 2;
  3404. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3405. tmpvar_4 = tmpvar_5;
  3406. };
  3407. tmpvar_5 = 1;
  3408. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3409. if ((1 < tmpvar_4)) {
  3410. tmpvar_4 = tmpvar_5;
  3411. };
  3412. };
  3413. tmpvar_5 = 0;
  3414. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3415. if ((0 < tmpvar_4)) {
  3416. tmpvar_4 = tmpvar_5;
  3417. };
  3418. };
  3419. tmpvar_5 = -1;
  3420. vec3 tmpvar_7;
  3421. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  3422. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  3423. vec4 tmpvar_8;
  3424. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  3425. vec3 tmpvar_9;
  3426. tmpvar_9 = normalize (world_normal);
  3427. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  3428. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  3429. vec4 tmpvar_10;
  3430. tmpvar_10 = light_colors[0];
  3431. vec4 tmpvar_11;
  3432. tmpvar_11 = light_positions[0];
  3433. vec3 tmpvar_12;
  3434. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  3435. float tmpvar_13;
  3436. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  3437. vec3 tmpvar_14;
  3438. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  3439. vec3 tmpvar_15;
  3440. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  3441. float tmpvar_16;
  3442. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  3443. float tmpvar_17;
  3444. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  3445. float tmpvar_18;
  3446. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  3447. float tmpvar_19;
  3448. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  3449. vec3 tmpvar_20;
  3450. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  3451. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3452. vec4 tmpvar_21;
  3453. tmpvar_21.x = tmpvar_18;
  3454. tmpvar_21.y = tmpvar_17;
  3455. tmpvar_21.z = tmpvar_16;
  3456. tmpvar_21.w = tmpvar_19;
  3457. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3458. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  3459. };
  3460. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  3461. tmpvar_2 = tmpvar_1;
  3462. vec4 tmpvar_22;
  3463. tmpvar_22 = light_colors[1];
  3464. vec4 tmpvar_23;
  3465. tmpvar_23 = light_positions[1];
  3466. vec3 tmpvar_24;
  3467. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  3468. float tmpvar_25;
  3469. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  3470. vec3 tmpvar_26;
  3471. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  3472. vec3 tmpvar_27;
  3473. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  3474. float tmpvar_28;
  3475. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  3476. float tmpvar_29;
  3477. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  3478. float tmpvar_30;
  3479. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  3480. float tmpvar_31;
  3481. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  3482. vec3 tmpvar_32;
  3483. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  3484. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3485. vec4 tmpvar_33;
  3486. tmpvar_33.x = tmpvar_30;
  3487. tmpvar_33.y = tmpvar_29;
  3488. tmpvar_33.z = tmpvar_28;
  3489. tmpvar_33.w = tmpvar_31;
  3490. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3491. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  3492. };
  3493. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  3494. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  3495. vec4 tmpvar_34;
  3496. tmpvar_34 = light_colors[2];
  3497. vec4 tmpvar_35;
  3498. tmpvar_35 = light_positions[2];
  3499. vec3 tmpvar_36;
  3500. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  3501. float tmpvar_37;
  3502. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  3503. vec3 tmpvar_38;
  3504. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  3505. vec3 tmpvar_39;
  3506. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  3507. float tmpvar_40;
  3508. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  3509. float tmpvar_41;
  3510. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  3511. float tmpvar_42;
  3512. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  3513. float tmpvar_43;
  3514. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  3515. vec3 tmpvar_44;
  3516. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  3517. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  3518. vec4 tmpvar_45;
  3519. tmpvar_45.x = tmpvar_42;
  3520. tmpvar_45.y = tmpvar_41;
  3521. tmpvar_45.z = tmpvar_40;
  3522. tmpvar_45.w = tmpvar_43;
  3523. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  3524. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  3525. };
  3526. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  3527. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  3528. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  3529. gl_FragColor.w = tmpvar_8.w;
  3530. }
  3531.  
  3532.  
  3533. [eternal_lands::errinfo_geometry_shader_*] =
  3534. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  3535. Dynamic exception type: eternal_lands::InvalidParameterException
  3536. std::exception::what: std::exception
  3537. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  3538. 0:95(57): error: type mismatch
  3539.  
  3540. [eternal_lands::errinfo_stack_string_*] =
  3541. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3542. /* normal and specular mapping default*/
  3543. const int lights_count = 3;
  3544. const int bones_count = 80;
  3545. const int shadow_maps_count = 0;
  3546. const int clipmap_terrain_slices = 4;
  3547. const int render_targets = 1;
  3548.  
  3549. /* functions */
  3550. /**
  3551. * Converts from Lambert Azimuthal Equal-Area
  3552. * projection. Optimized for normalized Uint8 values.
  3553. * @param value The Lambert Azimuthal Equal-Area
  3554. * projection vector to use (0..1).
  3555. * @return The normalized vector.
  3556. */
  3557. vec3 decode_normal(const in vec2 normal)
  3558. {
  3559. vec2 fenc;
  3560. float f, g;
  3561.  
  3562. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  3563. f = dot(fenc, fenc);
  3564. g = sqrt(1.0 - f / 4.0);
  3565. return vec3(fenc * g, 1.0 - f / 2.0);
  3566. }
  3567.  
  3568. /**
  3569. * Convertes the normalized rgb10_a2 vector to the
  3570. * scaled terrain displacement vector.
  3571. * @param value The rgb10_a2 normalized value (0..1).
  3572. * @return The terrain displacement vector.
  3573. */
  3574. vec3 decode_terrain_displacement(const in vec4 vector)
  3575. {
  3576. vec3 result, tmp;
  3577.  
  3578. result = vector.xyz;
  3579. result.xy = result.xy * 2.0 - 1.0;
  3580. result *= vec3(32,32,64);
  3581.  
  3582. return result;
  3583. }
  3584.  
  3585.  
  3586. /* uniforms */
  3587. uniform vec4 camera; /* default_view_direction */
  3588. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  3589. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  3590. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  3591. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  3592. uniform vec4 light_colors[3]; /* lighting */
  3593. uniform vec4 light_positions[3]; /* lighting */
  3594.  
  3595. /* uniform buffers */
  3596.  
  3597. /* fragment shader input */
  3598. varying vec3 world_normal; /* static_world_tangent_transformation */
  3599. varying vec3 world_position; /* static_world_tangent_transformation */
  3600. varying vec4 world_tangent; /* static_world_tangent_transformation */
  3601. varying vec2 world_uv; /* static_uv */
  3602.  
  3603. void main()
  3604. {
  3605. vec4 world_view_direction; /* default_view_direction */
  3606. mat3 tbn_matrix; /* default_tbn_matrix */
  3607. vec4 albedo; /* normal_specular_mapping_main_effect */
  3608. vec3 emission; /* normal_specular_mapping_main_effect */
  3609. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  3610. float gloss; /* normal_specular_mapping_main_effect */
  3611. vec3 specular; /* normal_specular_mapping_main_effect */
  3612. vec3 fragment_color; /* lighting */
  3613.  
  3614. {
  3615. world_view_direction.xyz = world_position - camera.xyz;
  3616. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  3617. world_view_direction *= inversesqrt(world_view_direction.w);
  3618.  
  3619. }
  3620. {
  3621. tbn_matrix[0] = world_tangent.xyz;
  3622. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  3623. tbn_matrix[2] = world_normal;
  3624.  
  3625. }
  3626. {
  3627. vec3 normal;
  3628. vec2 specular_gloss;
  3629. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  3630. normal.xy = normal.xy * 2.0 - 1.0;
  3631. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  3632. fragment_normal = tbn_matrix * normal.xyz;
  3633. albedo = texture2D(effect_sampler_0, world_uv);
  3634. emission = vec3(0.0);
  3635. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  3636. specular = specular_gloss.rrr;
  3637. gloss = specular_gloss.g;
  3638.  
  3639. }
  3640. /* lighting */
  3641. {
  3642. int i; /* lighting */
  3643. vec3 shadow_values; /* lighting */
  3644. vec3 diffuse_colors_sum; /* lighting */
  3645. vec3 specular_colors_sum; /* lighting */
  3646. vec4 light_color; /* lighting */
  3647. vec4 light_position; /* lighting */
  3648. vec3 diffuse_color; /* specular_light */
  3649. vec3 specular_color; /* specular_light */
  3650.  
  3651. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  3652. diffuse_colors_sum += emission;
  3653. specular_colors_sum = vec3(0.0);
  3654.  
  3655. for (i = 0; i < 3; ++i)
  3656. {
  3657. light_color = light_colors[i];
  3658. light_position = light_positions[i];
  3659. {
  3660. vec3 dir, reflect_dir, h;
  3661. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  3662. dir = light_position.xyz - world_position * light_color.a;
  3663. dist = dot(dir, dir);
  3664. dir *= inversesqrt(dist);
  3665. h = normalize(-world_view_direction.xyz + dir);
  3666. #if 0
  3667. n_dot_l = max(0.0, dot(fragment_normal, dir));
  3668. n_dot_h = max(0.0, dot(fragment_normal, h));
  3669. l_dot_h = max(0.0, dot(dir, h));
  3670. #else
  3671. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  3672. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  3673. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  3674. #endif
  3675. nxdir = n_dot_l;
  3676. scale = max(0.0, 1.0 - dist * light_position.w);
  3677. diffuse = scale * nxdir;
  3678. diffuse_color = light_color.rgb * diffuse;
  3679. specular_color = vec3(0.0);
  3680. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  3681. {
  3682. exponent = exp2(12.0 * gloss);
  3683. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  3684. specular_color += light_color.rgb * specular;
  3685. }
  3686.  
  3687. }
  3688. diffuse_colors_sum += diffuse_color;
  3689. specular_colors_sum += specular_color;
  3690. }
  3691.  
  3692. fragment_color = diffuse_colors_sum * albedo.rgb;
  3693. fragment_color += specular * specular_colors_sum;
  3694. }
  3695. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  3696. gl_FragColor.a = albedo.a;
  3697. }
  3698.  
  3699. [17:27:27, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  3700. Dynamic exception type: eternal_lands::InvalidParameterException
  3701. std::exception::what: std::exception
  3702. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  3703. 0:95(57): error: type mismatch
  3704.  
  3705. [eternal_lands::errinfo_stack_string_*] =
  3706. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3707. /* normal and specular mapping with alpha default*/
  3708. const int lights_count = 3;
  3709. const int bones_count = 80;
  3710. const int shadow_maps_count = 0;
  3711. const int clipmap_terrain_slices = 4;
  3712. const int render_targets = 1;
  3713.  
  3714. /* functions */
  3715. /**
  3716. * Converts from Lambert Azimuthal Equal-Area
  3717. * projection. Optimized for normalized Uint8 values.
  3718. * @param value The Lambert Azimuthal Equal-Area
  3719. * projection vector to use (0..1).
  3720. * @return The normalized vector.
  3721. */
  3722. vec3 decode_normal(const in vec2 normal)
  3723. {
  3724. vec2 fenc;
  3725. float f, g;
  3726.  
  3727. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  3728. f = dot(fenc, fenc);
  3729. g = sqrt(1.0 - f / 4.0);
  3730. return vec3(fenc * g, 1.0 - f / 2.0);
  3731. }
  3732.  
  3733. /**
  3734. * Convertes the normalized rgb10_a2 vector to the
  3735. * scaled terrain displacement vector.
  3736. * @param value The rgb10_a2 normalized value (0..1).
  3737. * @return The terrain displacement vector.
  3738. */
  3739. vec3 decode_terrain_displacement(const in vec4 vector)
  3740. {
  3741. vec3 result, tmp;
  3742.  
  3743. result = vector.xyz;
  3744. result.xy = result.xy * 2.0 - 1.0;
  3745. result *= vec3(32,32,64);
  3746.  
  3747. return result;
  3748. }
  3749.  
  3750.  
  3751. /* uniforms */
  3752. uniform vec4 camera; /* default_view_direction */
  3753. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  3754. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  3755. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  3756. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  3757. uniform vec4 light_colors[3]; /* lighting */
  3758. uniform vec4 light_positions[3]; /* lighting */
  3759.  
  3760. /* uniform buffers */
  3761.  
  3762. /* fragment shader input */
  3763. varying vec3 world_normal; /* static_world_tangent_transformation */
  3764. varying vec3 world_position; /* static_world_tangent_transformation */
  3765. varying vec4 world_tangent; /* static_world_tangent_transformation */
  3766. varying vec2 world_uv; /* static_uv */
  3767.  
  3768. void main()
  3769. {
  3770. vec4 world_view_direction; /* default_view_direction */
  3771. mat3 tbn_matrix; /* default_tbn_matrix */
  3772. vec4 albedo; /* normal_specular_mapping_main_effect */
  3773. vec3 emission; /* normal_specular_mapping_main_effect */
  3774. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  3775. float gloss; /* normal_specular_mapping_main_effect */
  3776. vec3 specular; /* normal_specular_mapping_main_effect */
  3777. vec3 fragment_color; /* lighting */
  3778.  
  3779. {
  3780. world_view_direction.xyz = world_position - camera.xyz;
  3781. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  3782. world_view_direction *= inversesqrt(world_view_direction.w);
  3783.  
  3784. }
  3785. {
  3786. tbn_matrix[0] = world_tangent.xyz;
  3787. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  3788. tbn_matrix[2] = world_normal;
  3789.  
  3790. }
  3791. {
  3792. vec3 normal;
  3793. vec2 specular_gloss;
  3794. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  3795. normal.xy = normal.xy * 2.0 - 1.0;
  3796. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  3797. fragment_normal = tbn_matrix * normal.xyz;
  3798. albedo = texture2D(effect_sampler_0, world_uv);
  3799. emission = vec3(0.0);
  3800. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  3801. specular = specular_gloss.rrr;
  3802. gloss = specular_gloss.g;
  3803.  
  3804. }
  3805. if (albedo.a < 0.5)
  3806. {
  3807. discard;
  3808. }
  3809. /* lighting */
  3810. {
  3811. int i; /* lighting */
  3812. vec3 shadow_values; /* lighting */
  3813. vec3 diffuse_colors_sum; /* lighting */
  3814. vec3 specular_colors_sum; /* lighting */
  3815. vec4 light_color; /* lighting */
  3816. vec4 light_position; /* lighting */
  3817. vec3 diffuse_color; /* specular_light */
  3818. vec3 specular_color; /* specular_light */
  3819.  
  3820. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  3821. diffuse_colors_sum += emission;
  3822. specular_colors_sum = vec3(0.0);
  3823.  
  3824. for (i = 0; i < 3; ++i)
  3825. {
  3826. light_color = light_colors[i];
  3827. light_position = light_positions[i];
  3828. {
  3829. vec3 dir, reflect_dir, h;
  3830. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  3831. dir = light_position.xyz - world_position * light_color.a;
  3832. dist = dot(dir, dir);
  3833. dir *= inversesqrt(dist);
  3834. h = normalize(-world_view_direction.xyz + dir);
  3835. #if 0
  3836. n_dot_l = max(0.0, dot(fragment_normal, dir));
  3837. n_dot_h = max(0.0, dot(fragment_normal, h));
  3838. l_dot_h = max(0.0, dot(dir, h));
  3839. #else
  3840. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  3841. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  3842. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  3843. #endif
  3844. nxdir = n_dot_l;
  3845. scale = max(0.0, 1.0 - dist * light_position.w);
  3846. diffuse = scale * nxdir;
  3847. diffuse_color = light_color.rgb * diffuse;
  3848. specular_color = vec3(0.0);
  3849. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  3850. {
  3851. exponent = exp2(12.0 * gloss);
  3852. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  3853. specular_color += light_color.rgb * specular;
  3854. }
  3855.  
  3856. }
  3857. diffuse_colors_sum += diffuse_color;
  3858. specular_colors_sum += specular_color;
  3859. }
  3860.  
  3861. fragment_color = diffuse_colors_sum * albedo.rgb;
  3862. fragment_color += specular * specular_colors_sum;
  3863. }
  3864. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  3865. gl_FragColor.a = albedo.a;
  3866. }
  3867.  
  3868. [17:27:28, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  3869. Dynamic exception type: eternal_lands::OpenGlException
  3870. std::exception::what: std::exception
  3871. [eternal_lands::errinfo_message_*] = Fragment info
  3872. -------------
  3873. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  3874.  
  3875. [eternal_lands::errinfo_item_name_*] = 3fae3eb6-b748-42d9-9e21-c7843b43fda1
  3876. [eternal_lands::errinfo_stack_string_*] =
  3877. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  3878. /* simple-terrain-all-quality default*/
  3879. invariant gl_Position; /* make existing gl_Position be invariant */
  3880. varying vec2 terrain_uvs[4];
  3881. varying vec3 world_position;
  3882. varying vec3 world_normal;
  3883. uniform vec4 terrain_scale;
  3884. uniform mat2x3 clipmap_terrain_matrices[4];
  3885. uniform mat4 projection_view_matrix;
  3886. uniform mat3x4 world_transformation;
  3887. uniform vec4 dudv_scale_offset;
  3888. attribute vec4 position;
  3889. attribute vec4 morph_position;
  3890. attribute vec4 morph_normal;
  3891. void main ()
  3892. {
  3893. vec3 tmpvar_1;
  3894. vec3 tmpvar_2;
  3895. tmpvar_2 = morph_position.xyz;
  3896. tmpvar_2.xy = ((morph_position.xy * 2.0) - 1.0);
  3897. vec3 tmpvar_3;
  3898. tmpvar_3 = (tmpvar_2 * vec3(32.0, 32.0, 64.0));
  3899. tmpvar_2 = tmpvar_3;
  3900. vec2 tmpvar_4;
  3901. tmpvar_4 = ((morph_normal.xy * vec2(3.96887, 3.96887)) - vec2(1.98444, 1.98444));
  3902. float tmpvar_5;
  3903. tmpvar_5 = dot (tmpvar_4, tmpvar_4);
  3904. vec3 tmpvar_6;
  3905. tmpvar_6.xy = (tmpvar_4 * sqrt ((1.0 - (tmpvar_5 / 4.0))));
  3906. tmpvar_6.z = (1.0 - (tmpvar_5 / 2.0));
  3907. vec4 tmpvar_7;
  3908. tmpvar_7.w = 1.0;
  3909. tmpvar_7.xyz = (tmpvar_3 + position.xyz);
  3910. vec3 tmpvar_8;
  3911. tmpvar_8 = (tmpvar_7 * world_transformation);
  3912. world_position = tmpvar_8;
  3913. mat3 tmpvar_9;
  3914. tmpvar_9[0] = world_transformation[0].xyz;
  3915. tmpvar_9[1] = world_transformation[1].xyz;
  3916. tmpvar_9[2] = world_transformation[2].xyz;
  3917. world_normal = normalize ((tmpvar_6 * tmpvar_9));
  3918. vec4 tmpvar_10;
  3919. tmpvar_10.w = 1.0;
  3920. tmpvar_10.xyz = position.xyz;
  3921. vec4 tmpvar_11;
  3922. tmpvar_11.w = 1.0;
  3923. tmpvar_11.xyz = tmpvar_8;
  3924. gl_Position = (projection_view_matrix * tmpvar_11);
  3925. tmpvar_1.xy = (((tmpvar_10 * world_transformation).xy + ((morph_normal.zw * dudv_scale_offset.xy) + dudv_scale_offset.zw)) * terrain_scale.zw);
  3926. tmpvar_1.z = 1.0;
  3927. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  3928. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  3929. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  3930. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  3931. }
  3932.  
  3933.  
  3934. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  3935. /* simple-terrain-all-quality default*/
  3936. varying vec2 terrain_uvs[4];
  3937. varying vec3 world_position;
  3938. varying vec3 world_normal;
  3939. uniform vec4 light_positions[3];
  3940. uniform vec4 light_colors[3];
  3941. uniform mat2x4 sky_ground_hemispheres;
  3942. uniform sampler3D effect_sampler_0;
  3943. uniform vec4 camera;
  3944. void main ()
  3945. {
  3946. vec3 tmpvar_1;
  3947. vec3 tmpvar_2;
  3948. vec3 tmpvar_3;
  3949. int tmpvar_4;
  3950. int tmpvar_5;
  3951. vec4 tmpvar_6;
  3952. tmpvar_6.xyz = (world_position - camera.xyz);
  3953. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  3954. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  3955. tmpvar_4 = 3;
  3956. tmpvar_5 = 2;
  3957. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3958. tmpvar_4 = tmpvar_5;
  3959. };
  3960. tmpvar_5 = 1;
  3961. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3962. if ((1 < tmpvar_4)) {
  3963. tmpvar_4 = tmpvar_5;
  3964. };
  3965. };
  3966. tmpvar_5 = 0;
  3967. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  3968. if ((0 < tmpvar_4)) {
  3969. tmpvar_4 = tmpvar_5;
  3970. };
  3971. };
  3972. tmpvar_5 = -1;
  3973. vec3 tmpvar_7;
  3974. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  3975. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  3976. vec4 tmpvar_8;
  3977. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  3978. vec3 tmpvar_9;
  3979. tmpvar_9 = normalize (world_normal);
  3980. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  3981. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  3982. vec4 tmpvar_10;
  3983. tmpvar_10 = light_colors[0];
  3984. vec4 tmpvar_11;
  3985. tmpvar_11 = light_positions[0];
  3986. vec3 tmpvar_12;
  3987. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  3988. float tmpvar_13;
  3989. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  3990. vec3 tmpvar_14;
  3991. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  3992. vec3 tmpvar_15;
  3993. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  3994. float tmpvar_16;
  3995. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  3996. float tmpvar_17;
  3997. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  3998. float tmpvar_18;
  3999. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  4000. float tmpvar_19;
  4001. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  4002. vec3 tmpvar_20;
  4003. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  4004. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4005. vec4 tmpvar_21;
  4006. tmpvar_21.x = tmpvar_18;
  4007. tmpvar_21.y = tmpvar_17;
  4008. tmpvar_21.z = tmpvar_16;
  4009. tmpvar_21.w = tmpvar_19;
  4010. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4011. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  4012. };
  4013. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  4014. tmpvar_2 = tmpvar_1;
  4015. vec4 tmpvar_22;
  4016. tmpvar_22 = light_colors[1];
  4017. vec4 tmpvar_23;
  4018. tmpvar_23 = light_positions[1];
  4019. vec3 tmpvar_24;
  4020. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  4021. float tmpvar_25;
  4022. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  4023. vec3 tmpvar_26;
  4024. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  4025. vec3 tmpvar_27;
  4026. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  4027. float tmpvar_28;
  4028. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  4029. float tmpvar_29;
  4030. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  4031. float tmpvar_30;
  4032. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  4033. float tmpvar_31;
  4034. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  4035. vec3 tmpvar_32;
  4036. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  4037. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4038. vec4 tmpvar_33;
  4039. tmpvar_33.x = tmpvar_30;
  4040. tmpvar_33.y = tmpvar_29;
  4041. tmpvar_33.z = tmpvar_28;
  4042. tmpvar_33.w = tmpvar_31;
  4043. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4044. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  4045. };
  4046. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  4047. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4048. vec4 tmpvar_34;
  4049. tmpvar_34 = light_colors[2];
  4050. vec4 tmpvar_35;
  4051. tmpvar_35 = light_positions[2];
  4052. vec3 tmpvar_36;
  4053. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  4054. float tmpvar_37;
  4055. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  4056. vec3 tmpvar_38;
  4057. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  4058. vec3 tmpvar_39;
  4059. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  4060. float tmpvar_40;
  4061. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  4062. float tmpvar_41;
  4063. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  4064. float tmpvar_42;
  4065. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  4066. float tmpvar_43;
  4067. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  4068. vec3 tmpvar_44;
  4069. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  4070. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4071. vec4 tmpvar_45;
  4072. tmpvar_45.x = tmpvar_42;
  4073. tmpvar_45.y = tmpvar_41;
  4074. tmpvar_45.z = tmpvar_40;
  4075. tmpvar_45.w = tmpvar_43;
  4076. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4077. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  4078. };
  4079. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  4080. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4081. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  4082. gl_FragColor.w = tmpvar_8.w;
  4083. }
  4084.  
  4085.  
  4086. [eternal_lands::errinfo_geometry_shader_*] =
  4087. [17:27:28, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersource.cpp(192): Throw in function const eternal_lands::ShaderSourceData& eternal_lands::ShaderSource::get_data(eternal_lands::ShaderType, eternal_lands::ShaderVersionType) const
  4088. Dynamic exception type: eternal_lands::ItemNotFoundException
  4089. std::exception::what: std::exception
  4090. [eternal_lands::errinfo_message_*] = No shader source data with shader vertex version 120 in 'water_animation_world_normal_transformation' found.
  4091. [eternal_lands::errinfo_stack_string_*] =
  4092. [17:27:28, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  4093. Dynamic exception type: eternal_lands::InvalidParameterException
  4094. std::exception::what: std::exception
  4095. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  4096. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  4097. 0:119(69): error: type mismatch
  4098. 0:119(79): error: Operands to arithmetic operators must be numeric
  4099. 0:119(87): error: Operands to arithmetic operators must be numeric
  4100. 0:119(92): error: Operands to arithmetic operators must be numeric
  4101.  
  4102. [eternal_lands::errinfo_stack_string_*] =
  4103. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4104. /* actor default*/
  4105. const int lights_count = 3;
  4106. const int bones_count = 80;
  4107. const int shadow_maps_count = 0;
  4108. const int clipmap_terrain_slices = 4;
  4109. const int render_targets = 1;
  4110.  
  4111. /* functions */
  4112. /**
  4113. * Converts from Lambert Azimuthal Equal-Area
  4114. * projection. Optimized for normalized Uint8 values.
  4115. * @param value The Lambert Azimuthal Equal-Area
  4116. * projection vector to use (0..1).
  4117. * @return The normalized vector.
  4118. */
  4119. vec3 decode_normal(const in vec2 normal)
  4120. {
  4121. vec2 fenc;
  4122. float f, g;
  4123.  
  4124. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  4125. f = dot(fenc, fenc);
  4126. g = sqrt(1.0 - f / 4.0);
  4127. return vec3(fenc * g, 1.0 - f / 2.0);
  4128. }
  4129.  
  4130. /**
  4131. * Convertes the normalized rgb10_a2 vector to the
  4132. * scaled terrain displacement vector.
  4133. * @param value The rgb10_a2 normalized value (0..1).
  4134. * @return The terrain displacement vector.
  4135. */
  4136. vec3 decode_terrain_displacement(const in vec4 vector)
  4137. {
  4138. vec3 result, tmp;
  4139.  
  4140. result = vector.xyz;
  4141. result.xy = result.xy * 2.0 - 1.0;
  4142. result *= vec3(32,32,64);
  4143.  
  4144. return result;
  4145. }
  4146.  
  4147.  
  4148. /* uniforms */
  4149. uniform vec4 camera; /* default_view_direction */
  4150. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  4151. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  4152. uniform vec4 light_colors[3]; /* lighting */
  4153. uniform vec4 light_positions[3]; /* lighting */
  4154. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  4155. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  4156.  
  4157. /* uniform buffers */
  4158.  
  4159. /* fragment shader input */
  4160. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  4161. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  4162. varying vec2 world_uv; /* static_uv */
  4163.  
  4164. void main()
  4165. {
  4166. vec4 world_view_direction; /* default_view_direction */
  4167. vec4 albedo; /* skin_mapping_main_effect */
  4168. vec3 emission; /* skin_mapping_main_effect */
  4169. vec3 fragment_normal; /* skin_mapping_main_effect */
  4170. float gloss; /* skin_mapping_main_effect */
  4171. vec3 specular; /* skin_mapping_main_effect */
  4172. vec3 fragment_color; /* lighting */
  4173.  
  4174. {
  4175. world_view_direction.xyz = world_position - camera.xyz;
  4176. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  4177. world_view_direction *= inversesqrt(world_view_direction.w);
  4178.  
  4179. }
  4180. {
  4181. albedo = texture2D(effect_sampler_0, world_uv);
  4182. emission = vec3(0.0);
  4183. specular = vec3(0.0);
  4184. gloss = 0.0;
  4185. fragment_normal = normalize(world_normal);
  4186.  
  4187. }
  4188. /* lighting */
  4189. {
  4190. int i; /* lighting */
  4191. vec3 shadow_values; /* lighting */
  4192. vec3 diffuse_colors_sum; /* lighting */
  4193. vec3 specular_colors_sum; /* lighting */
  4194. vec4 light_color; /* lighting */
  4195. vec4 light_position; /* lighting */
  4196. vec3 diffuse_color; /* skin_specular_light */
  4197. vec3 specular_color; /* skin_specular_light */
  4198.  
  4199. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  4200. diffuse_colors_sum += emission;
  4201. specular_colors_sum = vec3(0.0);
  4202.  
  4203. for (i = 0; i < 3; ++i)
  4204. {
  4205. light_color = light_colors[i];
  4206. light_position = light_positions[i];
  4207. {
  4208.  
  4209. vec4 rim;
  4210. vec3 diffuse, dir, reflect_dir, h;
  4211. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  4212. dir = light_position.xyz - world_position * light_color.a;
  4213. dist = dot(dir, dir);
  4214. dir *= inversesqrt(dist);
  4215. h = normalize(-world_view_direction.xyz + dir);
  4216. n_dot_l = dot(fragment_normal, dir);
  4217. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  4218. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  4219. rim = texture(effect_sampler_1, vec2(n_dot_v));
  4220. scale = max(0.0, 1.0 - dist * light_position.w);
  4221. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  4222. exponent = exp2(12.0 * gloss);
  4223. specular = pow(n_dot_h, exponent) * rim.a * scale;
  4224. diffuse_color = light_color.rgb * diffuse;
  4225. specular_color = light_color.rgb * specular;
  4226.  
  4227. }
  4228. diffuse_colors_sum += diffuse_color;
  4229. specular_colors_sum += specular_color;
  4230. }
  4231.  
  4232. fragment_color = diffuse_colors_sum * albedo.rgb;
  4233. fragment_color += specular * specular_colors_sum;
  4234. }
  4235. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  4236. gl_FragColor.a = albedo.a;
  4237. }
  4238.  
  4239. [17:27:28, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  4240. Dynamic exception type: eternal_lands::InvalidParameterException
  4241. std::exception::what: std::exception
  4242. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  4243. 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  4244. 0:123(69): error: type mismatch
  4245. 0:123(79): error: Operands to arithmetic operators must be numeric
  4246. 0:123(87): error: Operands to arithmetic operators must be numeric
  4247. 0:123(92): error: Operands to arithmetic operators must be numeric
  4248.  
  4249. [eternal_lands::errinfo_stack_string_*] =
  4250. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4251. /* actor-alpha default*/
  4252. const int lights_count = 3;
  4253. const int bones_count = 80;
  4254. const int shadow_maps_count = 0;
  4255. const int clipmap_terrain_slices = 4;
  4256. const int render_targets = 1;
  4257.  
  4258. /* functions */
  4259. /**
  4260. * Converts from Lambert Azimuthal Equal-Area
  4261. * projection. Optimized for normalized Uint8 values.
  4262. * @param value The Lambert Azimuthal Equal-Area
  4263. * projection vector to use (0..1).
  4264. * @return The normalized vector.
  4265. */
  4266. vec3 decode_normal(const in vec2 normal)
  4267. {
  4268. vec2 fenc;
  4269. float f, g;
  4270.  
  4271. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  4272. f = dot(fenc, fenc);
  4273. g = sqrt(1.0 - f / 4.0);
  4274. return vec3(fenc * g, 1.0 - f / 2.0);
  4275. }
  4276.  
  4277. /**
  4278. * Convertes the normalized rgb10_a2 vector to the
  4279. * scaled terrain displacement vector.
  4280. * @param value The rgb10_a2 normalized value (0..1).
  4281. * @return The terrain displacement vector.
  4282. */
  4283. vec3 decode_terrain_displacement(const in vec4 vector)
  4284. {
  4285. vec3 result, tmp;
  4286.  
  4287. result = vector.xyz;
  4288. result.xy = result.xy * 2.0 - 1.0;
  4289. result *= vec3(32,32,64);
  4290.  
  4291. return result;
  4292. }
  4293.  
  4294.  
  4295. /* uniforms */
  4296. uniform vec4 camera; /* default_view_direction */
  4297. uniform sampler2D effect_sampler_0; /* skin_mapping_main_effect */
  4298. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  4299. uniform vec4 light_colors[3]; /* lighting */
  4300. uniform vec4 light_positions[3]; /* lighting */
  4301. uniform sampler2D effect_sampler_1; /* skin_specular_light */
  4302. uniform sampler2D effect_sampler_2; /* skin_specular_light */
  4303.  
  4304. /* uniform buffers */
  4305.  
  4306. /* fragment shader input */
  4307. varying vec3 world_normal; /* bone_animation_world_normal_transformation */
  4308. varying vec3 world_position; /* bone_animation_world_normal_transformation */
  4309. varying vec2 world_uv; /* static_uv */
  4310.  
  4311. void main()
  4312. {
  4313. vec4 world_view_direction; /* default_view_direction */
  4314. vec4 albedo; /* skin_mapping_main_effect */
  4315. vec3 emission; /* skin_mapping_main_effect */
  4316. vec3 fragment_normal; /* skin_mapping_main_effect */
  4317. float gloss; /* skin_mapping_main_effect */
  4318. vec3 specular; /* skin_mapping_main_effect */
  4319. vec3 fragment_color; /* lighting */
  4320.  
  4321. {
  4322. world_view_direction.xyz = world_position - camera.xyz;
  4323. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  4324. world_view_direction *= inversesqrt(world_view_direction.w);
  4325.  
  4326. }
  4327. {
  4328. albedo = texture2D(effect_sampler_0, world_uv);
  4329. emission = vec3(0.0);
  4330. specular = vec3(0.0);
  4331. gloss = 0.0;
  4332. fragment_normal = normalize(world_normal);
  4333.  
  4334. }
  4335. if (albedo.a < 0.5)
  4336. {
  4337. discard;
  4338. }
  4339. /* lighting */
  4340. {
  4341. int i; /* lighting */
  4342. vec3 shadow_values; /* lighting */
  4343. vec3 diffuse_colors_sum; /* lighting */
  4344. vec3 specular_colors_sum; /* lighting */
  4345. vec4 light_color; /* lighting */
  4346. vec4 light_position; /* lighting */
  4347. vec3 diffuse_color; /* skin_specular_light */
  4348. vec3 specular_color; /* skin_specular_light */
  4349.  
  4350. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  4351. diffuse_colors_sum += emission;
  4352. specular_colors_sum = vec3(0.0);
  4353.  
  4354. for (i = 0; i < 3; ++i)
  4355. {
  4356. light_color = light_colors[i];
  4357. light_position = light_positions[i];
  4358. {
  4359.  
  4360. vec4 rim;
  4361. vec3 diffuse, dir, reflect_dir, h;
  4362. float dist, scale, specular, exponent, n_dot_h, n_dot_l, n_dot_v;
  4363. dir = light_position.xyz - world_position * light_color.a;
  4364. dist = dot(dir, dir);
  4365. dir *= inversesqrt(dist);
  4366. h = normalize(-world_view_direction.xyz + dir);
  4367. n_dot_l = dot(fragment_normal, dir);
  4368. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  4369. n_dot_v = clamp(dot(fragment_normal, -world_view_direction.xyz), 0.0, 1.0);
  4370. rim = texture(effect_sampler_1, vec2(n_dot_v));
  4371. scale = max(0.0, 1.0 - dist * light_position.w);
  4372. diffuse = texture(effect_sampler_2, vec2(n_dot_l * 0.5 + 0.5)).rgb * rim.rgb * scale * 4.0;
  4373. exponent = exp2(12.0 * gloss);
  4374. specular = pow(n_dot_h, exponent) * rim.a * scale;
  4375. diffuse_color = light_color.rgb * diffuse;
  4376. specular_color = light_color.rgb * specular;
  4377.  
  4378. }
  4379. diffuse_colors_sum += diffuse_color;
  4380. specular_colors_sum += specular_color;
  4381. }
  4382.  
  4383. fragment_color = diffuse_colors_sum * albedo.rgb;
  4384. fragment_color += specular * specular_colors_sum;
  4385. }
  4386. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  4387. gl_FragColor.a = albedo.a;
  4388. }
  4389.  
  4390. [17:27:28, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  4391. Dynamic exception type: eternal_lands::OpenGlException
  4392. std::exception::what: std::exception
  4393. [eternal_lands::errinfo_message_*] = Fragment info
  4394. -------------
  4395. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  4396.  
  4397. [eternal_lands::errinfo_item_name_*] = 26f07ec0-7562-40fe-865a-0480359e2890
  4398. [eternal_lands::errinfo_stack_string_*] =
  4399. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  4400. /* cdlod-terrain-high-quality default*/
  4401. invariant gl_Position; /* make existing gl_Position be invariant */
  4402. varying vec2 terrain_uvs[4];
  4403. varying vec3 world_position;
  4404. varying vec3 world_normal;
  4405. uniform vec4 terrain_scale;
  4406. uniform mat2x3 clipmap_terrain_matrices[4];
  4407. uniform mat4 projection_view_matrix;
  4408. attribute vec4 position;
  4409. attribute vec4 normal;
  4410. void main ()
  4411. {
  4412. vec3 tmpvar_1;
  4413. world_position = position.xyz;
  4414. world_normal = normal.xyz;
  4415. vec4 tmpvar_2;
  4416. tmpvar_2.w = 1.0;
  4417. tmpvar_2.xyz = position.xyz;
  4418. gl_Position = (projection_view_matrix * tmpvar_2);
  4419. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  4420. tmpvar_1.z = 1.0;
  4421. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  4422. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  4423. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  4424. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  4425. }
  4426.  
  4427.  
  4428. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4429. /* cdlod-terrain-high-quality default*/
  4430. varying vec2 terrain_uvs[4];
  4431. varying vec3 world_position;
  4432. varying vec3 world_normal;
  4433. uniform vec4 light_positions[3];
  4434. uniform vec4 light_colors[3];
  4435. uniform mat2x4 sky_ground_hemispheres;
  4436. uniform sampler3D effect_sampler_0;
  4437. uniform vec4 camera;
  4438. void main ()
  4439. {
  4440. vec3 tmpvar_1;
  4441. vec3 tmpvar_2;
  4442. vec3 tmpvar_3;
  4443. int tmpvar_4;
  4444. int tmpvar_5;
  4445. vec4 tmpvar_6;
  4446. tmpvar_6.xyz = (world_position - camera.xyz);
  4447. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  4448. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  4449. tmpvar_4 = 3;
  4450. tmpvar_5 = 2;
  4451. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4452. tmpvar_4 = tmpvar_5;
  4453. };
  4454. tmpvar_5 = 1;
  4455. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4456. if ((1 < tmpvar_4)) {
  4457. tmpvar_4 = tmpvar_5;
  4458. };
  4459. };
  4460. tmpvar_5 = 0;
  4461. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4462. if ((0 < tmpvar_4)) {
  4463. tmpvar_4 = tmpvar_5;
  4464. };
  4465. };
  4466. tmpvar_5 = -1;
  4467. vec3 tmpvar_7;
  4468. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  4469. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  4470. vec4 tmpvar_8;
  4471. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  4472. vec3 tmpvar_9;
  4473. tmpvar_9 = normalize (world_normal);
  4474. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  4475. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  4476. vec4 tmpvar_10;
  4477. tmpvar_10 = light_colors[0];
  4478. vec4 tmpvar_11;
  4479. tmpvar_11 = light_positions[0];
  4480. vec3 tmpvar_12;
  4481. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  4482. float tmpvar_13;
  4483. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  4484. vec3 tmpvar_14;
  4485. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  4486. vec3 tmpvar_15;
  4487. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  4488. float tmpvar_16;
  4489. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  4490. float tmpvar_17;
  4491. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  4492. float tmpvar_18;
  4493. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  4494. float tmpvar_19;
  4495. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  4496. vec3 tmpvar_20;
  4497. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  4498. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4499. vec4 tmpvar_21;
  4500. tmpvar_21.x = tmpvar_18;
  4501. tmpvar_21.y = tmpvar_17;
  4502. tmpvar_21.z = tmpvar_16;
  4503. tmpvar_21.w = tmpvar_19;
  4504. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4505. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  4506. };
  4507. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  4508. tmpvar_2 = tmpvar_1;
  4509. vec4 tmpvar_22;
  4510. tmpvar_22 = light_colors[1];
  4511. vec4 tmpvar_23;
  4512. tmpvar_23 = light_positions[1];
  4513. vec3 tmpvar_24;
  4514. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  4515. float tmpvar_25;
  4516. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  4517. vec3 tmpvar_26;
  4518. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  4519. vec3 tmpvar_27;
  4520. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  4521. float tmpvar_28;
  4522. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  4523. float tmpvar_29;
  4524. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  4525. float tmpvar_30;
  4526. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  4527. float tmpvar_31;
  4528. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  4529. vec3 tmpvar_32;
  4530. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  4531. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4532. vec4 tmpvar_33;
  4533. tmpvar_33.x = tmpvar_30;
  4534. tmpvar_33.y = tmpvar_29;
  4535. tmpvar_33.z = tmpvar_28;
  4536. tmpvar_33.w = tmpvar_31;
  4537. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4538. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  4539. };
  4540. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  4541. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4542. vec4 tmpvar_34;
  4543. tmpvar_34 = light_colors[2];
  4544. vec4 tmpvar_35;
  4545. tmpvar_35 = light_positions[2];
  4546. vec3 tmpvar_36;
  4547. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  4548. float tmpvar_37;
  4549. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  4550. vec3 tmpvar_38;
  4551. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  4552. vec3 tmpvar_39;
  4553. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  4554. float tmpvar_40;
  4555. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  4556. float tmpvar_41;
  4557. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  4558. float tmpvar_42;
  4559. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  4560. float tmpvar_43;
  4561. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  4562. vec3 tmpvar_44;
  4563. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  4564. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4565. vec4 tmpvar_45;
  4566. tmpvar_45.x = tmpvar_42;
  4567. tmpvar_45.y = tmpvar_41;
  4568. tmpvar_45.z = tmpvar_40;
  4569. tmpvar_45.w = tmpvar_43;
  4570. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4571. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  4572. };
  4573. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  4574. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4575. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  4576. gl_FragColor.w = tmpvar_8.w;
  4577. }
  4578.  
  4579.  
  4580. [eternal_lands::errinfo_geometry_shader_*] =
  4581. [17:27:29, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  4582. Dynamic exception type: eternal_lands::OpenGlException
  4583. std::exception::what: std::exception
  4584. [eternal_lands::errinfo_message_*] = Fragment info
  4585. -------------
  4586. 0(34) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  4587.  
  4588. [eternal_lands::errinfo_item_name_*] = c1c52162-c4f8-42ac-b32b-c3beb4ad0fd8
  4589. [eternal_lands::errinfo_stack_string_*] =
  4590. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  4591. /* cdlod-terrain-low-quality default*/
  4592. invariant gl_Position; /* make existing gl_Position be invariant */
  4593. varying vec2 terrain_uvs[4];
  4594. varying vec3 world_position;
  4595. varying vec3 world_normal;
  4596. uniform vec4 terrain_scale;
  4597. uniform mat2x3 clipmap_terrain_matrices[4];
  4598. uniform mat4 projection_view_matrix;
  4599. attribute vec4 position;
  4600. attribute vec4 normal;
  4601. void main ()
  4602. {
  4603. vec3 tmpvar_1;
  4604. world_position = position.xyz;
  4605. world_normal = normal.xyz;
  4606. vec4 tmpvar_2;
  4607. tmpvar_2.w = 1.0;
  4608. tmpvar_2.xyz = position.xyz;
  4609. gl_Position = (projection_view_matrix * tmpvar_2);
  4610. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  4611. tmpvar_1.z = 1.0;
  4612. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  4613. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  4614. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  4615. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  4616. }
  4617.  
  4618.  
  4619. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4620. /* cdlod-terrain-low-quality default*/
  4621. varying vec2 terrain_uvs[4];
  4622. varying vec3 world_position;
  4623. varying vec3 world_normal;
  4624. uniform vec4 light_positions[3];
  4625. uniform vec4 light_colors[3];
  4626. uniform mat2x4 sky_ground_hemispheres;
  4627. uniform sampler3D effect_sampler_0;
  4628. void main ()
  4629. {
  4630. vec3 tmpvar_1;
  4631. int tmpvar_2;
  4632. int tmpvar_3;
  4633. tmpvar_2 = 3;
  4634. tmpvar_3 = 2;
  4635. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4636. tmpvar_2 = tmpvar_3;
  4637. };
  4638. tmpvar_3 = 1;
  4639. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4640. if ((1 < tmpvar_2)) {
  4641. tmpvar_2 = tmpvar_3;
  4642. };
  4643. };
  4644. tmpvar_3 = 0;
  4645. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4646. if ((0 < tmpvar_2)) {
  4647. tmpvar_2 = tmpvar_3;
  4648. };
  4649. };
  4650. tmpvar_3 = -1;
  4651. vec3 tmpvar_4;
  4652. tmpvar_4.xy = terrain_uvs[tmpvar_2];
  4653. tmpvar_4.z = ((float(tmpvar_2) + 0.5) / 4.0);
  4654. vec4 tmpvar_5;
  4655. tmpvar_5 = texture3D (effect_sampler_0, tmpvar_4);
  4656. vec3 tmpvar_6;
  4657. tmpvar_6 = normalize (world_normal);
  4658. tmpvar_1 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_6.z) + 0.5)));
  4659. vec4 tmpvar_7;
  4660. tmpvar_7 = light_colors[0];
  4661. vec4 tmpvar_8;
  4662. tmpvar_8 = light_positions[0];
  4663. vec3 tmpvar_9;
  4664. tmpvar_9 = (tmpvar_8.xyz - (world_position * tmpvar_7.w));
  4665. float tmpvar_10;
  4666. tmpvar_10 = dot (tmpvar_9, tmpvar_9);
  4667. tmpvar_1 = (tmpvar_1 + ((tmpvar_7.xyz * max (0.0, (1.0 - (tmpvar_10 * tmpvar_8.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_9 * inversesqrt (tmpvar_10))))));
  4668. vec4 tmpvar_11;
  4669. tmpvar_11 = light_colors[1];
  4670. vec4 tmpvar_12;
  4671. tmpvar_12 = light_positions[1];
  4672. vec3 tmpvar_13;
  4673. tmpvar_13 = (tmpvar_12.xyz - (world_position * tmpvar_11.w));
  4674. float tmpvar_14;
  4675. tmpvar_14 = dot (tmpvar_13, tmpvar_13);
  4676. tmpvar_1 = (tmpvar_1 + ((tmpvar_11.xyz * max (0.0, (1.0 - (tmpvar_14 * tmpvar_12.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_13 * inversesqrt (tmpvar_14))))));
  4677. vec4 tmpvar_15;
  4678. tmpvar_15 = light_colors[2];
  4679. vec4 tmpvar_16;
  4680. tmpvar_16 = light_positions[2];
  4681. vec3 tmpvar_17;
  4682. tmpvar_17 = (tmpvar_16.xyz - (world_position * tmpvar_15.w));
  4683. float tmpvar_18;
  4684. tmpvar_18 = dot (tmpvar_17, tmpvar_17);
  4685. tmpvar_1 = (tmpvar_1 + ((tmpvar_15.xyz * max (0.0, (1.0 - (tmpvar_18 * tmpvar_16.w)))) * max (0.0, dot (tmpvar_6, (tmpvar_17 * inversesqrt (tmpvar_18))))));
  4686. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_1 * tmpvar_5.xyz))));
  4687. gl_FragColor.w = tmpvar_5.w;
  4688. }
  4689.  
  4690.  
  4691. [eternal_lands::errinfo_geometry_shader_*] =
  4692. [17:27:29, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  4693. Dynamic exception type: eternal_lands::OpenGlException
  4694. std::exception::what: std::exception
  4695. [eternal_lands::errinfo_message_*] = Fragment info
  4696. -------------
  4697. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  4698.  
  4699. [eternal_lands::errinfo_item_name_*] = 11bfb857-c21a-48c1-bf27-5d6945559f73
  4700. [eternal_lands::errinfo_stack_string_*] =
  4701. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  4702. /* cdlod-terrain-medium-quality default*/
  4703. invariant gl_Position; /* make existing gl_Position be invariant */
  4704. varying vec2 terrain_uvs[4];
  4705. varying vec3 world_position;
  4706. varying vec3 world_normal;
  4707. uniform vec4 terrain_scale;
  4708. uniform mat2x3 clipmap_terrain_matrices[4];
  4709. uniform mat4 projection_view_matrix;
  4710. attribute vec4 position;
  4711. attribute vec4 normal;
  4712. void main ()
  4713. {
  4714. vec3 tmpvar_1;
  4715. world_position = position.xyz;
  4716. world_normal = normal.xyz;
  4717. vec4 tmpvar_2;
  4718. tmpvar_2.w = 1.0;
  4719. tmpvar_2.xyz = position.xyz;
  4720. gl_Position = (projection_view_matrix * tmpvar_2);
  4721. tmpvar_1.xy = (position.xy * terrain_scale.zw);
  4722. tmpvar_1.z = 1.0;
  4723. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  4724. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  4725. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  4726. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  4727. }
  4728.  
  4729.  
  4730. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4731. /* cdlod-terrain-medium-quality default*/
  4732. varying vec2 terrain_uvs[4];
  4733. varying vec3 world_position;
  4734. varying vec3 world_normal;
  4735. uniform vec4 light_positions[3];
  4736. uniform vec4 light_colors[3];
  4737. uniform mat2x4 sky_ground_hemispheres;
  4738. uniform sampler3D effect_sampler_0;
  4739. uniform vec4 camera;
  4740. void main ()
  4741. {
  4742. vec3 tmpvar_1;
  4743. vec3 tmpvar_2;
  4744. vec3 tmpvar_3;
  4745. int tmpvar_4;
  4746. int tmpvar_5;
  4747. vec4 tmpvar_6;
  4748. tmpvar_6.xyz = (world_position - camera.xyz);
  4749. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  4750. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  4751. tmpvar_4 = 3;
  4752. tmpvar_5 = 2;
  4753. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4754. tmpvar_4 = tmpvar_5;
  4755. };
  4756. tmpvar_5 = 1;
  4757. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4758. if ((1 < tmpvar_4)) {
  4759. tmpvar_4 = tmpvar_5;
  4760. };
  4761. };
  4762. tmpvar_5 = 0;
  4763. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  4764. if ((0 < tmpvar_4)) {
  4765. tmpvar_4 = tmpvar_5;
  4766. };
  4767. };
  4768. tmpvar_5 = -1;
  4769. vec3 tmpvar_7;
  4770. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  4771. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  4772. vec4 tmpvar_8;
  4773. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  4774. vec3 tmpvar_9;
  4775. tmpvar_9 = normalize (world_normal);
  4776. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  4777. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  4778. vec4 tmpvar_10;
  4779. tmpvar_10 = light_colors[0];
  4780. vec4 tmpvar_11;
  4781. tmpvar_11 = light_positions[0];
  4782. vec3 tmpvar_12;
  4783. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  4784. float tmpvar_13;
  4785. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  4786. vec3 tmpvar_14;
  4787. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  4788. vec3 tmpvar_15;
  4789. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  4790. float tmpvar_16;
  4791. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  4792. float tmpvar_17;
  4793. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  4794. float tmpvar_18;
  4795. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  4796. float tmpvar_19;
  4797. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  4798. vec3 tmpvar_20;
  4799. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  4800. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4801. vec4 tmpvar_21;
  4802. tmpvar_21.x = tmpvar_18;
  4803. tmpvar_21.y = tmpvar_17;
  4804. tmpvar_21.z = tmpvar_16;
  4805. tmpvar_21.w = tmpvar_19;
  4806. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4807. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  4808. };
  4809. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  4810. tmpvar_2 = tmpvar_1;
  4811. vec4 tmpvar_22;
  4812. tmpvar_22 = light_colors[1];
  4813. vec4 tmpvar_23;
  4814. tmpvar_23 = light_positions[1];
  4815. vec3 tmpvar_24;
  4816. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  4817. float tmpvar_25;
  4818. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  4819. vec3 tmpvar_26;
  4820. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  4821. vec3 tmpvar_27;
  4822. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  4823. float tmpvar_28;
  4824. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  4825. float tmpvar_29;
  4826. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  4827. float tmpvar_30;
  4828. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  4829. float tmpvar_31;
  4830. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  4831. vec3 tmpvar_32;
  4832. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  4833. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4834. vec4 tmpvar_33;
  4835. tmpvar_33.x = tmpvar_30;
  4836. tmpvar_33.y = tmpvar_29;
  4837. tmpvar_33.z = tmpvar_28;
  4838. tmpvar_33.w = tmpvar_31;
  4839. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4840. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  4841. };
  4842. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  4843. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4844. vec4 tmpvar_34;
  4845. tmpvar_34 = light_colors[2];
  4846. vec4 tmpvar_35;
  4847. tmpvar_35 = light_positions[2];
  4848. vec3 tmpvar_36;
  4849. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  4850. float tmpvar_37;
  4851. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  4852. vec3 tmpvar_38;
  4853. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  4854. vec3 tmpvar_39;
  4855. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  4856. float tmpvar_40;
  4857. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  4858. float tmpvar_41;
  4859. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  4860. float tmpvar_42;
  4861. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  4862. float tmpvar_43;
  4863. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  4864. vec3 tmpvar_44;
  4865. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  4866. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  4867. vec4 tmpvar_45;
  4868. tmpvar_45.x = tmpvar_42;
  4869. tmpvar_45.y = tmpvar_41;
  4870. tmpvar_45.z = tmpvar_40;
  4871. tmpvar_45.w = tmpvar_43;
  4872. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  4873. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  4874. };
  4875. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  4876. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  4877. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  4878. gl_FragColor.w = tmpvar_8.w;
  4879. }
  4880.  
  4881.  
  4882. [eternal_lands::errinfo_geometry_shader_*] =
  4883. [17:27:29, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  4884. Dynamic exception type: eternal_lands::InvalidParameterException
  4885. std::exception::what: std::exception
  4886. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  4887. 0:95(57): error: type mismatch
  4888.  
  4889. [eternal_lands::errinfo_stack_string_*] =
  4890. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  4891. /* normal and specular mapping default*/
  4892. const int lights_count = 3;
  4893. const int bones_count = 80;
  4894. const int shadow_maps_count = 0;
  4895. const int clipmap_terrain_slices = 4;
  4896. const int render_targets = 1;
  4897.  
  4898. /* functions */
  4899. /**
  4900. * Converts from Lambert Azimuthal Equal-Area
  4901. * projection. Optimized for normalized Uint8 values.
  4902. * @param value The Lambert Azimuthal Equal-Area
  4903. * projection vector to use (0..1).
  4904. * @return The normalized vector.
  4905. */
  4906. vec3 decode_normal(const in vec2 normal)
  4907. {
  4908. vec2 fenc;
  4909. float f, g;
  4910.  
  4911. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  4912. f = dot(fenc, fenc);
  4913. g = sqrt(1.0 - f / 4.0);
  4914. return vec3(fenc * g, 1.0 - f / 2.0);
  4915. }
  4916.  
  4917. /**
  4918. * Convertes the normalized rgb10_a2 vector to the
  4919. * scaled terrain displacement vector.
  4920. * @param value The rgb10_a2 normalized value (0..1).
  4921. * @return The terrain displacement vector.
  4922. */
  4923. vec3 decode_terrain_displacement(const in vec4 vector)
  4924. {
  4925. vec3 result, tmp;
  4926.  
  4927. result = vector.xyz;
  4928. result.xy = result.xy * 2.0 - 1.0;
  4929. result *= vec3(32,32,64);
  4930.  
  4931. return result;
  4932. }
  4933.  
  4934.  
  4935. /* uniforms */
  4936. uniform vec4 camera; /* default_view_direction */
  4937. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  4938. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  4939. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  4940. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  4941. uniform vec4 light_colors[3]; /* lighting */
  4942. uniform vec4 light_positions[3]; /* lighting */
  4943.  
  4944. /* uniform buffers */
  4945.  
  4946. /* fragment shader input */
  4947. varying vec3 world_normal; /* static_world_tangent_transformation */
  4948. varying vec3 world_position; /* static_world_tangent_transformation */
  4949. varying vec4 world_tangent; /* static_world_tangent_transformation */
  4950. varying vec2 world_uv; /* static_uv */
  4951.  
  4952. void main()
  4953. {
  4954. vec4 world_view_direction; /* default_view_direction */
  4955. mat3 tbn_matrix; /* default_tbn_matrix */
  4956. vec4 albedo; /* normal_specular_mapping_main_effect */
  4957. vec3 emission; /* normal_specular_mapping_main_effect */
  4958. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  4959. float gloss; /* normal_specular_mapping_main_effect */
  4960. vec3 specular; /* normal_specular_mapping_main_effect */
  4961. vec3 fragment_color; /* lighting */
  4962.  
  4963. {
  4964. world_view_direction.xyz = world_position - camera.xyz;
  4965. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  4966. world_view_direction *= inversesqrt(world_view_direction.w);
  4967.  
  4968. }
  4969. {
  4970. tbn_matrix[0] = world_tangent.xyz;
  4971. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  4972. tbn_matrix[2] = world_normal;
  4973.  
  4974. }
  4975. {
  4976. vec3 normal;
  4977. vec2 specular_gloss;
  4978. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  4979. normal.xy = normal.xy * 2.0 - 1.0;
  4980. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  4981. fragment_normal = tbn_matrix * normal.xyz;
  4982. albedo = texture2D(effect_sampler_0, world_uv);
  4983. emission = vec3(0.0);
  4984. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  4985. specular = specular_gloss.rrr;
  4986. gloss = specular_gloss.g;
  4987.  
  4988. }
  4989. /* lighting */
  4990. {
  4991. int i; /* lighting */
  4992. vec3 shadow_values; /* lighting */
  4993. vec3 diffuse_colors_sum; /* lighting */
  4994. vec3 specular_colors_sum; /* lighting */
  4995. vec4 light_color; /* lighting */
  4996. vec4 light_position; /* lighting */
  4997. vec3 diffuse_color; /* specular_light */
  4998. vec3 specular_color; /* specular_light */
  4999.  
  5000. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  5001. diffuse_colors_sum += emission;
  5002. specular_colors_sum = vec3(0.0);
  5003.  
  5004. for (i = 0; i < 3; ++i)
  5005. {
  5006. light_color = light_colors[i];
  5007. light_position = light_positions[i];
  5008. {
  5009. vec3 dir, reflect_dir, h;
  5010. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  5011. dir = light_position.xyz - world_position * light_color.a;
  5012. dist = dot(dir, dir);
  5013. dir *= inversesqrt(dist);
  5014. h = normalize(-world_view_direction.xyz + dir);
  5015. #if 0
  5016. n_dot_l = max(0.0, dot(fragment_normal, dir));
  5017. n_dot_h = max(0.0, dot(fragment_normal, h));
  5018. l_dot_h = max(0.0, dot(dir, h));
  5019. #else
  5020. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  5021. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  5022. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  5023. #endif
  5024. nxdir = n_dot_l;
  5025. scale = max(0.0, 1.0 - dist * light_position.w);
  5026. diffuse = scale * nxdir;
  5027. diffuse_color = light_color.rgb * diffuse;
  5028. specular_color = vec3(0.0);
  5029. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  5030. {
  5031. exponent = exp2(12.0 * gloss);
  5032. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  5033. specular_color += light_color.rgb * specular;
  5034. }
  5035.  
  5036. }
  5037. diffuse_colors_sum += diffuse_color;
  5038. specular_colors_sum += specular_color;
  5039. }
  5040.  
  5041. fragment_color = diffuse_colors_sum * albedo.rgb;
  5042. fragment_color += specular * specular_colors_sum;
  5043. }
  5044. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  5045. gl_FragColor.a = albedo.a;
  5046. }
  5047.  
  5048. [17:27:29, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersourcebuilder.cpp(683): Throw in function eternal_lands::String eternal_lands::{anonymous}::OptimizeShaderSource::get_source()
  5049. Dynamic exception type: eternal_lands::InvalidParameterException
  5050. std::exception::what: std::exception
  5051. [eternal_lands::errinfo_message_*] = 0:0(0): error: no matching function for call to `texture(sampler2D, vec2)'
  5052. 0:95(57): error: type mismatch
  5053.  
  5054. [eternal_lands::errinfo_stack_string_*] =
  5055. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  5056. /* normal and specular mapping with alpha default*/
  5057. const int lights_count = 3;
  5058. const int bones_count = 80;
  5059. const int shadow_maps_count = 0;
  5060. const int clipmap_terrain_slices = 4;
  5061. const int render_targets = 1;
  5062.  
  5063. /* functions */
  5064. /**
  5065. * Converts from Lambert Azimuthal Equal-Area
  5066. * projection. Optimized for normalized Uint8 values.
  5067. * @param value The Lambert Azimuthal Equal-Area
  5068. * projection vector to use (0..1).
  5069. * @return The normalized vector.
  5070. */
  5071. vec3 decode_normal(const in vec2 normal)
  5072. {
  5073. vec2 fenc;
  5074. float f, g;
  5075.  
  5076. fenc = normal * vec2(3.968871595) - vec2(1.984435798);
  5077. f = dot(fenc, fenc);
  5078. g = sqrt(1.0 - f / 4.0);
  5079. return vec3(fenc * g, 1.0 - f / 2.0);
  5080. }
  5081.  
  5082. /**
  5083. * Convertes the normalized rgb10_a2 vector to the
  5084. * scaled terrain displacement vector.
  5085. * @param value The rgb10_a2 normalized value (0..1).
  5086. * @return The terrain displacement vector.
  5087. */
  5088. vec3 decode_terrain_displacement(const in vec4 vector)
  5089. {
  5090. vec3 result, tmp;
  5091.  
  5092. result = vector.xyz;
  5093. result.xy = result.xy * 2.0 - 1.0;
  5094. result *= vec3(32,32,64);
  5095.  
  5096. return result;
  5097. }
  5098.  
  5099.  
  5100. /* uniforms */
  5101. uniform vec4 camera; /* default_view_direction */
  5102. uniform sampler2D effect_sampler_0; /* normal_specular_mapping_main_effect */
  5103. uniform sampler2D effect_sampler_1; /* normal_specular_mapping_main_effect */
  5104. uniform sampler2D effect_sampler_2; /* normal_specular_mapping_main_effect */
  5105. uniform mat2x4 sky_ground_hemispheres; /* lighting */
  5106. uniform vec4 light_colors[3]; /* lighting */
  5107. uniform vec4 light_positions[3]; /* lighting */
  5108.  
  5109. /* uniform buffers */
  5110.  
  5111. /* fragment shader input */
  5112. varying vec3 world_normal; /* static_world_tangent_transformation */
  5113. varying vec3 world_position; /* static_world_tangent_transformation */
  5114. varying vec4 world_tangent; /* static_world_tangent_transformation */
  5115. varying vec2 world_uv; /* static_uv */
  5116.  
  5117. void main()
  5118. {
  5119. vec4 world_view_direction; /* default_view_direction */
  5120. mat3 tbn_matrix; /* default_tbn_matrix */
  5121. vec4 albedo; /* normal_specular_mapping_main_effect */
  5122. vec3 emission; /* normal_specular_mapping_main_effect */
  5123. vec3 fragment_normal; /* normal_specular_mapping_main_effect */
  5124. float gloss; /* normal_specular_mapping_main_effect */
  5125. vec3 specular; /* normal_specular_mapping_main_effect */
  5126. vec3 fragment_color; /* lighting */
  5127.  
  5128. {
  5129. world_view_direction.xyz = world_position - camera.xyz;
  5130. world_view_direction.w = dot(world_view_direction.xyz, world_view_direction.xyz);
  5131. world_view_direction *= inversesqrt(world_view_direction.w);
  5132.  
  5133. }
  5134. {
  5135. tbn_matrix[0] = world_tangent.xyz;
  5136. tbn_matrix[1] = cross(world_normal, world_tangent.xyz) * world_tangent.w;
  5137. tbn_matrix[2] = world_normal;
  5138.  
  5139. }
  5140. {
  5141. vec3 normal;
  5142. vec2 specular_gloss;
  5143. normal.xy = texture2D(effect_sampler_1, world_uv).xy;
  5144. normal.xy = normal.xy * 2.0 - 1.0;
  5145. normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));
  5146. fragment_normal = tbn_matrix * normal.xyz;
  5147. albedo = texture2D(effect_sampler_0, world_uv);
  5148. emission = vec3(0.0);
  5149. specular_gloss = texture(effect_sampler_2, world_uv).ra;
  5150. specular = specular_gloss.rrr;
  5151. gloss = specular_gloss.g;
  5152.  
  5153. }
  5154. if (albedo.a < 0.5)
  5155. {
  5156. discard;
  5157. }
  5158. /* lighting */
  5159. {
  5160. int i; /* lighting */
  5161. vec3 shadow_values; /* lighting */
  5162. vec3 diffuse_colors_sum; /* lighting */
  5163. vec3 specular_colors_sum; /* lighting */
  5164. vec4 light_color; /* lighting */
  5165. vec4 light_position; /* lighting */
  5166. vec3 diffuse_color; /* specular_light */
  5167. vec3 specular_color; /* specular_light */
  5168.  
  5169. diffuse_colors_sum = sky_ground_hemispheres[0].rgb + sky_ground_hemispheres[1].rgb * (0.5 * fragment_normal.z + 0.5);
  5170. diffuse_colors_sum += emission;
  5171. specular_colors_sum = vec3(0.0);
  5172.  
  5173. for (i = 0; i < 3; ++i)
  5174. {
  5175. light_color = light_colors[i];
  5176. light_position = light_positions[i];
  5177. {
  5178. vec3 dir, reflect_dir, h;
  5179. float dist, scale, nxdir, diffuse, specular, hxdir, exponent, n_dot_h, n_dot_l, l_dot_h;
  5180. dir = light_position.xyz - world_position * light_color.a;
  5181. dist = dot(dir, dir);
  5182. dir *= inversesqrt(dist);
  5183. h = normalize(-world_view_direction.xyz + dir);
  5184. #if 0
  5185. n_dot_l = max(0.0, dot(fragment_normal, dir));
  5186. n_dot_h = max(0.0, dot(fragment_normal, h));
  5187. l_dot_h = max(0.0, dot(dir, h));
  5188. #else
  5189. n_dot_l = clamp(dot(fragment_normal, dir), 0.0, 1.0);
  5190. n_dot_h = clamp(dot(fragment_normal, h), 0.0, 1.0);
  5191. l_dot_h = clamp(dot(dir, h), 0.0, 1.0);
  5192. #endif
  5193. nxdir = n_dot_l;
  5194. scale = max(0.0, 1.0 - dist * light_position.w);
  5195. diffuse = scale * nxdir;
  5196. diffuse_color = light_color.rgb * diffuse;
  5197. specular_color = vec3(0.0);
  5198. if (all(greaterThan(vec4(l_dot_h, n_dot_h, n_dot_l, scale), vec4(0.001))))
  5199. {
  5200. exponent = exp2(12.0 * gloss);
  5201. specular = ((1.0 + exponent) / (8.0 * pow(l_dot_h, 3.0))) * pow(n_dot_h, exponent) * n_dot_l * scale;
  5202. specular_color += light_color.rgb * specular;
  5203. }
  5204.  
  5205. }
  5206. diffuse_colors_sum += diffuse_color;
  5207. specular_colors_sum += specular_color;
  5208. }
  5209.  
  5210. fragment_color = diffuse_colors_sum * albedo.rgb;
  5211. fragment_color += specular * specular_colors_sum;
  5212. }
  5213. gl_FragColor.rgb = 1.0 - exp(-fragment_color);
  5214. gl_FragColor.a = albedo.a;
  5215. }
  5216.  
  5217. [17:27:30, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/glslprogram.cpp(2548): Throw in function void eternal_lands::GlslProgram::do_build(const UniformBufferDescriptionCacheSharedPtr&, const ShaderTypeStringMap&)
  5218. Dynamic exception type: eternal_lands::OpenGlException
  5219. std::exception::what: std::exception
  5220. [eternal_lands::errinfo_message_*] = Fragment info
  5221. -------------
  5222. 0(41) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
  5223.  
  5224. [eternal_lands::errinfo_item_name_*] = 07a5c384-ac2e-49a0-b584-fc25e008be4e
  5225. [eternal_lands::errinfo_stack_string_*] =
  5226. [eternal_lands::errinfo_vertex_shader_*] = #version 120
  5227. /* simple-terrain-all-quality default*/
  5228. invariant gl_Position; /* make existing gl_Position be invariant */
  5229. varying vec2 terrain_uvs[4];
  5230. varying vec3 world_position;
  5231. varying vec3 world_normal;
  5232. uniform vec4 terrain_scale;
  5233. uniform mat2x3 clipmap_terrain_matrices[4];
  5234. uniform mat4 projection_view_matrix;
  5235. uniform mat3x4 world_transformation;
  5236. uniform vec4 dudv_scale_offset;
  5237. attribute vec4 position;
  5238. attribute vec4 morph_position;
  5239. attribute vec4 morph_normal;
  5240. void main ()
  5241. {
  5242. vec3 tmpvar_1;
  5243. vec3 tmpvar_2;
  5244. tmpvar_2 = morph_position.xyz;
  5245. tmpvar_2.xy = ((morph_position.xy * 2.0) - 1.0);
  5246. vec3 tmpvar_3;
  5247. tmpvar_3 = (tmpvar_2 * vec3(32.0, 32.0, 64.0));
  5248. tmpvar_2 = tmpvar_3;
  5249. vec2 tmpvar_4;
  5250. tmpvar_4 = ((morph_normal.xy * vec2(3.96887, 3.96887)) - vec2(1.98444, 1.98444));
  5251. float tmpvar_5;
  5252. tmpvar_5 = dot (tmpvar_4, tmpvar_4);
  5253. vec3 tmpvar_6;
  5254. tmpvar_6.xy = (tmpvar_4 * sqrt ((1.0 - (tmpvar_5 / 4.0))));
  5255. tmpvar_6.z = (1.0 - (tmpvar_5 / 2.0));
  5256. vec4 tmpvar_7;
  5257. tmpvar_7.w = 1.0;
  5258. tmpvar_7.xyz = (tmpvar_3 + position.xyz);
  5259. vec3 tmpvar_8;
  5260. tmpvar_8 = (tmpvar_7 * world_transformation);
  5261. world_position = tmpvar_8;
  5262. mat3 tmpvar_9;
  5263. tmpvar_9[0] = world_transformation[0].xyz;
  5264. tmpvar_9[1] = world_transformation[1].xyz;
  5265. tmpvar_9[2] = world_transformation[2].xyz;
  5266. world_normal = normalize ((tmpvar_6 * tmpvar_9));
  5267. vec4 tmpvar_10;
  5268. tmpvar_10.w = 1.0;
  5269. tmpvar_10.xyz = position.xyz;
  5270. vec4 tmpvar_11;
  5271. tmpvar_11.w = 1.0;
  5272. tmpvar_11.xyz = tmpvar_8;
  5273. gl_Position = (projection_view_matrix * tmpvar_11);
  5274. tmpvar_1.xy = (((tmpvar_10 * world_transformation).xy + ((morph_normal.zw * dudv_scale_offset.xy) + dudv_scale_offset.zw)) * terrain_scale.zw);
  5275. tmpvar_1.z = 1.0;
  5276. terrain_uvs[0] = (tmpvar_1 * clipmap_terrain_matrices[0]);
  5277. terrain_uvs[1] = (tmpvar_1 * clipmap_terrain_matrices[1]);
  5278. terrain_uvs[2] = (tmpvar_1 * clipmap_terrain_matrices[2]);
  5279. terrain_uvs[3] = (tmpvar_1 * clipmap_terrain_matrices[3]);
  5280. }
  5281.  
  5282.  
  5283. [eternal_lands::errinfo_fragment_shader_*] = #version 120
  5284. /* simple-terrain-all-quality default*/
  5285. varying vec2 terrain_uvs[4];
  5286. varying vec3 world_position;
  5287. varying vec3 world_normal;
  5288. uniform vec4 light_positions[3];
  5289. uniform vec4 light_colors[3];
  5290. uniform mat2x4 sky_ground_hemispheres;
  5291. uniform sampler3D effect_sampler_0;
  5292. uniform vec4 camera;
  5293. void main ()
  5294. {
  5295. vec3 tmpvar_1;
  5296. vec3 tmpvar_2;
  5297. vec3 tmpvar_3;
  5298. int tmpvar_4;
  5299. int tmpvar_5;
  5300. vec4 tmpvar_6;
  5301. tmpvar_6.xyz = (world_position - camera.xyz);
  5302. tmpvar_6.w = dot (tmpvar_6.xyz, tmpvar_6.xyz);
  5303. tmpvar_6 = (tmpvar_6 * inversesqrt (tmpvar_6.w));
  5304. tmpvar_4 = 3;
  5305. tmpvar_5 = 2;
  5306. if (all (lessThan (abs ((terrain_uvs[2] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  5307. tmpvar_4 = tmpvar_5;
  5308. };
  5309. tmpvar_5 = 1;
  5310. if (all (lessThan (abs ((terrain_uvs[1] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  5311. if ((1 < tmpvar_4)) {
  5312. tmpvar_4 = tmpvar_5;
  5313. };
  5314. };
  5315. tmpvar_5 = 0;
  5316. if (all (lessThan (abs ((terrain_uvs[0] - vec2(0.5, 0.5))), vec2(0.4995, 0.4995)))) {
  5317. if ((0 < tmpvar_4)) {
  5318. tmpvar_4 = tmpvar_5;
  5319. };
  5320. };
  5321. tmpvar_5 = -1;
  5322. vec3 tmpvar_7;
  5323. tmpvar_7.xy = terrain_uvs[tmpvar_4];
  5324. tmpvar_7.z = ((float(tmpvar_4) + 0.5) / 4.0);
  5325. vec4 tmpvar_8;
  5326. tmpvar_8 = texture3D (effect_sampler_0, tmpvar_7);
  5327. vec3 tmpvar_9;
  5328. tmpvar_9 = normalize (world_normal);
  5329. tmpvar_3 = (sky_ground_hemispheres[0].xyz + (sky_ground_hemispheres[1].xyz * ((0.5 * tmpvar_9.z) + 0.5)));
  5330. tmpvar_2 = vec3(0.0, 0.0, 0.0);
  5331. vec4 tmpvar_10;
  5332. tmpvar_10 = light_colors[0];
  5333. vec4 tmpvar_11;
  5334. tmpvar_11 = light_positions[0];
  5335. vec3 tmpvar_12;
  5336. tmpvar_12 = (tmpvar_11.xyz - (world_position * tmpvar_10.w));
  5337. float tmpvar_13;
  5338. tmpvar_13 = dot (tmpvar_12, tmpvar_12);
  5339. vec3 tmpvar_14;
  5340. tmpvar_14 = (tmpvar_12 * inversesqrt (tmpvar_13));
  5341. vec3 tmpvar_15;
  5342. tmpvar_15 = normalize ((-(tmpvar_6.xyz) + tmpvar_14));
  5343. float tmpvar_16;
  5344. tmpvar_16 = clamp (dot (tmpvar_9, tmpvar_14), 0.0, 1.0);
  5345. float tmpvar_17;
  5346. tmpvar_17 = clamp (dot (tmpvar_9, tmpvar_15), 0.0, 1.0);
  5347. float tmpvar_18;
  5348. tmpvar_18 = clamp (dot (tmpvar_14, tmpvar_15), 0.0, 1.0);
  5349. float tmpvar_19;
  5350. tmpvar_19 = max (0.0, (1.0 - (tmpvar_13 * tmpvar_11.w)));
  5351. vec3 tmpvar_20;
  5352. tmpvar_20 = (tmpvar_10.xyz * (tmpvar_19 * tmpvar_16));
  5353. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  5354. vec4 tmpvar_21;
  5355. tmpvar_21.x = tmpvar_18;
  5356. tmpvar_21.y = tmpvar_17;
  5357. tmpvar_21.z = tmpvar_16;
  5358. tmpvar_21.w = tmpvar_19;
  5359. if (all (greaterThan (tmpvar_21, vec4(0.001, 0.001, 0.001, 0.001)))) {
  5360. tmpvar_1 = (tmpvar_10.xyz * ((((2.0 / (8.0 * pow (tmpvar_18, 3.0))) * pow (tmpvar_17, 1.0)) * tmpvar_16) * tmpvar_19));
  5361. };
  5362. tmpvar_3 = (tmpvar_3 + tmpvar_20);
  5363. tmpvar_2 = tmpvar_1;
  5364. vec4 tmpvar_22;
  5365. tmpvar_22 = light_colors[1];
  5366. vec4 tmpvar_23;
  5367. tmpvar_23 = light_positions[1];
  5368. vec3 tmpvar_24;
  5369. tmpvar_24 = (tmpvar_23.xyz - (world_position * tmpvar_22.w));
  5370. float tmpvar_25;
  5371. tmpvar_25 = dot (tmpvar_24, tmpvar_24);
  5372. vec3 tmpvar_26;
  5373. tmpvar_26 = (tmpvar_24 * inversesqrt (tmpvar_25));
  5374. vec3 tmpvar_27;
  5375. tmpvar_27 = normalize ((-(tmpvar_6.xyz) + tmpvar_26));
  5376. float tmpvar_28;
  5377. tmpvar_28 = clamp (dot (tmpvar_9, tmpvar_26), 0.0, 1.0);
  5378. float tmpvar_29;
  5379. tmpvar_29 = clamp (dot (tmpvar_9, tmpvar_27), 0.0, 1.0);
  5380. float tmpvar_30;
  5381. tmpvar_30 = clamp (dot (tmpvar_26, tmpvar_27), 0.0, 1.0);
  5382. float tmpvar_31;
  5383. tmpvar_31 = max (0.0, (1.0 - (tmpvar_25 * tmpvar_23.w)));
  5384. vec3 tmpvar_32;
  5385. tmpvar_32 = (tmpvar_22.xyz * (tmpvar_31 * tmpvar_28));
  5386. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  5387. vec4 tmpvar_33;
  5388. tmpvar_33.x = tmpvar_30;
  5389. tmpvar_33.y = tmpvar_29;
  5390. tmpvar_33.z = tmpvar_28;
  5391. tmpvar_33.w = tmpvar_31;
  5392. if (all (greaterThan (tmpvar_33, vec4(0.001, 0.001, 0.001, 0.001)))) {
  5393. tmpvar_1 = (tmpvar_22.xyz * ((((2.0 / (8.0 * pow (tmpvar_30, 3.0))) * pow (tmpvar_29, 1.0)) * tmpvar_28) * tmpvar_31));
  5394. };
  5395. tmpvar_3 = (tmpvar_3 + tmpvar_32);
  5396. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  5397. vec4 tmpvar_34;
  5398. tmpvar_34 = light_colors[2];
  5399. vec4 tmpvar_35;
  5400. tmpvar_35 = light_positions[2];
  5401. vec3 tmpvar_36;
  5402. tmpvar_36 = (tmpvar_35.xyz - (world_position * tmpvar_34.w));
  5403. float tmpvar_37;
  5404. tmpvar_37 = dot (tmpvar_36, tmpvar_36);
  5405. vec3 tmpvar_38;
  5406. tmpvar_38 = (tmpvar_36 * inversesqrt (tmpvar_37));
  5407. vec3 tmpvar_39;
  5408. tmpvar_39 = normalize ((-(tmpvar_6.xyz) + tmpvar_38));
  5409. float tmpvar_40;
  5410. tmpvar_40 = clamp (dot (tmpvar_9, tmpvar_38), 0.0, 1.0);
  5411. float tmpvar_41;
  5412. tmpvar_41 = clamp (dot (tmpvar_9, tmpvar_39), 0.0, 1.0);
  5413. float tmpvar_42;
  5414. tmpvar_42 = clamp (dot (tmpvar_38, tmpvar_39), 0.0, 1.0);
  5415. float tmpvar_43;
  5416. tmpvar_43 = max (0.0, (1.0 - (tmpvar_37 * tmpvar_35.w)));
  5417. vec3 tmpvar_44;
  5418. tmpvar_44 = (tmpvar_34.xyz * (tmpvar_43 * tmpvar_40));
  5419. tmpvar_1 = vec3(0.0, 0.0, 0.0);
  5420. vec4 tmpvar_45;
  5421. tmpvar_45.x = tmpvar_42;
  5422. tmpvar_45.y = tmpvar_41;
  5423. tmpvar_45.z = tmpvar_40;
  5424. tmpvar_45.w = tmpvar_43;
  5425. if (all (greaterThan (tmpvar_45, vec4(0.001, 0.001, 0.001, 0.001)))) {
  5426. tmpvar_1 = (tmpvar_34.xyz * ((((2.0 / (8.0 * pow (tmpvar_42, 3.0))) * pow (tmpvar_41, 1.0)) * tmpvar_40) * tmpvar_43));
  5427. };
  5428. tmpvar_3 = (tmpvar_3 + tmpvar_44);
  5429. tmpvar_2 = (tmpvar_2 + tmpvar_1);
  5430. gl_FragColor.xyz = (1.0 - exp (-((tmpvar_3 * tmpvar_8.xyz))));
  5431. gl_FragColor.w = tmpvar_8.w;
  5432. }
  5433.  
  5434.  
  5435. [eternal_lands::errinfo_geometry_shader_*] =
  5436. [17:27:30, effect.cpp:275] exception: /home/Flame/Documents/newEL/Eternal-Lands-master/engine/shader/shadersource.cpp(192): Throw in function const eternal_lands::ShaderSourceData& eternal_lands::ShaderSource::get_data(eternal_lands::ShaderType, eternal_lands::ShaderVersionType) const
  5437. Dynamic exception type: eternal_lands::ItemNotFoundException
  5438. std::exception::what: std::exception
  5439. [eternal_lands::errinfo_message_*] = No shader source data with shader vertex version 120 in 'water_animation_world_normal_transformation' found.
  5440. [eternal_lands::errinfo_stack_string_*] =
  5441. [17:27:30, actor_scripts.c:4400] Error: Data Error in human female(-1): Actor ID out of range -1
  5442. [17:27:30, actor_scripts.c:4400] Error: Data Error in human male(-1): Actor ID out of range -1
  5443. [17:27:30, actor_scripts.c:4400] Error: Data Error in elf female(-1): Actor ID out of range -1
  5444. [17:27:30, actor_scripts.c:4400] Error: Data Error in elf male(-1): Actor ID out of range -1
  5445. [17:27:30, actor_scripts.c:4400] Error: Data Error in dwarf female(-1): Actor ID out of range -1
  5446. [17:27:30, actor_scripts.c:4400] Error: Data Error in dwarf male(-1): Actor ID out of range -1
  5447. [17:27:30, actor_scripts.c:4400] Error: Data Error in wraith(-1): Actor ID out of range -1
  5448. [17:27:30, actor_scripts.c:4400] Error: Data Error in cyclops(-1): Actor ID out of range -1
  5449. [17:27:30, actor_scripts.c:4400] Error: Data Error in beaver(-1): Actor ID out of range -1
  5450. [17:27:30, actor_scripts.c:4400] Error: Data Error in rat(-1): Actor ID out of range -1
  5451. [17:27:30, actor_scripts.c:4400] Error: Data Error in goblin male 2(-1): Actor ID out of range -1
  5452. [17:27:30, actor_scripts.c:4400] Error: Data Error in goblin female 1(-1): Actor ID out of range -1
  5453. [17:27:30, actor_scripts.c:4400] Error: Data Error in deer(-1): Actor ID out of range -1
  5454. [17:27:30, actor_scripts.c:4400] Error: Data Error in bear 1(-1): Actor ID out of range -1
  5455. [17:27:30, actor_scripts.c:4400] Error: Data Error in wolf(-1): Actor ID out of range -1
  5456. [17:27:30, actor_scripts.c:4400] Error: Data Error in white rabbit(-1): Actor ID out of range -1
  5457. [17:27:30, actor_scripts.c:4400] Error: Data Error in brown rabbit(-1): Actor ID out of range -1
  5458. [17:27:30, actor_scripts.c:4400] Error: Data Error in boar(-1): Actor ID out of range -1
  5459. [17:27:30, actor_scripts.c:4400] Error: Data Error in bear 2(-1): Actor ID out of range -1
  5460. [17:27:30, actor_scripts.c:4400] Error: Data Error in snake 1(-1): Actor ID out of range -1
  5461. [17:27:30, actor_scripts.c:4400] Error: Data Error in snake 2(-1): Actor ID out of range -1
  5462. [17:27:30, actor_scripts.c:4400] Error: Data Error in snake 3(-1): Actor ID out of range -1
  5463. [17:27:30, actor_scripts.c:4400] Error: Data Error in fox(-1): Actor ID out of range -1
  5464. [17:27:30, actor_scripts.c:4400] Error: Data Error in puma(-1): Actor ID out of range -1
  5465. [17:27:30, actor_scripts.c:4400] Error: Data Error in ogre male 1(-1): Actor ID out of range -1
  5466. [17:27:30, actor_scripts.c:4400] Error: Data Error in goblin male 1(-1): Actor ID out of range -1
  5467. [17:27:30, actor_scripts.c:4400] Error: Data Error in orc male 1(-1): Actor ID out of range -1
  5468. [17:27:30, actor_scripts.c:4400] Error: Data Error in orc female 1(-1): Actor ID out of range -1
  5469. [17:27:30, actor_scripts.c:4400] Error: Data Error in skeleton(-1): Actor ID out of range -1
  5470. [17:27:30, actor_scripts.c:4400] Error: Data Error in gargoyle 1(-1): Actor ID out of range -1
  5471. [17:27:30, actor_scripts.c:4400] Error: Data Error in gargoyle 2(-1): Actor ID out of range -1
  5472. [17:27:30, actor_scripts.c:4400] Error: Data Error in gargoyle 3(-1): Actor ID out of range -1
  5473. [17:27:30, actor_scripts.c:4400] Error: Data Error in troll(-1): Actor ID out of range -1
  5474. [17:27:30, actor_scripts.c:4400] Error: Data Error in chimeran mountain wolf(-1): Actor ID out of range -1
  5475. [17:27:30, actor_scripts.c:4400] Error: Data Error in gnome female(-1): Actor ID out of range -1
  5476. [17:27:30, actor_scripts.c:4400] Error: Data Error in gnome male(-1): Actor ID out of range -1
  5477. [17:27:30, actor_scripts.c:4400] Error: Data Error in orchan female(-1): Actor ID out of range -1
  5478. [17:27:30, actor_scripts.c:4400] Error: Data Error in orchan male(-1): Actor ID out of range -1
  5479. [17:27:30, actor_scripts.c:4400] Error: Data Error in draegoni female(-1): Actor ID out of range -1
  5480. [17:27:30, actor_scripts.c:4400] Error: Data Error in draegoni male(-1): Actor ID out of range -1
  5481. [17:27:30, actor_scripts.c:4400] Error: Data Error in skunk 1(-1): Actor ID out of range -1
  5482. [17:27:30, actor_scripts.c:4400] Error: Data Error in racoon 1(-1): Actor ID out of range -1
  5483. [17:27:30, actor_scripts.c:4400] Error: Data Error in unicorn 1(-1): Actor ID out of range -1
  5484. [17:27:30, actor_scripts.c:4400] Error: Data Error in chimeran desert wolf(-1): Actor ID out of range -1
  5485. [17:27:30, actor_scripts.c:4400] Error: Data Error in chimeran forest wolf(-1): Actor ID out of range -1
  5486. [17:27:30, actor_scripts.c:4400] Error: Data Error in chimeran arctic wolf(-1): Actor ID out of range -1
  5487. [17:27:30, actor_scripts.c:4400] Error: Data Error in bear 3(-1): Actor ID out of range -1
  5488. [17:27:30, actor_scripts.c:4400] Error: Data Error in bear 4(-1): Actor ID out of range -1
  5489. [17:27:30, actor_scripts.c:4400] Error: Data Error in panther(-1): Actor ID out of range -1
  5490. [17:27:30, actor_scripts.c:4400] Error: Data Error in leopard 1(-1): Actor ID out of range -1
  5491. [17:27:30, actor_scripts.c:4400] Error: Data Error in leopard 2(-1): Actor ID out of range -1
  5492. [17:27:30, actor_scripts.c:4400] Error: Data Error in feran(-1): Actor ID out of range -1
  5493. [17:27:30, actor_scripts.c:4400] Error: Data Error in tiger 1(-1): Actor ID out of range -1
  5494. [17:27:30, actor_scripts.c:4400] Error: Data Error in tiger 2(-1): Actor ID out of range -1
  5495. [17:27:30, actor_scripts.c:4400] Error: Data Error in armed female orc(-1): Actor ID out of range -1
  5496. [17:27:30, actor_scripts.c:4400] Error: Data Error in armed male orc(-1): Actor ID out of range -1
  5497. [17:27:30, actor_scripts.c:4400] Error: Data Error in armed skeleton(-1): Actor ID out of range -1
  5498. [17:27:30, actor_scripts.c:4400] Error: Data Error in phantom warrior(-1): Actor ID out of range -1
  5499. [17:27:30, actor_scripts.c:4400] Error: Data Error in imp(-1): Actor ID out of range -1
  5500. [17:27:30, actor_scripts.c:4400] Error: Data Error in brownie(-1): Actor ID out of range -1
  5501. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider big 1(-1): Actor ID out of range -1
  5502. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider big 2(-1): Actor ID out of range -1
  5503. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider big 3(-1): Actor ID out of range -1
  5504. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider big 4(-1): Actor ID out of range -1
  5505. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider small 1(-1): Actor ID out of range -1
  5506. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider small 2(-1): Actor ID out of range -1
  5507. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider small 3(-1): Actor ID out of range -1
  5508. [17:27:30, actor_scripts.c:4400] Error: Data Error in spider small 4(-1): Actor ID out of range -1
  5509. [17:27:30, actor_scripts.c:4400] Error: Data Error in wood sprite(-1): Actor ID out of range -1
  5510. [17:27:30, actor_scripts.c:4400] Error: Data Error in leprechaun(-1): Actor ID out of range -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement