Image Map Image Map
No More Results
About neilobremski

Basic Information

Age
37
About neilobremski
Biography:
I started programming in GW-BASIC by copying and manipulating example listings given to me by a friend. I didn't have access to any books or other references so my initial education was trial and error alone. It was enough to hook me and now I find myself looking back fondly on those early days of struggle and excitement.
Location:
Seattle, USA
Interests:
Walking, Writing, Reading, Music
Occupation:
Computer Programmer

Signature


Statistics


Total Posts
Total Posts
44
Posts Per Day
0.19
General Information
Last Activity
Yesterday 11:37 AM
Join Date
October 9th, 2016
Referrals
0
Home Page
http://gibdon.com/
View neilobremski's Blog

Recent Entries

Simplifying Backface Culling

by neilobremski on May 23rd, 2017 at 01:43 PM
The process of culling backfaces is simply checking the visibility of one-sided polygons based on whether they are facing towards the camera / player or away. If they are facing away then it is a back-facing side, rather than front-facing, and must be skipped during rendering. To determine this, I must calculate a normal vector. Every 3D triangle has two of these normals: one points outward from it and one points inward. The one you get depends on whether the calculation is made from vertices going

Read More

Updated May 23rd, 2017 at 01:45 PM by neilobremski (Note about negating Ny)

Categories
3D

Coordinate Rotation using Fixed Point

by neilobremski on May 18th, 2017 at 07:21 PM
The goal here is to quickly rotate points by a certain number of degrees using precalculated SINE/COSINE values and without floating point, e.g. only integers. In order to do that I am using fixed point [1] and a lookup table. So first I want to discuss fixed point a bit to get our feet wet.

Fixed point is a technique where one designates a number of high bits in an integer to the whole portion and leaves the remaining lower bits to represent a fractional part. This is usually expressed

Read More

Categories
3D

DDA Texture Mapping [Part 2]

by neilobremski on May 5th, 2017 at 03:06 PM
Since the first part I blogged a few weeks ago, I've written the method QTEX() [1] which maps an 8x8x1 (monochrome) texture onto a quadrilateral (four vertices). This uses fixed point for all coordinates and deltas so there are rounding errors, especially in the inner loop when drawing a scan line because I use a single byte per U/V delta. In fact, here's an image which demonstrates the problem:


No matter how I adjust the U/V coordinates

Read More

Categories
Asm

There Is No Subtraction

by neilobremski on April 25th, 2017 at 04:01 PM
These wonderful digital processing units of ours are, at their heart, very fast binary adders. There may be a SUBtract instruction but this is the same as adding the two's complement of a number. [1] Knowing this is important when I'm mixing signed and unsigned numbers; I must be discriminate.

In the current case, I'm storing texture coordinates as whole byte values which I will then interpret as fixed point. To clarify this a little, I'll explain the concepts with nibbles instead of

Read More

Updated May 5th, 2017 at 09:33 AM by neilobremski (Replaced "compliment" (to praise) with "complement" (to complete))

Categories
Asm

The Great DIVide

by neilobremski on April 24th, 2017 at 09:53 AM
The DIV and IDIV instructions perform integer divisions simply and relatively quickly as opposed to creating a simple loop. Let me start by showing how one could divide an integer without these instructions. The following assembly function (CALL 110) will divide BX by CX and put the quotient in AX:

Code:
0110 31C0	XOR     AX,AX
0112 39CB	CMP     BX,CX
0114 7206	JB      011C
0116 40  	INC     AX
0117 29CB	SUB     BX,CX
0119 EBF7	JMP     0112

Read More

Categories
Asm