New answers tagged

1

Ok mystery solved. The issue was because I wasn't normalizing the mouse x and y before applying the calculations. After doing the following everything started to work correctly: var x = (2.0 * mouseX) / screenWidth - 1.0; var y = 1.0 - (2.0 * mouseY) / screenHeight;


0

I hope I can make this clear, but basically you need to make a stencil of both objects as if they are both selected, then only keep the areas in the bounding box of the item you actually want to highlight. So basically you make one stencil buffer of both objects selected (or all objects that occlude the object, really...but I would not worry about those ...


0

I haven't thought about this for too long. But it seems fairly simple. I assume you know what the modelViewMatrix is. This 4x4 matrix transforms coordinates (points) from world space to camera space. There is a similar matrix called the normalMatrix that transforms vectors (usually normalvectors). It does the same as the modelViewMatrix, but skips all ...



Top 50 recent answers are included