Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. Never played Theif, but Styx was nice. Also splinter cell games back in the days.
  2. Ah sorry forgot to include that passthrough shader, but yes you can fetch it in the workshop anyway.
  3. ...or just a better way to detect light, you're exposed to, my way is really a long way to go.
  4. Remember to sample it using texelFetch, you can look at my underwater shader which uses this to apply caustics on normal.y
  5. Music : http://incompetech.com/music/royalty-free/collections.php CC3.0 (great stuff, free if attributed for any usage) http://www.leadwerks.com/werkspace/topic/10481-free-music-resource/page__hl__music (Eric)
  6. Ok here is my test project: How to use : 1. Make a lua project. 2. unzip this into your root 3. delete the original <project>.exe 4. rename the rename_to_projectname.exe to <project>.exe (buildt in VS2013 using LE beta) 5. load sneak.map and run it from the editor, F6 If you have Std ed, App.cpp with the lua bind for GetPixles() is added so you can update whenever you want or build for linux yourself. Player's lumnosity you can fetch from anywhere using camera:GetKeyValue("playerlight") https://dl.dropboxusercontent.com/u/11319604/lumdetector.zip
  7. I'll post a little demo with my sources.
  8. If you have std edition you can add this hack for a lua project to read a pixel-value from a texture. So yes it works now but very hacky stuff. (don't yell I know the static cast will make nightmares in the cpp-camp ) So here is my shadow detector: 1. pp effect which reads player lumnosity (lua+.shader) 2. Modified lua exe, added this to support GetPixles() //GetPixels lua port (for 1 pixel) static int GetPix(lua_State *L){ int argc = Interpreter::GetStackSize(); Texture* t; t = static_cast<Leadwerks::Texture*>(Interpreter::ToObject(1)); //texture sent from lua int datasize = t->GetMipmapSize(0); char* pixels = (char*)malloc(datasize); t->GetPixels(pixels); char r; memcpy(&r, pixels+0, 1); delete(pixels); Interpreter::PushFloat(r); //value pushed to lua return 1; } And now we can sneak in the shadows
  9. Well it was good in theory, I have no methods of reading a pixel value in lua from a texture or buffer in lua.
  10. ..and now I had to try. It works, sample 8 points from 2 spheres where one is inverted to get eventual backlight in a pp-shader. The spheres have to be visible to sample them, but I think you can have some gui element drawn over them with no problem. You can even have degrees of visibilty. Like 50% visible if half dark or in shadows etc..
  11. In theory you can sample one/several pixels of the gun (or just a tiny geometry) or something checking it's luminosity in a pp-shader, then check against that on how visible you are in any light to your enemy.
  12. If your system have been runnning for a long time, video memory could just be fragmented or something, if so a cold reboot would fix that. ... or old drivers?
  13. I think I had the same problem a while back, unsubscribed everythng and it started to work, so 50 must be the limit?
  14. Maybe that was the plan, but it still a choice which leads to an error, saying "missing executable".
  15. Superquick mockup (will add to the pack in the ws aswell): #version 400 uniform sampler2D texture1; uniform bool isbackbuffer; uniform vec2 buffersize; out vec4 fragData0; const int downgrade = 6; //at original 1920x1080, 6 yields 320x180 void main(void) { vec4 modula = mod(gl_FragCoord, downgrade); vec2 newCoords = vec2(gl_FragCoord - modula) / buffersize.xy; if (isbackbuffer) newCoords.y = 1.0 - newCoords.y; fragData0 = texture(texture1, newCoords); }
  16. You can't fight Chuck Norris, he fights you, he made PBR blindfolded and owns Allegorithmic.
  17. The crawler have about 40+? children so setpickmode(0,true) should probaly work to set it recursively.
  18. if (world:Pick(posMob, posPlayer,pi, 0, true)) == false then --pick the correct way. return 0 else self.debugSphere3:SetPosition(pi.position) -- set debg sphere where pick was sucessfully hit. local n = pi.entity:GetKeyValue("name","no name?") System:Print(n) --print name of picked item end Also if you print out the pick name you can see Bip HEAD alot that means the mob is picking itself in the head. So maybe pick from infront of the mob or above. or use setpickmode(0) recursive. EDIT: added my small trial. DogAI.zip
  19. It doesn't really work, joints are to weak so it's all jellylike and the ragdoll appears to have death cramps forever. However looking at the newton source there is some basic support for it: https://github.com/MADEAPPS/newton-dynamics/blob/19e5f8b34bdcf72e41ca3b547cc19f31a847b4d1/applications/demosSandbox/sdkDemos/demos/BasicRagDoll.cpp
  20. Rename files from .fx to .shader? I have no idea, I don't have the tool.
×
×
  • Create New...