mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0028241: Visualization, Path tracing - shader compilation error on Radeon 290
This commit is contained in:
parent
4e66868ad7
commit
06e06389ea
@ -347,7 +347,7 @@ vec3 SampleLambertianReflection (in vec3 theWo, out vec3 theWi, inout float theP
|
||||
#ifdef TWO_SIDED_BXDF
|
||||
return UNIT;
|
||||
#else
|
||||
return mix (UNIT, ZERO, theWo.z <= 0.f);
|
||||
return UNIT * step (0.f, theWo.z);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -446,8 +446,7 @@ ivec4 SceneNearestHit (in SRay theRay, in vec3 theInverse, inout SIntersect theH
|
||||
float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.x = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);
|
||||
aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin1, aNodeMax1);
|
||||
aTimeMin = min (aNodeMin1, aNodeMax1);
|
||||
@ -455,8 +454,7 @@ ivec4 SceneNearestHit (in SRay theRay, in vec3 theInverse, inout SIntersect theH
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.y = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);
|
||||
aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin2, aNodeMax2);
|
||||
aTimeMin = min (aNodeMin2, aNodeMax2);
|
||||
@ -464,8 +462,7 @@ ivec4 SceneNearestHit (in SRay theRay, in vec3 theInverse, inout SIntersect theH
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.z = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1);
|
||||
aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin3, aNodeMax3);
|
||||
aTimeMin = min (aNodeMin3, aNodeMax3);
|
||||
@ -473,8 +470,7 @@ ivec4 SceneNearestHit (in SRay theRay, in vec3 theInverse, inout SIntersect theH
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.w = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2);
|
||||
aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
ivec4 aChildren = ivec4 (0, 1, 2, 3);
|
||||
|
||||
@ -623,8 +619,7 @@ float SceneAnyHit (in SRay theRay, in vec3 theInverse, in float theDistance)
|
||||
float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.x = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);
|
||||
aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin1, aNodeMax1);
|
||||
aTimeMin = min (aNodeMin1, aNodeMax1);
|
||||
@ -632,8 +627,7 @@ float SceneAnyHit (in SRay theRay, in vec3 theInverse, in float theDistance)
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.y = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);
|
||||
aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin2, aNodeMax2);
|
||||
aTimeMin = min (aNodeMin2, aNodeMax2);
|
||||
@ -641,8 +635,7 @@ float SceneAnyHit (in SRay theRay, in vec3 theInverse, in float theDistance)
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.z = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1);
|
||||
aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
aTimeMax = max (aNodeMin3, aNodeMax3);
|
||||
aTimeMin = min (aNodeMin3, aNodeMax3);
|
||||
@ -650,8 +643,7 @@ float SceneAnyHit (in SRay theRay, in vec3 theInverse, in float theDistance)
|
||||
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||
|
||||
aHitTimes.w = mix (MAXFLOAT, aTimeEnter,
|
||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2);
|
||||
aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;
|
||||
|
||||
ivec4 aChildren = ivec4 (0, 1, 2, 3);
|
||||
|
||||
|
@ -350,7 +350,7 @@ static const char Shaders_PathtraceBase_fs[] =
|
||||
"#ifdef TWO_SIDED_BXDF\n"
|
||||
" return UNIT;\n"
|
||||
"#else\n"
|
||||
" return mix (UNIT, ZERO, theWo.z <= 0.f);\n"
|
||||
" return UNIT * step (0.f, theWo.z);\n"
|
||||
"#endif\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
|
@ -449,8 +449,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.x = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);\n"
|
||||
" aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
||||
" aTimeMin = min (aNodeMin1, aNodeMax1);\n"
|
||||
@ -458,8 +457,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.y = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);\n"
|
||||
" aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
||||
" aTimeMin = min (aNodeMin2, aNodeMax2);\n"
|
||||
@ -467,8 +465,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.z = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1);\n"
|
||||
" aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
||||
" aTimeMin = min (aNodeMin3, aNodeMax3);\n"
|
||||
@ -476,8 +473,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.w = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2);\n"
|
||||
" aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
||||
"\n"
|
||||
@ -626,8 +622,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.x = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);\n"
|
||||
" aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
||||
" aTimeMin = min (aNodeMin1, aNodeMax1);\n"
|
||||
@ -635,8 +630,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.y = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);\n"
|
||||
" aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
||||
" aTimeMin = min (aNodeMin2, aNodeMax2);\n"
|
||||
@ -644,8 +638,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.z = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1);\n"
|
||||
" aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
||||
" aTimeMin = min (aNodeMin3, aNodeMax3);\n"
|
||||
@ -653,8 +646,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
||||
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||
"\n"
|
||||
" aHitTimes.w = mix (MAXFLOAT, aTimeEnter,\n"
|
||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2);\n"
|
||||
" aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;\n"
|
||||
"\n"
|
||||
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
||||
"\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user