Fixing ray tracing lens

This commit is contained in:
Dynamitos
2025-06-30 21:15:14 +02:00
parent 8499d418e8
commit 59b73420d6
10 changed files with 44 additions and 39 deletions
+2 -1
View File
@@ -9,7 +9,6 @@ struct Ray
}
const static float S_O = 6.9;
const static float f = 0.035;
const static float A = 0.0;
struct SampleParams
@@ -69,6 +68,8 @@ void raygen()
float3 cx = -normalize(cross(cam.d, abs(cam.d.y) < 0.9 ? float3(0, 1, 0) : float3(0, 0, 1))), cy = cross(cam.d, cx);
const float2 sdim = float2(0.036, 0.024);
float f = sdim.y / (2 * tan(70.0f * 0.5f));
float S_I = (S_O * f) / (S_O - f);
//-- sample sensor