SHARE
TWEET

Untitled

a guest Mar 10th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [f=-000001] Synced LuaRules: finished loading
  2. [f=-000001] Unsynced LuaRules: starting loading
  3. [f=-000001] Error: gl.BeginEnd: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:235: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  4. [f=-000001] Error: gl.CreateList: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:235: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  5. [f=-000001] Error: gl.BeginEnd: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:251: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  6. [f=-000001] Error: gl.CreateList: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:251: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  7. [f=-000001] Error: gl.BeginEnd: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:267: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  8. [f=-000001] Error: gl.CreateList: error(2) = [string "LuaRules/Gadgets/precipitation.lua"]:267: bad argument #2 to 'math_random' ([spring_lua_unsynced_rand(lower, upper)] empty interval)
  9. >> dualfog vertex shader
  10. >>   varying vec3 eyeDir;
  11.  
  12.   void main(void)
  13.   {
  14.     gl_TexCoord[0] = gl_MultiTexCoord0;
  15.     eyeDir = gl_MultiTexCoord1.xyz;
  16.     gl_Position = ftransform();
  17.   }
  18.  
  19. >> dualfog fragment shader:
  20. >> const float fogAtten  = 0.005;float fogHeight = 400;const vec3  fogColor = vec3(0.80000001,0.85000002,0.94999999);  uniform sampler2D tex0;
  21.   uniform float wp11;
  22.   uniform float wp15;
  23.   uniform vec3 eyePos;
  24.   varying vec3 eyeDir;
  25.    
  26.  
  27.   void main(void)
  28.   {
  29.     vec2 txcd = vec2(gl_TexCoord[0]);
  30.  
  31.     float z    = texture2D(tex0, txcd).x;
  32.  
  33.     float d = wp15 / (((z * 2.0) - 1.0) + wp11);
  34.  
  35.     vec3 toPoint = (d * eyeDir);
  36.     vec3 worldPos = eyePos + toPoint;
  37.  
  38. #ifdef DEBUG_GFX // world position debugging
  39.     const float k  = 100.0;
  40.     vec3 debugColor = pow(2.0 * abs(0.5 - fract(worldPos / k)), 6.0);
  41.     gl_FragColor = vec4(debugColor, 1.0);
  42.     return; // BAIL
  43. #endif
  44.  
  45. //  fogHeight= 255*(time()%5);
  46.  
  47.     float h0 = clamp(worldPos.y, 0.0, fogHeight);
  48.     float h1 = clamp(eyePos.y,   0.0, fogHeight); // FIXME: uniform ...
  49.     float attenFactor = 1.0 - (0.5 * (h0 + h1) / fogHeight);
  50.  
  51.     float len = length(toPoint);
  52.     float dist = len * abs((h1 - h0) / toPoint.y); // div-by-zero prob?
  53.     float atten = clamp(1.0 - exp(-dist * attenFactor * fogAtten), 0.0, 1.0);
  54.  
  55.     gl_FragColor = vec4(fogColor, atten);
  56.  
  57.     return;
  58.   }
  59.  
  60. >> Loaded gadget:  Engine Taskbar Stuff  <engine_taskbar_stuff.lua>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top