-
Posts
556 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by havenphillip
-
Randomly generated? That's crazy. It totally feels natural.
-
Ok I got it working. No script needed. Just slap it on an object. Works with posteffects now and no crazy watermode acrobatics. It's a repurpose of the Leadwerks soft particle shader. I set the material settings to blend mode:Alpha, uncheck cast shadows, check two-sided, check depth test, uncheck depth mask, check z-sort, check pick mode. forcefield.zip
-
Yeah I'm just stockpiling right now. I have a bunch of shaders I'll put out in a while. I don't think it will matter that much since I think everyone's moved on from LE4. I get the benefit of having put in the effort, though.
-
That's ok, man. I got the soft particle thing and the forcefield working using this method. The problem I was having was because I had other shaders in my scene using texture4 for something other than depth. They work perfectly now. I don't know why Josh wouldn't just set up a "depth mode" as a permanent thing so that people could use depth buffers for cool stuff. Leadwerks' aversion to shaders is self-defeating, imo.
-
I made this forcefield shader using the watermode depth buffer which works great. I replaced the Leadwerks water shader with this dummy shader: //fragment #version 400 //Uniforms uniform sampler2D texture4;// depth void main(void) { float depth = textureProj(texture4,vec3(1)).r; } //vertex #version 400 #define MAX_INSTANCES 256 void main() { } ... and I used this script to turn on watermode and set the waterplane height: function Script:Start() world = World:GetCurrent() world:SetWaterMode(true) world:SetWaterQuality(1) end function Script:UpdatePhysics() world:SetWaterHeight(3.0) end ... everything works great and the shader works with post effects, which is something I couldn't get accomplished before, AND I'm getting excellent FPS. The problem is I lose the effect as soon as the water plane goes off camera. So I'm thinking if there is a way to create a "depth mode" which keeps the (invisible) water plane on camera at all times that would open up a nice little corner for using the depth buffer for things like a forcefield, water foam, water fog, ground fog, and soft particle falloff effects such as seen here: http://blog.wolfire.com/2010/04/Soft-Particles
-
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
That's ok. I"m not a shader expert either. I appreciate you taking a stab at it. It would be nice to solve it just because it irritates me to find this apparent limitation. I'm hoping someone will read this and be able to tell me at least why it happens. It seems if I set the player (camera) in the scene then create the depth buffer object I can get away with putting the camera variable in the Start() function. But when I turn the player's head the depth buffer wobbles around in odd ways. If I remove the player and put him back in the scene, the depth buffer stops moving around but I then have to grab the camera in the UpdateWorld() function. I don't know if that has to do with the problem and might offer a clue, or if it's just a whole other problem. -
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
No one? Is this thing on? -
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
So this works but it eats up the FPS constantly loading and deleting the shader. Bloom effect brought me all the way down to a constant 7 FPS. Not sure exactly why this works but there's got to be a better way. Anyone? function Script:UpdateWorld() self.world = World:GetCurrent() if self.camera==nil then for i=0,self.world:CountEntities()-1 do if self.world:GetEntity(i):GetClass()==Object.CameraClass then self.camera=self.world:GetEntity(i) tolua.cast(self.camera,"Camera") return end end end depthbuffer:Clear() depthbuffer:Enable() self.camera:ClearPostEffects() <--- world:Render() depthbuffer:Disable() self.camera:AddPostEffect("Shaders/PostEffects/bloom.lua") <--- Context:SetCurrent(context) end -
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
That's what I did. I loaded your null shader. Same results as other posteffect shaders. No line. It's the depth from the Leadwerks water shader, which works while there are posteffects running from what I can tell. So it seems to me there is something that is enabled or present somewhere in water mode that I'm not aware of . -
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
You know what I actually saw your post and tried the null shader. I get nothin. What do you mean by "final result"? I don't even know where to start digging for answers. -
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
-
depth buffer doesn't work with post effects?
havenphillip replied to havenphillip's topic in Programming
bump -
I put together this depth buffer model shader but it doesn't work when I put post effects up. What causes this? How do I fix it/get around the problem? I assume there's a way around it because the depth part of the shader I got right from Josh's water shader. I think it must have something to do with the script, then...something I"m not doing right. Here's the script: function Script:Start() depthbuffer = Buffer:Create(context:GetWidth(),context:GetHeight(),0,1) depth = depthbuffer:GetDepthTexture() surface = self.entity:GetFace(0) mat = surface:GetMaterial() mat:SetBlendMode(Blend.Alpha) mat:SetTexture(depth,4) end function Script:UpdateWorld() depthbuffer:Enable() self.entity:Hide() world:Render() self.entity:Show() Context:SetCurrent(context) end
-
These are great.
-
Yeah man you do cool stuff.
-
Shadertoy/ShaderFrog to Leadwerks tutorial
havenphillip replied to havenphillip's topic in Programming
It's working for me. Did you add the vertex information in the vertex part of the shader? Are you testing it as a post effect in Scene/Root/PostEffects or trying it on a model? -
Awesome .How is it so far? Exceeding expectations? The vibe I'm getting is that it'll be too complicated for someone like me and there won't be any help, so I won't be able to get anywhere with it. I just can't pay $700 for something like that. Looks like it's going to be amazing, though.
-
Nice. I like all those little things you're using to create that ambience.
-
That would be great if he did. Otherwise I wonder if all that work would be kind of obsolete by the time LE5 comes out. I'd get in the practice, though. I'm trying to make a list of shaders if you have any ideas. I want to be reasonably sure I can do it before I commit to it. 52 shaders turns out to be a lot to think about lol. And I don't want to just make goofy little shaders like "procedural checkerboard" or something. I want to make things people might actually use - stuff I would use.
-
So you were never able to fix this?
-
I'm working on this geometry shader I just want to instance a box but the instance disappears when the original goes off screen. Why does this happen? How can I fix it?
-
It's a cool effect. Thanks to Ma-Shell for posting it. I think the only collection of shaders currently is in the workshop. I'm thinking of starting a thread where I post a shader a week for a year, 52 shaders, then putting it in the workshop so there's a collection of shaders somewhere. I'm weighing it out. Just don't know if I'm good enough. I did develop this a bit if you're looking for a whole wet look:
-
You can also go into any material shader under the "void main ()" and write " discard; " anywhere. (and also disable "cast shadows" in the material editor then hit the save icon). void main() { discard; }
-
Dude, you're 97?! Congrats, man. And born on Christmas Eve. I can relate. Mine's the 26th.
-