Jump to content

Josh

Staff
  • Posts

    24,155
  • Joined

  • Last visited

Everything posted by Josh

  1. Yes, you can do all of that right now. That's how the heat haze is done.
  2. We'll try to organize and present this better, but for now all the content feeds are available here: http://leadwerks.com/werkspace/index.php?/page/community
  3. http://leadwerks.com/werkspace/index.php?app=core&module=search&do=new_posts&search_filter_app[ccs]=1
  4. If Unwrap3D doesn't support it, it doesn't exist: http://www.unwrap3d.com/u3d/formats.aspx
  5. I think Tyler and Masterxilo may have posted their examples in the old forum.
  6. A river class only needs to be written once, and it's fairly easy to do, based on the road class. Then you can drag and place your rivers the same way roads work.
  7. I know some people are, but I can't give you any specifics.
  8. Josh

    iPad

    So it's basically a portable media consumption device, for use only with Apple books, music, and movies? That's okay if that's what it is, but I can't afford to pay $1000 to watch movies I already have. It's still a cool idea, but just seems too expensive for what it is. I think there's a huge untapped market for a home entertainment PC. You can go to YouTube and type in almost any movie or song and see it. Why isn't there a commercial offering like this? Why can't I sit on the couch and type in a wireless keyboard the name of a song or movie I want to hear/see, and have it play? I think streaming media, and maybe even streaming games, is the surprise ultimate solution to piracy. It's easier to use than pirated materials, and it lets the publisher retain control. Sure, you could capture the incoming data, but when it's easier just to pick what you want and play it, who would bother with physical media and local files?
  9. Please give this a try. For some reason, my computer thinks I already hit the 30-day limit: http://www.leadwerks.com/LEEval2.3.exe Please don't spread this around yet.
  10. Yes, it will be fixed on the server.
  11. Find this line in mesh.frag around line 181: if (DepthToZPosition(gl_FragCoord.z)<DepthToZPosition(texture2DProj(LE_DEPTHBUFFER,refractionvector2).x)) { Replace it with this: if (gl_FragCoord.z<texture2DProj(LE_DEPTHBUFFER,refractionvector2).x) { The variable gl_FragCoord.z is a nonlinear depth value between 0.0 and 1.0. It's stored the same way a depth value in a depth texture is stored. We could convert it to a z position with the DepthToZPosition() function, or we can just compare it directly to the depth texture read: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519 I'm sure I knew this already, but I must have missed that when I wrote the shader. This will fix your problem.
  12. I can produce the problem. This is very strange. This code uses the up and down keys to move the camera forwards and backwards. There is a certain spot where the error appears and disappears almost instantly. Which GPU is this occuring on? I get an error with an ATI 3870, so it is unlikely to be a driver error if you are using NVidia cards: #include "engine.h" int main(int argc, char** argv) { Initialize(); //Create a graphics context Graphics(800,600); //Create a world TWorld world=CreateWorld(); if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); goto exitapp; } //Create a render buffer TBuffer gbuffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); //Lighting buffer TBuffer lightbuffer=CreateBuffer(800,600,BUFFER_COLOR); //Create a camera TEntity campiv=CreatePivot(); PositionEntity(campiv,Vec3(0,2,0)); TCamera cam=CreateCamera(campiv); PositionEntity(cam,Vec3(0,0,-1.95)); //Load the scene LoadMesh("scene.gmf"); //Create a light TLight light=CreatePointLight(); PositionEntity(light,Vec3(0,1,0)); //Create the transparency world TWorld foreground=CreateWorld(); //Create a camera for the transparency world TCamera fgcam=CreateCamera(); CameraClearMode(fgcam,0); //Create the transparent object TMesh mesh=CreateSphere(); PositionEntity(mesh,Vec3(0,2,0)); //Load the transparent material TMaterial material=LoadMaterial("glass_refraction.mat"); SetMaterialTexture(material,GetColorBuffer(lightbuffer),2); SetMaterialTexture(material,GetDepthBuffer(gbuffer),3); PaintEntity(mesh,material); TShader refractionshader=GetMaterialShader(material); SetWorld(world); TMesh cube=CreateCube(); ScaleEntity(cube,Vec3(0.1)); PositionEntity(cube,Vec3(0,2,1)); TMaterial cubematerial=CreateMaterial(); SetMaterialColor(cubematerial,Vec4(1,0,0,1)); PaintEntity(cube,cubematerial); float refractionstrength=0.01; float mx=0.0,my=0.0; TVec3 camrotation; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); //Main loop while(!KeyHit(KEY_ESCAPE)) { mx=Curve(MouseX()-GraphicsWidth()/2,mx,3); my=Curve(MouseY()-GraphicsHeight()/2,my,3); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation=EntityRotation(campiv); camrotation.X+=my; camrotation.Y-=mx; RotateEntity(campiv,camrotation); UpdateWorld(); //Render the main world SetBuffer(gbuffer); SetWorld(world); RenderWorld(); //Render lighting SetBuffer(lightbuffer); RenderLights(gbuffer); CopyBuffer(lightbuffer,BackBuffer(),BUFFER_DEPTH|BUFFER_COLOR); CopyBuffer(gbuffer,BackBuffer(),BUFFER_DEPTH); //Set the refraction strength if (KeyDown(KEY_UP)) {MoveEntity(cam,Vec3(0,0,0.01)); }//{ refractionstrength+=0.001 ; } if (KeyDown(KEY_DOWN)) {MoveEntity(cam,Vec3(0,0,-0.01)); }//{ refractionstrength-=0.001 ; } refractionstrength=max(refractionstrength,0.0); SetShaderFloat(refractionshader,"refractionstrength",refractionstrength); //SetBuffer(gbuffer); //ClearBuffer(); SetBuffer(BackBuffer()); //Render transparency SetWorld(foreground); SetEntityMatrix(fgcam,GetEntityMatrix(cam)); RenderWorld(); SetWorld(world); Flip(); } exitapp: return Terminate(); }
  13. At the moment you can't add post-processing effects unless you write the whole rendering code yourself. I am going to add a mechanism to the framework code to allow the user to easily insert effects.
  14. My guess is the grass shader aligns it to the terrain which makes the billboard render incorrect.
  15. Just look at the water rendering code in the framework source, or the tutorial. It's a lot of different things to set up, but if you take it one step at a time it isn't that hard.
  16. It's amazing how ignorant everyone was before the internet. If I wonder about some government document from the 1800s or how much weight a swallow can carry, I can find out in less than ten seconds.
  17. Blending is a fixed-function operation, and cannot be written with a shader. The blend modes are listed in the material editor. I don't know what a color blend would be, or if it is supported on the hardware.
  18. I would just use a single decal entity you write a script for. It can be much simpler than the road script.
  19. Josh

    OnLive Lives?

    I don't know, there may be some more fundamental ways this changes the medium. It's kind of like a YouTube for games.
  20. A cube map is what you want. There are some demos posted on http://forum.leadwerks.com with this.
  21. Probably because their presentation of their product at the time was better. By the way, TGC sells Leadwerks Engine, so it's not TGC vs. Leadwerks, it's DarkGDK vs. Leadwerks Engine.
  22. There are two cameras. Unlike the Highlander, there can be more than one.
  23. I've got a 3870 with drivers 10.1 and everything seems fine on Windows 7 64-bit. Download the new drivers and see if that helps. You might also turn off HDR and tell me if that makes any difference.
  24. Josh

    iPad

    $14.99 to download a movie?
×
×
  • Create New...