Tagged Questions
1
vote
1answer
439 views
Problems implementing a screen space shadow ray tracing shader
Here I previously asked for the possibility of ray tracing shadows in screen space in a deferred shader. Several problems were pointed out. One of the most important problem is that only visible ...
1
vote
2answers
263 views
Raycasting mouse coordinates to rotated object?
I am trying to cast a ray from my mouse to a plane at a specified position with a known width and length and height.
I know that you can use the NDC (Normalized Device Coordinates) to cast ray but I ...
2
votes
1answer
292 views
OpenGL 3+ Range Picking
How do I perform range picking in the latest OpenGL version? By range picking I mean selecting all objects which are picked using a selection rectangle, like in an RTS game.
For single object picking ...
3
votes
1answer
296 views
3d Picking under reticle
i'm currently trying to work out some 3d picking code that I started years ago, but then lost interested the assignment was completed (this part wasn't actually part of the assignment).
I am not ...
1
vote
1answer
809 views
Optimized algorithm for line-sphere intersection in GLSL
Well, hello then!
I need to find intersection between line and sphere in GLSL. Right now my solution is based on Paul Bourke's page and was ported to GLSL this way:
// The line passes through p1 and ...
5
votes
1answer
342 views
Raymarching artifacts
I was playing with raymarching using distance fields in GLSL sandbox and got stuck with a strange problem with artifacts.
Click here and take a look at the spheres generated in corners, they have ...
1
vote
1answer
2k views
Picking objects with mouse ray
I simply want to pick a few spheres in my scene using the mouse-ray. I have implemented(copied most of it but with little understanding) a ray-sphere collision code. Also I have implemented the code ...
5
votes
2answers
303 views
How does this snippet of code create a ray direction vector?
In the Minecraft source code, this code is used to create a direction vector for a ray from pitch and yaw:'
float f1 = MathHelper.cos(-rotationYaw * 0.01745329F - 3.141593F);
float f3 = ...