Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Clipping distorts the texture mapping.

yaniryanir Member Posts: 1
I am writing a 3d engine in pascal, and I have a problem. When a texture-mapped polygon goes out of the screen borders and needs to be clipped, it's texture get's distorted like it's sucked outside. I have 3d clipping with parametric equations, and I am changing the U,V coordinates just like the x,y,z coordinates, and it works fine for x,y,z coordinates, but not for u,v. How should I clip the U and V coordinates?
Please help me.

Comments

  • yoni_perryyoni_perry Member Posts: 1
    : I am writing a 3d engine in pascal, and I have a problem. When a texture-mapped polygon goes out of the screen borders and needs to be clipped, it's texture get's distorted like it's sucked outside. I have 3d clipping with parametric equations, and I am changing the U,V coordinates just like the x,y,z coordinates, and it works fine for x,y,z coordinates, but not for u,v. How should I clip the U and V coordinates?
    : Please help me.
    :


    Halo Yone. Sup?
    I've had the same problem and solved it last night at 5 AM (I had trouble sleeping...).
    All you have to do is put the devides of u,v,z (the part where you change z to 1/z, u to u/z...) BEFORE the clipping but AFTER the perspective formulas, that's all.
Sign In or Register to comment.