Skip to main content
4 votes
Accepted

How does cube mapping work?

So far, my understanding is that you need a direction vector, and from the direction vector we can determine the point of intersection with one of the six planes. Basically, yes. Is the direction ...
Theraot's user avatar
  • 28.2k
2 votes

I'm following a tutorial but I don't get the same result; why are the raytraced shadows not working?

The randomVec3() function used in random_in_unit_sphere() doesn't match the one in the tutorial. A standard unit sphere is centred at the origin with a radius of 1, and your current implementation ...
Adam's user avatar
  • 7,709
2 votes

How to sort polygons without a depth buffer

In interview, Ian Andrew, founder of Incentive Software, designer and co-creator of Freescape along side his brother Chris, said: Each element was held within a bounding box which enabled the z-order ...
Theraot's user avatar
  • 28.2k
2 votes

How does cube mapping work?

Adding to the accepted answer regarding how the texel lookup works: Furthermore, what if we are looking at one of the edge of the cube? Now we have to sample texture from two faces? No, cubemaps ...
Stephane Hockenhull's user avatar
2 votes

Determine if a triangle is on the screen

There are three kinds of positional relationship between two plane figures: disjoint, one inside the other, partial intersection. You need to check for partial intersection and one inside the other. ...
Mangata's user avatar
  • 2,796
2 votes
Accepted

What's the difference between Unity3D rendering pipeline and OpenGL rendering pipeline?

The graphics APIs specify pipelines because your input data (vertices, indices, shaderprograms, program constants, textures, output buffers) need to undergo many transforms before becoming an output ...
torbjoernwh's user avatar
2 votes

Details of what GPU actually do when clipping in 4D homogeneous space?

Clipping is done in 3D space before 'w' division, not in 4D space. The GPU finds either just the near and far planes, or all 6 3D planes of the view frustum and clip the Geo to this. If w division ...
Stephane Hockenhull's user avatar
1 vote
Accepted

How do I implement floors and ceilings properly to my DOOM Style Renderer?

Problem was solved easily, but with a lot of wasted time thinking about how. The solution lies with logic: if the walls within the sector are either backfacing or not if you are outside of it, then ...
DehGoose's user avatar
1 vote

What's the purpose of this cross product and dot product in triangle clipping code?

This is a check for the direction the triangle is facing, which is determined by its winding order. That is, if you trace your finger across the screen from the projected position of vertex 1 to ...
DMGregory's user avatar
  • 140k
1 vote
Accepted

I'm following a tutorial but I don't get the same result; why are the raytraced shadows not working?

I found the solution. It was actually in the HitableList class, where I defined this intersection function; ...
Whatssuppp's user avatar
1 vote

Function to draw an image inside a rectangle

You do it backwards. You need a transformation that maps from the original image to the cuadrilateral. Well, actually, you need the inverse. In particular, you want a transformation matrix such that ...
Theraot's user avatar
  • 28.2k

Only top scored, non community-wiki answers of a minimum length are eligible