Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Christoph

  • Rank
  1. Stencil shadows were considered dead for the last few years, because they are quite expensive (especially for cpu and memory) and it is very very difficult to achieve soft shadows. However, with dx 10, i expect there will be a revival of stencil shadows, as the volumes can be created easily and fast in the gpu (>> geometry shader). But developing in dx 9, you should consider other techniques - of course hybrid implementations are possible and common. greetz, chris
  2. Popping visually affects the lower LODs (meaning the less detailed LODs) more than the higher. You barely notice a change in the nearest LOD, but in the distance, it becomes visible and annoying. In our project, we use a quadratic LOD distance. Example: distance LOD0 = 100 distance LOD1 = 200 distance LOD2 = 400 ... That ensures that the really low detailed LODs hardly appear and thus almost no popping can be seen. Another trivial approach is just to increase the changing distance, so that lower LODs get pushed away. Of course, you can only do this if performance allows you. Oh, and if that doesn't help, there is a nice article concerning geomorphing in a vertex shader on gamedev.net (dunno if somebody already mentioned that). Greetz, Chris
  3. Christoph

    simple(?) bump mapping question

    Ok, I decided to use object space normal maps. However, another problem came up: I need a tool that converts my bump map to an object space normal map (with respect to the model). I know there are tools like nVidia's Melody, but they can only compute high poly normal maps. What I need is an individually designed greyscale bump map being converted to a normal map. Do you know any tools/ algorithms that convert my bump maps?
  4. Christoph

    simple(?) bump mapping question

    oops, the last one was me :)
  5. I wrote a HLSL-shader, and everything works fine... weird! If somebody wants me to, I can post the shader here. Thanks for your help again!
  6. The filtering is correct with precalculated texture coordinates and this shader: dcl_position v0 ; position in stream 0 dcl_texcoord v1 ; texture coordinates in stream 1 mov oT0, v1.xy ; copy texture coordinates to output m4x4 oPos, v0, c0 ; position to world space So, let me summarize my problem after one more week of debugging: Moving data from the v0-input (position) to texture outputs results in point filtering on Radeon cards. There are no problems on nVidia cards. As I want to generate texture coordinates from position procedurally (to save RAM), this is a really annoying effect!
  7. @ ET3D: I mean using the fixed function pipeline (no shaders at all) no problems occur. I don't know if mov oT1, v1.xz would work, but I can figure this out tomorrow. @ Demus79: I'm not that good in HLSL. And in my opinion it MUST work in asm - it's such a simple shader!
  8. No I don't. In this case, nVidia would use point filtering as well... Also, it works with precalculated texture coordinates.
  9. Quote:Original post by Demus79 Did you enable filter inside your shader ? What do you mean? Is this possible in asm-shaders?
  10. I have tested with the reference device - the ATI cards are definitely doing something wrong, as it works in reference mode. I don't think it's a precision problem, because in the beginning corner of the terrain (with low coordinates), the filtering is wrong too. This is my shader code: vs.1.1 def c6, 1.0f, 0.0f, 0.0f, 0.0f dcl_position v0 ; multiply the vertex coordinates by a stretch factor (c5.x) mul r0, v0.xz, c5.x ; take the inverse (1 - r0) so that the texture is mirrored sub r0, c6.x, r0 ; fill the texture output registers (detail1 & detail2 use additional stretch factors c5.y and c6.z) mov oT0, r0 mul oT1, r0, c5.y mul oT2, r0, c5.z ; transform vertex to world space m4x4 oPos, v0, c0 I can simplify the shader, like: vs.1.1 dcl_position v0 mov oT1, v0.xz m4x4 oPos, v0, c0 However, the problem is still the same. As I told you, nVidia cards don't produce point filtering artefacts, thus it must be something hardware-specific. Any more ideas? tHx
  11. damn, you're right, CreateDepthStencilSurface throws an exception! I must know why... Thank you!
  12. Christoph


    Yeah, I know, I've tried that, and it works in a way... But changing the near/far plane or the viewport leads to imprecisions (i.e. the shadows are moved because of the new view parameters). So, changing the view parameters too little, Z-fighting will still occur, changing it too much, spatial movements appear...
  13. Christoph

    Terrain Texture Splatting

    Yop, that's what I found out, too. But what if the graphics card can not handle 4,5 or even 6 (with detail map) texture stages? I believe you have to draw more than one geometry pass, but how do I alphablend them together so that the effect is the same as with one geometry pass and 6 texture stages?
  14. Christoph

    Terrain Texture Splatting

    yeah I know this article, thanks. But it is only another description of Blooms algorithm and doesn't describe how to blend several geometry passes...
  15. Christoph

    Shader instancing

    Hmmm, I'm quite new to shaders. Now my vertex structure contains pos and tex0. My instance structure consists only of a Vec4 (where x,y,z is the translation and the w-factor is the rotation on the y-axis): struct GrassVertex { Vector3 position; Vector2 texture; } struct GrassInstance { Vector4 matrix; } D3DVERTEXELEMENT9 grassVertexFormat[] = { {0,0,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_POSITION,0}, {0,3 * sizeof(float),D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD,0}, {1,0,D3DDECLTYPE_FLOAT4,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD,1}, D3DDECL_END() }; Can you show me a shader which translates and rotates the vertex position according to this Vec4 and passes through tex0? Thanks!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!