0026278: Canonical recognition from time to time raises exception on the attached...
[occt.git] / src / Shaders / RaytraceRender.fs
CommitLineData
fc73a202 1out vec4 OutColor;
2
3// =======================================================================
4// function : main
5// purpose :
6// =======================================================================
7void main (void)
8{
9 SRay aRay = GenerateRay (vPixel);
10
11 vec3 aInvDirect = 1.f / max (abs (aRay.Direct), SMALL);
12
13 aInvDirect = vec3 (aRay.Direct.x < 0.f ? -aInvDirect.x : aInvDirect.x,
14 aRay.Direct.y < 0.f ? -aInvDirect.y : aInvDirect.y,
15 aRay.Direct.z < 0.f ? -aInvDirect.z : aInvDirect.z);
16
17 OutColor = clamp (Radiance (aRay, aInvDirect), 0.f, 1.f);
18}