Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. ok, I seem to remember that fixed my ragdolls, but I might be wrong. Tru turning off occlusion culling aswell.
  2. You have to update the AABB each loop. --Update the model local and global AABBs so the renderer keeps proper track of it model:UpdateAABB(Entity.LocalAABB) model:UpdateAABB(Entity.GlobalAABB)
  3. You should look at my head then, It's so tesselated you can't see it anymore.
  4. You can recalculate normals with a geometry shader as flat like this: (will override all mesh smoothing) vec3 edge1 = vertex_position[1].xyz-vertex_position[0].xyz; vec3 edge2 = vertex_position[2].xyz-vertex_position[0].xyz; mat4 nm=transpose((cameramatrix)); vec3 faceNorm = mat3(nm) * normalize(cross(edge2,edge1));
  5. Hi, you should be able to use these to detect this: http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetaabb-r169 http://www.leadwerks.com/werkspace/page/api-reference/_/aabb/aabbintersectsaabb-r609
  6. Gave it a test, it exports 121 obj files for the terrain patch alone, but they are transformed so you can put all at 0,0,0 and they fit perfectly toghether. UV maps are a mess, so textures are not looking like they do in the geovox. I used old LE2 tools to mass convert obj into gmf.
  7. Missing in docs : http://www.leadwerks.com/werkspace/page/api-reference/_/decal/ Decal:SetRenderMode() Decal:GetRenderMode() Seems like decals inherits entity, so you can use all entity functions aswell. Also Material has a new setting which I think should be put in. Material:SetDecalMode(int) // 0 is static and 1 is dynamic ?
  8. Blend solid, use alphamasking (not blending)
  9. Aha... I just got it, both target material and decal material needs to be dynamic. Just kill this report. The official zombie addon have a static decal setting.
  10. In FPSgun.lua : (does not work): if enemy~=nil then mtl = Material:Load("Materials/Decals/wound.mat") scale = 0.25 rendermode = 0 Should be (atleast they work for me then): if enemy~=nil then mtl = Material:Load("Materials/Decals/wound.mat") scale = 0.25 rendermode = 1 I can see blood on the crawler or zombie.
  11. Like this : //find center vec2 uv = (ex_texcoords0-0.5); //rotate float sinx = sin ( 0.001 * currenttime ); float cosx = cos ( 0.001 * currenttime ); float siny = sin ( 0.001 * currenttime ); mat2 rotmatrix = mat2( cosx, -sinx, siny, cosx); //apply matrix and restore uv (0.5) vec2 rotuv = rotmatrix*uv+0.5; //fetch texture using new uv coordinates outcolor *= texture(texture0,rotuv);
  12. Ah center rotation, just subtract 0.5 from coordinates, rotate and add 0.5.
  13. if you just need a fast 90 degree or 180 rotation, you can switch ex_texoords0.xy with yx and -xy -yx etc..
  14. You can apply a 2x2 rotation matrix to the texcoords, something like this would rotate the texture : float sinx = sin ( 0.0001 * currenttime ); float cosx = cos ( 0.0001 * currenttime ); float siny = sin ( 0.0001 * currenttime ); mat2 rotmatrix = mat2( cosx, -sinx, siny, cosx); vec2 rotuv = rotmatrix*ex_texcoords0; Then use rotuv instead of ex_texcoords0 when you lookup the texture.
  15. I liked gosub and goto, don't look down on those, they were useful
  16. shadmar

    Ocean shader

    If your game is free, you can still use the seascape shader.
  17. Yeah we worked hard on that one, but Igor cracked in the end
  18. Great to see these features coming into play
  19. make it deep or play with SHALLOWRANGE in the shader
  20. OpenAL is required to run anything Leadwerks made. There should be an installer in the utilties folder : oalinst.exe
  21. Here is one second timer in a loop: function Script:Start() lasttime=0 end function Script:UpdateWorld() if Time:GetCurrent()-1000 >= lasttime then lasttime = Time:GetCurrent() System:Print("one second has just passed...") end end
  22. I have some flat elevated raws you can have if you want, they allow carving into. flat_raw_all_sizes.zip
  23. Maybe this will help : http://www.leadwerks.com/werkspace/page/tutorials/_/switches-and-the-flowgraph-r26 It's part of the fps tutorial : http://www.leadwerks.com/werkspace/page/tutorials/_/advanced-fps-game-r22
×
×
  • Create New...