Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: Nil_z

Page 1 of 6 1 2 3 4

Search: Search took 0.05 seconds.

  1. Re: Blenders look different on various graphics adapters

    The destination alpha can be a problem. It depends on the framebuffer pixelformat and how the driver writes alpha value to framebuffer. I'd rather not use destination alpha in BlendFunc if it is not...
  2. Replies
    2
    Views
    335

    Texture shift in normalmap shader

    I have been using ARB vp&fp to do normalmap bump, the shader file looks like this:

    !!ARBvp1.0 OPTION ARB_position_invariant;

    ATTRIB iTex0 = vertex.texcoord[0];
    ATTRIB tangent =...
  3. problem using OPTION ARB_fog_linear in fragment program

    I have been writing some simple normalmap bump effect with ARB_fragment_program, and I tried to add fog effect to it. I am using
    !!ARBfp1.0 OPTION ARB_fog_linear;
    in my fragment program, but I...
  4. Replies
    9
    Views
    2,958

    Re: Triangle strip VS list, and other

    i have got another interesting result. Stitching all strips together by NvTriStrip lib, i got one big strip about half the length of the triangle list(29000 vs 56000), but the fps is still lower than...
  5. Replies
    9
    Views
    2,958

    Triangle strip VS list, and other

    I have been testing different draw primitive method with a 18000 polygon mesh. I get about 2000 triangle strip from the mesh. I used two different ways, one is a single...
  6. Replies
    5
    Views
    258

    Re: point light with fragment program

    i am using fragment program to calculate the lighting per fragment on the polygon. Even the light direction is almost perpendicular to the vertex normal, the interpolated light direction near the...
  7. Replies
    5
    Views
    258

    point light with fragment program

    I am lighting a square with a point light. When there is some distance between the light and polygon, the polygon is lit correctly. it will lost the lighting effect when the light source is very...
  8. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    I have changed my vertex program to get camera position by transfer (0,0,0) with inverse modelview matrix. I should set this position by some program env parameter, but right now it is just a test....
  9. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    i am using OPTION ARB_position_invariant in vertex program, which means fixed function pipeline does the position computing. I think the vertex position I get in vertex program has been transformed...
  10. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    the strange specular only appears when the light is at certain angle, at other times it looks OK to me. Maybe it is a method that only looks right sometimes :p

    here is my vp&fp, the idea is to...
  11. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    I almost finished the MD5mesh viewer, it seems work fine, thanks for all the help from here. But i noticed there are some strange bright lines over the model when the light moves, like the specular...
  12. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    there is no smooth setting either, should I average all normals of polygons that share the same vertex to create vertex normal?
  13. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    there is no per vertex normal info in DOOM3 model data. How should i calculate the tangent space transformation?
  14. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    why don't they use another normalmap instead of the heightmap to add to the base normalmap?
    anyway, i will try the heightmap to normal converting method.

    btw, studying the rendering method in...
  15. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    how to generate that normalmap?
    i am thinking about:
    get 3 pixels from (x,y), (x+1, y) and (x, y+1), calculate normal from them. but what should i do with the pixels on the right&bottom edge?
  16. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    why not add the normal info from the heightmap to the normalmap previously into the data?
  17. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    I wonder how and why he does that :confused: BTW, what is the SDK you talked about?
  18. Replies
    55
    Views
    6,509

    Re: Doom3 shading questions

    another question about DOOM3 shader. How does it use those heightmap textures in the models? and I can't find code of calculating specular light in the fragment program, my result seems much worse...
  19. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    oops, i've found what's wrong. because i ignored the image origin bits in the TGA head so the image i read into memory is upside down. sorry for my last post, and Eric's code is correct.
  20. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    I've written my simple normalmap test, but there is a problem, the bump on the y axis seems to be reversed. I am using Eric Lengyel's code in this link:
    ...
  21. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    does temporary variable number and reusage affect speed of vp&fp? for example, use only one TEMP variable for serval times or use serval TEMP variables for each calculation, will there be a speed...
  22. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    ah, I get it. I am used to each vector in a matrix is a column, like the common mat[0], mat[1], mat[2], mat[3] in a mat[4][4]. I forget in vp the vector is the row.
    thanks, mogumbo :D
  23. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    i have a question about this part of the vertex program:

    # vector pointing to light0 for bump mapping
    DP4 light0pos.x, mvi[0], state.light[0].position;
    DP4 light0pos.y, mvi[1],...
  24. Replies
    17
    Views
    1,279

    Re: need ARB normalmap example

    no luck? I've been looking around at some web site, but can only found object space normal map demo, which can not solve my problem... :(
  25. Replies
    17
    Views
    1,279

    need ARB normalmap example

    I am writing something using normal map in tangent space, but i am not clear about how to tranform light vector to tangent space(or transform normal from tangent space to eye space?), and how to pass...
Results 1 to 25 of 128
Page 1 of 6 1 2 3 4