Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. You can also fetch it here : http://web.archive.org/web/20120728123827/http://www.leadwerks.com/wiki/index.php?title=Main_Page
  2. Light property View Range is resetted to MAX.(in the editor atleast on reload/prefabs. Updated to latest today.
  3. I did not get() *it, but good::point
  4. http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/importing-assets-r682 Leadwerks 3 imports .fbx or .gmf models. If you have any other formats I suggest you convert those to gmf or fbx first.
  5. Answered here (for the scale/offset part) : http://www.leadwerks...bsp/#entry53169
  6. Yes it works by changing to self.material as macklebee suggests.
  7. Yeah I agree, Map should be an entity with loaded children.
  8. Strange... put before setmaterial : self.buttonMaterial:SetBlendMode(1) change anything? I don't know really.
  9. If you know your boundries, ForEachEntityInAABBDo maybe be used to index them all.
  10. In mat editor, select BlendMode : Alpha Works for me on csg geometry using alpha material.
  11. Yes you can load a model at anytime. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/model/modelload-r352
  12. That looks very nice. LE2 renderer still or changed?
  13. shadmar

    sky box

    Here is a skydome (supportes mobile also) http://www.leadwerks.com/werkspace/files/file/403-le3-simple-skydomeshader/
  14. This is a win, and a new shader programmer is born
  15. Aren't they just initialized variables, just change them in App:Loop() as you se fit?
  16. It's a uniform, that means it should be sendt from the application. All uniforms are inputs to a shader from an application. don't initialize it (might not work on mobile then) I'm at work so I can't test app code until later. ps! I might forgot to mention, but shader:SetVec3() should be ran at every loop. Also write out some debug info on these so you know you actually found correct material and shader: (make sure material isn't returning NULL) surface = entity:GetSurface() material = surface:GetMaterial() shader = material:GetShader() Here is a nice example on how to debug material : http://www.leadwerks...etmaterial-r127
  17. I only tested the shader by hardcoding the tileselect value directly, hence the pseudo for the app code. I will try to make a quick lua example for it. Oh to support normalmaps you need to change the texture2D for the normalmap too.
  18. should work for mobile also, just follow the convention like using uniform highp instead of uniform..
  19. @Rick Ok.. change shader you want to use (ex : Dynamic\diffuse.shader) : Find : uniform vec4 lighting_ambient; Add below : uniform vec3 tileselect; Find : outcolor *= texture2D(texture0,ex_texcoords0); Replace it so it reads : outcolor *= texture2D(texture0,vec2(ex_texcoords0.x*tileselect.z+tileselect.z*tileselect.x,ex_texcoords0.y*tileselect.z+tileselect.z*tileselect.y)); That's it for the shader part. In your application, you need to do this for a 3x3 texture in psuedo : surface = entity:GetSurface() material = surface:GetMaterial() shader = material:GetShader() shader:SetVec3("tileselect",tile_x,tile_y,1.0/3.0) --1.0/4.0 if you use a 4x4 texture and so on... tile_x and tile_y is typical 0,0 --> 2,2 for a 3x3 texture. Let me know how it works out.
  20. You can already do this I think, wouldn't this just be plain uvmapping?
  21. Yes they are abit darker Iv'e noticed, it's a compromise to have bth a lightmap and dynamic light, I don't like it that much either. Hoping we can get some normal/specular data into the ordinary lightmaps.
  22. I've been using this for finding all materials on all entities : App.world:ForEachVisibleEntityDo(self.entity,"Callback",App.context)
  23. Nice, does it work with multiple materials? (my test scene have 20 materials) That's not really relevant, it's not a tools competition
×
×
  • Create New...