mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +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
|
#ifdef TWO_SIDED_BXDF
|
||||||
return UNIT;
|
return UNIT;
|
||||||
#else
|
#else
|
||||||
return mix (UNIT, ZERO, theWo.z <= 0.f);
|
return UNIT * step (0.f, theWo.z);
|
||||||
#endif
|
#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 aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.x = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin1, aNodeMax1);
|
aTimeMax = max (aNodeMin1, aNodeMax1);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.y = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin2, aNodeMax2);
|
aTimeMax = max (aNodeMin2, aNodeMax2);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.z = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin3, aNodeMax3);
|
aTimeMax = max (aNodeMin3, aNodeMax3);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.w = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2);
|
|
||||||
|
|
||||||
ivec4 aChildren = ivec4 (0, 1, 2, 3);
|
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 aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.x = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin1, aNodeMax1);
|
aTimeMax = max (aNodeMin1, aNodeMax1);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.y = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin2, aNodeMax2);
|
aTimeMax = max (aNodeMin2, aNodeMax2);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.z = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1);
|
|
||||||
|
|
||||||
aTimeMax = max (aNodeMin3, aNodeMax3);
|
aTimeMax = max (aNodeMin3, aNodeMax3);
|
||||||
aTimeMin = min (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));
|
aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));
|
||||||
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));
|
||||||
|
|
||||||
aHitTimes.w = mix (MAXFLOAT, aTimeEnter,
|
aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;
|
||||||
aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2);
|
|
||||||
|
|
||||||
ivec4 aChildren = ivec4 (0, 1, 2, 3);
|
ivec4 aChildren = ivec4 (0, 1, 2, 3);
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ static const char Shaders_PathtraceBase_fs[] =
|
|||||||
"#ifdef TWO_SIDED_BXDF\n"
|
"#ifdef TWO_SIDED_BXDF\n"
|
||||||
" return UNIT;\n"
|
" return UNIT;\n"
|
||||||
"#else\n"
|
"#else\n"
|
||||||
" return mix (UNIT, ZERO, theWo.z <= 0.f);\n"
|
" return UNIT * step (0.f, theWo.z);\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"}\n"
|
"}\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 aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.x = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.y = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.z = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 1);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.w = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theHit.Time && aTimeLeave >= 0.f && aData.z > 2);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -626,8 +622,7 @@ static const char Shaders_RaytraceBase_fs[] =
|
|||||||
" float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
" float aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" float aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.x = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.x = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
" aTimeMax = max (aNodeMin1, aNodeMax1);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.y = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.y = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
" aTimeMax = max (aNodeMin2, aNodeMax2);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.z = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.z = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 1);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
" aTimeMax = max (aNodeMin3, aNodeMax3);\n"
|
||||||
" aTimeMin = min (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"
|
" aTimeLeave = min (aTimeMax.x, min (aTimeMax.y, aTimeMax.z));\n"
|
||||||
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
" aTimeEnter = max (aTimeMin.x, max (aTimeMin.y, aTimeMin.z));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" aHitTimes.w = mix (MAXFLOAT, aTimeEnter,\n"
|
" aHitTimes.w = (aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2) ? aTimeEnter : MAXFLOAT;\n"
|
||||||
" aTimeEnter <= aTimeLeave && aTimeEnter <= theDistance && aTimeLeave >= 0.f && aData.z > 2);\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
" ivec4 aChildren = ivec4 (0, 1, 2, 3);\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user