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...
Type: Posts; User: Nil_z
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...
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 =...
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...
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...
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...
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...
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...
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....
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...
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...
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...
there is no smooth setting either, should I average all normals of polygons that share the same vertex to create vertex normal?
there is no per vertex normal info in DOOM3 model data. How should i calculate the tangent space transformation?
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...
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?
why not add the normal info from the heightmap to the normalmap previously into the data?
I wonder how and why he does that :confused: BTW, what is the SDK you talked about?
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...
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.
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:
...
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...
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
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],...
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... :(
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...