Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About valg3

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. valg3

    Seamless Terrain

    That's an option. Another idea I've had on this in the past is to create the world out of many height maps tiled together, and use a quad tree for visibility. You'll also want to think of the possibility of the player gazing into the distance. In that case, there's way too much data to render with a reason frame rate. So you'll have to setup LOD, and fix each height map to tile seamlessly with its neighbor even if they have differing LOD. Things in the far distance, though, can simply be rendered to a texture and displayed way out there.
  2. valg3

    Seamless Terrain

    Yes, there's always going to be a performance hit when you start loading, not to mention you have to predict when the best time to load a section of terrain into memory would be. One option to lessen the visible blow to the frame rate would be to place the loading in another thread so it loads in the background without the player even realizing it.
  3. valg3

    RTS AI help

    There's a book I thought was very good on the subject, AI Game Engine Programming. It has some decent material on influence maps, fuzzy state machines, and many AI topics. After reading through it I was inspired to write RTS AI.
  4. valg3

    Smooth Land

    I'm a little late posting into this, but look into Bezier Patches. Using a series of control points you can create a smooth surface that's pretty easy to triangulate. I've been using this for my projects lately, and using the patches you can quickly and easily adjust the number of polygons on the surface. The more there are, the smoother it is.
  5. Sure, here's the shader code. The funny thing is, it compiles and works fine in the Effect editor, and not to mention it works fine when I'm displaying an ID3DXMesh. The only thing I'm trying to do with a plain vertex buffer at the moment is to draw a triangle. I'm sure I'm setting the constants correctly too, and no functions are failing. FX Code: texture Tex0 < string name = "lisa1.bmp"; >; sampler Sampler = sampler_state { Texture = (Tex0); MipFilter = LINEAR; MinFilter = LINEAR; MagFilter = LINEAR; }; float4x4 World : WORLD; float4x4 View : VIEW; float4x4 Projection : PROJECTION; struct VS_OUTPUT { float4 Pos : POSITION; float4 Col : COLOR0; float2 Tex : TEXCOORD0; }; //Basic vertex output with color and texture VS_OUTPUT VS( float4 Pos : POSITION, float4 Col : COLOR0, float2 Tex : TEXCOORD0) { VS_OUTPUT Out = (VS_OUTPUT)0; float4x4 WorldView = mul(World,View); float4 P = mul(Pos, WorldView); Out.Pos = mul(P,Projection); Out.Tex = Tex; float4 C = { 1.0f, 1.0f, 1.0f, 1.0f}; Out.Col = C; return Out; } technique TVertexShaderOnly_HLSL { pass P0 { //lighting Lighting = FALSE; SpecularEnable = FALSE; //samplers Sampler[0] = (Sampler); //Texture stages ColorOp[0] = MODULATE; ColorArg1[0] = TEXTURE; ColorArg2[0] = DIFFUSE; AlphaOp[0] = MODULATE; AlphaArg1[0] = TEXTURE; AlphaArg2[0] = DIFFUSE; ColorOp[1] = DISABLE; AlphaOp[1] = DISABLE; //Shaders VertexShader = compile vs_1_1 VS(); PixelShader = NULL; } }
  6. Has anyone had problems getting an ID3DVertexBuffer to display when using FX shaders? This problem's been a pain for a while now. When I use the exact same vertex buffer code with just separate pixel and vertex shader interfaces the buffer displays just fine. However, when I use an FX it won't load. Any ideas are appeciated!
  7. I figured it out. Apparantly, if you use glCopyTexImage2D() and you draw an untextured object to the buffer you should have GL_TEXTURE_2D disabled, otherwise nothing is rendered to the buffer. Strange behavior. So, incase this happens to anyone else, there's the answer :)
  8. Yes, I'm using it to copy what I have on the screen into a texture that I can display on a quad I have on the screen.
  9. I found the strangest occurance with glCopyTexImage2D(). It only works properly when the screen is the resolution of 640x480. If it is any other resolution then the texture copied does not display, and neither do colors. All colors (except for the clear color) turn black. For instance, if I use the function, clear everything to red, then try drawing a blue quad in the center of the screen the quad is only blue in 640x480, and black in all other resolutions. This applies to texturing as well. Textures become all black. Has anyone else run into this problem?
  10. valg3

    Fill Triangle routine

    Try this, its a small site but helpful for triangle fillers:
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!