Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. They are reflections, they are suppose to reflect environment when you move the camera. Show me a video and your shader.
  2. That looks like smoothing problems. What happens if you recalc normals using 35 or 50 degree angle.
  3. Edit: Josh I think calculation for reflective cubemap is wrong. line 63 and 64 : //reflectdir.y *= -1.0; //no need cubecoord = reflect(cubecoord,reflectdir); //reflect cubecoord by reflectdir not the other way around
  4. Yeah, I don't think you can seed LE's RNG using this.
  5. Aha.. math.randomseed(Time:Millisecs()) always gives you randoms even in Start(). Seems like Time:Millisecs() returns the system time in milliseconds, not apptime. http://www.leadwerks.com/werkspace/page/api-reference/_/time/timemillisecs-r496 So there you go.. proper way
  6. shadmar

    Character Sketches

    Order of likeness : 3,2,1
  7. You can use this unless you're doing randoms before rendering starts. There will be tiny variations in rendering speed. first 5 will always be the same since GetSpeed is then 0 after first frame you will have randoms. function Script:UpdateWorld() math.randomseed(Time:GetSpeed()*43758.5453) for x=0,4,1 do System:Print(math.random()) end System:Print(" ---- ") end
  8. No. But you can increase the camera range and have no occlusion culling.
  9. .fbx looks fine when imported to LE. (when given a material with skinning shaders) .mdl file looks wierd on the animation yes.
  10. Just add this line at the bottom of the shader to burn red. if (NoiseV<InvAlpha+0.025) fragData2 = vec4(1.0,0.0,0.0,specular); 0.025 is the width of the burn, 1.0,0.0,0.0,0.0 is the color. EDIT: it's already in there in the zips above, however after the decal update, materialflags were moved.
  11. Maybe related, but terrain gets really low quality when activating water. Load up 08-Terrain.map and just turn water on/off to see the change. Nividia GTX770M
  12. Great addition! If you could add the .mat files aswell I'd be great
  13. This generates clouds in the DayNight.shader if you change ctime to -ctime they go the opposite way. vec3 cloud2(float cloudheight,float scale) { vec2 p=vec2(vp.zx/(vp.y))*cloudheight; vec3 c = vec3(.0, .0, .2); c.rgb += vec3(.6, .6, .8) * cloud(p*.3+ctime*.0002,scale)*.5; c.gbr += vec3(.8, .8, 1.) * cloud(p*.2+ctime*.0002,scale)*.1; c.grb += vec3(1., 1., 1.) * cloud(p*.1+ctime*.0002,scale)*1.; return c.rrr; }
  14. Steam hiccup from time to time, usually clears if you restart Steam. (kill the boostrapper if it doesn't shut down entirly)
  15. Thanks for the snap button
  16. Old post : http://www.leadwerks.com/werkspace/blog/101/entry-980-le3-pre-terrain-possibility-using-bryce7-and-splatting/
  17. Yes, I think I did a blog aswell.
  18. lensflare bounce off everything bright:
  19. Here is a nice cull script I've used alot --optimize scene place objects in viewrange based on their aabb radius. for i=0,world:CountEntities()-1 do if world:GetEntity(i):GetClass()==Object.ModelClass then local aabb=world:GetEntity(i):GetAABB(Entity.GlobalAABB) if aabb and aabb.radius < .1 then world:GetEntity(i):SetViewRange(0) elseif aabb and aabb.radius < 1 then world:GetEntity(i):SetViewRange(1) elseif aabb and aabb.radius < 10 then world:GetEntity(i):SetViewRange(2) elseif aabb and aabb.radius < 20 then world:GetEntity(i):SetViewRange(3) else world:GetEntity(i):SetViewRange(4) end end end
  20. Realtime reflections using dual parabolic env shader (2 extra cameras with the new render to texture) But there is a caveat..., since I can't hide the reflection object before the render to texture, I have to place the cameras inside the sphere. So.. it will only work for spheres. Arbitrary geometry would self reflect.
  21. Decals triggered a change in the channels http://www.leadwerks.com/werkspace/topic/13062-gbuffer-modification-for-decals
  22. Found my project, just move the skin with the torso like each loop: self.skin:SetPosition(self.torso:GetPosition()) --keep AABB inplace.
×
×
  • Create New...