Created
July 21, 2014 13:25
-
-
Save Balletie/f9283bf78310a05824b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 unsigned char | |
6 intersect( | |
7 __const float4 origin, | |
8 float4 dir, | |
9 shape shape) | |
10 { | |
11 float4 trans_origin = origin - shape.sphere.origin; | |
12 //float a = 0; | |
13 float a = dot(dir, dir); | |
14 //float b = 0; | |
15 float b = 2 * dot(dir, dir); | |
16 float c = 0; | |
17 //float c = dot(trans_origin, trans_origin) - dot(shape.sphere.radius, shape.sphere.radius); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment