• Content count

  • Joined

  • Last visited

Community Reputation

1107 Excellent

About pabloreda

  • Rank

Personal Information

Recent Profile Visitors

4653 profile views
  1. for the record. The problem here is I need the 3 vars because this is amount of parameter in vertex (z,u,v) to calculate in every point. then, this optimization not have future!! thank's to all
  2. JoeJ: I don't need sort this order in every scanline, only in setup stage, then make 2 outer loop, top and bottom triangle (like clasical scanline algo) Useless pixels outside is the other room for optimization, this algo not scan rigth useless pixels
  3. yes, the halfspaces. the code in inner loop is for(int x = minx; x < maxx; x++) { if(Cx1 > 0 && Cx2 > 0 && Cx3 > 0) { colorBuffer[x] = 0x00FFFFFF;<< // White } Cx1 -= Dy12; Cx2 -= Dy23; Cx3 -= Dy31; } don't need calculate the 3 vars, only one, when you know, for example x1 for in and x2 for out while (Cx1<0) { Cx1-=Dy12;Cx2-=Dy23;pVideo++; } while (Cx2>0) { Cx2-=Dy23;*pVideo++=Color; }
  4. I am coding the rasterization of triangles by the baricentric coordinate method. Look a lot of code and tutorials that are on the web about the optimization of this algorithm. I found a way to optimize it that I did not see it anywhere. I Only code the painting of triangles without Zbuffer and without textures. I am not comparing speeds and I am not interested in doing them, I am simply reducing the amount of instructions that are executed in the internal loop. The idea is simple, someone must have done it before but he did not publish the code or maybe in hardware it is already that way too. It should be noted that for each horizontal line drawn, of the three segments, you only need to look at one when going from negative to positive to start drawing and you only need to look at one when it goes from positive to negative when you stop drawing. I try it and it works well, now I am implementing a regular version with texture and zbuffer to realize how to add it to this optimization. Does anyone know if this optimization is already done? The code is in From line 92 to 155
  5. 3D I like to learn about BSP rendering

    I developing a voxel render in software with integer only operation, I have all math for matrix in fixed point. I don't make a software render with polygon but I have the pieces for do this. But in :r4, a language close to ColorForth.
  6. Storing 64 images in BW, how to find one?

    you need store 2 bits (4 values) and extract them? not 64 images, only 4 with 8 bits color you can store 4 images of 2bits in 1 image of 8bits when you get the 8 bit value: for extract the imagen 1 is $3 and, 2 is 2 >> $3 and 3 is 4 >> $3 and 4 is 6 >> $3 and   for store you need mask the "2 bit chanell" and or the value
  7. Hello I'm doing a bvh player and it already works with most files, but I got it from It does not have angles in degrees. Does anyone know why and in what units are these angles? thank you very much, ablo
  8. There is an implementation of deferred shading only in the cpu ?   I like to add ligth and shadows to a cpu voxel render. I not found a cpu only implementation for reference .   thank's in advance There is an implementation of deferred shading only in the cpu ?
  9. Xoxos:   I use cpu graphics poligons in my code, but is antialiased, you can see this in:   the main optimization tricks are, use only integers and avoid division/multiplication.   I have a simple convex polygon filling without antialias for bitmask buffer, but not in C, is a forth like languaje lines 190 to 244        
  10. Calc octree order in camera space

    work! thank's a lot..    
  11. Hi, I have a problem:   I have a 8 vertex cube in camera space, center is the camera origin viewing to z positive and I need calculate the octree order. now I search the vertex with less distante to camera (0,0,0) but is expensive.   In the literature, always use object space, center in cube, and is easy calculate comparing the cube center and the camera position. l   I try operate about matrix transformation but is expensive too. if invert the matrix and transform the negate center of cube, I get the numbers for comparing like the link, but, transform a vertex is expensive too.   my question is   I need calculate the octree order but in camera space, it can be done more fast?   Thank's in advance
  12. draw 2d line with clipping

    I draw antialiased lines and polygons with a lib I make for my lang.   I clip the lines and polygons..   this is the C implementation..   use, improve and share.
  13. Arauna2 path tracer announcement

    Hi Phantomus great work!! you see this? I wonder if this can improve the image.
  14. I use a routine of drawing anti-aliased polygons, the code here:   The antialias are doing by supersampling the raster lines, acumulate in a coverage buffer and finally render it.