occt-gltf-addon-linux-x64 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE_LGPL_21.txt +502 -0
- package/OCCT_LGPL_EXCEPTION.txt +10 -0
- package/README.md +2 -2
- package/index.js +63 -1
- package/lib/libTKBO.so.8.0.0 +0 -0
- package/lib/libTKBRep.so.8.0.0 +0 -0
- package/lib/libTKBin.so.8.0.0 +0 -0
- package/lib/libTKBinL.so.8.0.0 +0 -0
- package/lib/libTKBinTObj.so.8.0.0 +0 -0
- package/lib/libTKBinXCAF.so.8.0.0 +0 -0
- package/lib/libTKBool.so.8.0.0 +0 -0
- package/lib/libTKCAF.so.8.0.0 +0 -0
- package/lib/libTKCDF.so.8.0.0 +0 -0
- package/lib/libTKDE.so.8.0.0 +0 -0
- package/lib/libTKDECascade.so.8.0.0 +0 -0
- package/lib/libTKDEIGES.so.8.0.0 +0 -0
- package/lib/libTKDEOBJ.so.8.0.0 +0 -0
- package/lib/libTKDEPLY.so.8.0.0 +0 -0
- package/lib/libTKDESTEP.so.8.0.0 +0 -0
- package/lib/libTKDESTL.so.8.0.0 +0 -0
- package/lib/libTKDEVRML.so.8.0.0 +0 -0
- package/lib/libTKExpress.so.8.0.0 +0 -0
- package/lib/libTKFeat.so.8.0.0 +0 -0
- package/lib/libTKFillet.so.8.0.0 +0 -0
- package/lib/libTKG2d.so.8.0.0 +0 -0
- package/lib/libTKG3d.so.8.0.0 +0 -0
- package/lib/libTKGeomAlgo.so.8.0.0 +0 -0
- package/lib/libTKGeomBase.so.8.0.0 +0 -0
- package/lib/libTKHLR.so.8.0.0 +0 -0
- package/lib/libTKHelix.so.8.0.0 +0 -0
- package/lib/libTKLCAF.so.8.0.0 +0 -0
- package/lib/libTKMath.so.8.0.0 +0 -0
- package/lib/libTKMesh.so.8.0.0 +0 -0
- package/lib/libTKOffset.so.8.0.0 +0 -0
- package/lib/libTKPrim.so.8.0.0 +0 -0
- package/lib/libTKRWMesh.so.8.0.0 +0 -0
- package/lib/libTKService.so.8.0.0 +0 -0
- package/lib/libTKShHealing.so.8.0.0 +0 -0
- package/lib/libTKStd.so.8.0.0 +0 -0
- package/lib/libTKStdL.so.8.0.0 +0 -0
- package/lib/libTKTObj.so.8.0.0 +0 -0
- package/lib/libTKTopAlgo.so.8.0.0 +0 -0
- package/lib/libTKV3d.so.8.0.0 +0 -0
- package/lib/libTKVCAF.so.8.0.0 +0 -0
- package/lib/libTKXCAF.so.8.0.0 +0 -0
- package/lib/libTKXMesh.so.8.0.0 +0 -0
- package/lib/libTKXSBase.so.8.0.0 +0 -0
- package/lib/libTKXml.so.8.0.0 +0 -0
- package/lib/libTKXmlL.so.8.0.0 +0 -0
- package/lib/libTKXmlTObj.so.8.0.0 +0 -0
- package/lib/libTKXmlXCAF.so.8.0.0 +0 -0
- package/lib/libTKernel.so.8.0.0 +0 -0
- package/lib/libdraco.so.1 +0 -0
- package/lib/libtbb.so.2 +0 -0
- package/lib/libtbbmalloc.so.2 +0 -0
- package/lib/libtbbmalloc_proxy.so.2 +0 -0
- package/occt_gltf_addon.node +0 -0
- package/package.json +6 -2
- package/resources/BOPAlgo/BOPAlgo.msg +129 -0
- package/resources/BOPAlgo/FILES +1 -0
- package/resources/DrawResources/CURVES.tcl +38 -0
- package/resources/DrawResources/CheckCommands.tcl +1206 -0
- package/resources/DrawResources/DrawDefault +130 -0
- package/resources/DrawResources/DrawPlugin +64 -0
- package/resources/DrawResources/DrawTK.tcl +623 -0
- package/resources/DrawResources/FILES +16 -0
- package/resources/DrawResources/Geometry.tcl +96 -0
- package/resources/DrawResources/InitEnvironment.tcl +50 -0
- package/resources/DrawResources/Move.tcl +85 -0
- package/resources/DrawResources/OCC_logo.png +0 -0
- package/resources/DrawResources/PROFIL.tcl +726 -0
- package/resources/DrawResources/SCAN.tcl +192 -0
- package/resources/DrawResources/SURFACES.tcl +35 -0
- package/resources/DrawResources/StandardCommands.tcl +451 -0
- package/resources/DrawResources/StandardViews.tcl +284 -0
- package/resources/DrawResources/TKTopTest.tcl +27 -0
- package/resources/DrawResources/TestCommands.tcl +2969 -0
- package/resources/DrawResources/Vector.tcl +402 -0
- package/resources/DrawResources/dfb_attribns.gif +0 -0
- package/resources/DrawResources/dfb_attribute.gif +0 -0
- package/resources/DrawResources/dfb_folder.gif +0 -0
- package/resources/DrawResources/dftree.tcl +381 -0
- package/resources/DrawResources/lamp.ico +0 -0
- package/resources/SHMessage/FILES +2 -0
- package/resources/SHMessage/SHAPE.fr +267 -0
- package/resources/SHMessage/SHAPE.us +267 -0
- package/resources/Shaders/Declarations.glsl +276 -0
- package/resources/Shaders/DeclarationsImpl.glsl +121 -0
- package/resources/Shaders/Display.fs +157 -0
- package/resources/Shaders/FILES +27 -0
- package/resources/Shaders/LightShadow.glsl +48 -0
- package/resources/Shaders/PBRCookTorrance.glsl +20 -0
- package/resources/Shaders/PBRDirectionalLight.glsl +20 -0
- package/resources/Shaders/PBRDistribution.glsl +9 -0
- package/resources/Shaders/PBREnvBaking.fs +226 -0
- package/resources/Shaders/PBREnvBaking.vs +55 -0
- package/resources/Shaders/PBRFresnel.glsl +36 -0
- package/resources/Shaders/PBRGeometry.glsl +13 -0
- package/resources/Shaders/PBRIllumination.glsl +28 -0
- package/resources/Shaders/PBRPointLight.glsl +27 -0
- package/resources/Shaders/PBRSpotLight.glsl +45 -0
- package/resources/Shaders/PathtraceBase.fs +993 -0
- package/resources/Shaders/PhongDirectionalLight.glsl +29 -0
- package/resources/Shaders/PhongPointLight.glsl +36 -0
- package/resources/Shaders/PhongShading.fs +191 -0
- package/resources/Shaders/PhongShading.vs +43 -0
- package/resources/Shaders/PhongSpotLight.glsl +52 -0
- package/resources/Shaders/PointLightAttenuation.glsl +35 -0
- package/resources/Shaders/RaytraceBase.fs +1236 -0
- package/resources/Shaders/RaytraceBase.vs +12 -0
- package/resources/Shaders/RaytraceRender.fs +134 -0
- package/resources/Shaders/RaytraceSmooth.fs +80 -0
- package/resources/Shaders/SkydomBackground.fs +300 -0
- package/resources/Shaders/TangentSpaceNormal.glsl +17 -0
- package/resources/StdResource/FILES +6 -0
- package/resources/StdResource/MigrationSheet.txt +21 -0
- package/resources/StdResource/Plugin +52 -0
- package/resources/StdResource/Standard +25 -0
- package/resources/StdResource/StandardLite +22 -0
- package/resources/StdResource/TObj +17 -0
- package/resources/StdResource/XCAF +50 -0
- package/resources/TObj/FILES +1 -0
- package/resources/TObj/TObj.msg +85 -0
- package/resources/Textures/1d_elevation.rgb +0 -0
- package/resources/Textures/2d_MatraDatavision.rgb +0 -0
- package/resources/Textures/2d_alienskin.rgb +0 -0
- package/resources/Textures/2d_aluminum.rgb +0 -0
- package/resources/Textures/2d_blue_rock.rgb +0 -0
- package/resources/Textures/2d_bluewhite_paper.rgb +0 -0
- package/resources/Textures/2d_brushed.rgb +0 -0
- package/resources/Textures/2d_bubbles.rgb +0 -0
- package/resources/Textures/2d_bumps.rgb +0 -0
- package/resources/Textures/2d_cast.rgb +0 -0
- package/resources/Textures/2d_chess.rgba +0 -0
- package/resources/Textures/2d_chipbd.rgb +0 -0
- package/resources/Textures/2d_clouds.rgb +0 -0
- package/resources/Textures/2d_flesh.rgb +0 -0
- package/resources/Textures/2d_floor.rgb +0 -0
- package/resources/Textures/2d_galvnisd.rgb +0 -0
- package/resources/Textures/2d_grass.rgb +0 -0
- package/resources/Textures/2d_knurl.rgb +0 -0
- package/resources/Textures/2d_maple.rgb +0 -0
- package/resources/Textures/2d_marble.rgb +0 -0
- package/resources/Textures/2d_mottled.rgb +0 -0
- package/resources/Textures/2d_rain.rgb +0 -0
- package/resources/Textures/2d_rock.rgb +0 -0
- package/resources/Textures/FILES +31 -0
- package/resources/Textures/env_clouds.rgb +0 -0
- package/resources/Textures/env_cv.rgb +0 -0
- package/resources/Textures/env_lines.rgb +0 -0
- package/resources/Textures/env_medit.rgb +0 -0
- package/resources/Textures/env_pearl.rgb +0 -0
- package/resources/Textures/env_road.rgb +0 -0
- package/resources/Textures/env_sky1.rgb +0 -0
- package/resources/Textures/env_sky2.rgb +0 -0
- package/resources/UnitsAPI/CurrentUnits +74 -0
- package/resources/UnitsAPI/FILES +4 -0
- package/resources/UnitsAPI/MDTVBaseUnits +70 -0
- package/resources/UnitsAPI/MDTVCurrentUnits +74 -0
- package/resources/UnitsAPI/Units.dat +481 -0
- package/resources/XRResources/FILES +10 -0
- package/resources/XRResources/occtvr_actions.json +225 -0
- package/resources/XRResources/occtvr_bindings_generic.json +87 -0
- package/resources/XRResources/occtvr_bindings_holographic_hmd.json +18 -0
- package/resources/XRResources/occtvr_bindings_index_hmd.json +18 -0
- package/resources/XRResources/occtvr_bindings_rift.json +18 -0
- package/resources/XRResources/occtvr_bindings_touch.json +160 -0
- package/resources/XRResources/occtvr_bindings_vive.json +18 -0
- package/resources/XRResources/occtvr_bindings_vive_controller.json +139 -0
- package/resources/XRResources/occtvr_bindings_vive_cosmos.json +18 -0
- package/resources/XRResources/occtvr_bindings_vive_pro.json +18 -0
- package/resources/XSMessage/FILES +2 -0
- package/resources/XSMessage/XSTEP.fr +1026 -0
- package/resources/XSMessage/XSTEP.us +1023 -0
- package/resources/XSTEPResource/FILES +2 -0
- package/resources/XSTEPResource/IGES +65 -0
- package/resources/XSTEPResource/STEP +68 -0
- package/resources/XmlOcafResource/FILES +11 -0
- package/resources/XmlOcafResource/XmlOcaf.xsd +131 -0
- package/resources/XmlOcafResource/XmlOcaf_SmallTypes.xsd +217 -0
- package/resources/XmlOcafResource/XmlOcaf_TDF.xsd +33 -0
- package/resources/XmlOcafResource/XmlOcaf_TDataStd.xsd +230 -0
- package/resources/XmlOcafResource/XmlOcaf_TDataStd_Name.xsd +37 -0
- package/resources/XmlOcafResource/XmlOcaf_TDocStd.xsd +37 -0
- package/resources/XmlOcafResource/XmlOcaf_TFunction.xsd +38 -0
- package/resources/XmlOcafResource/XmlOcaf_TNaming.xsd +128 -0
- package/resources/XmlOcafResource/XmlOcaf_TNaming_NamedShape.xsd +97 -0
- package/resources/XmlOcafResource/XmlOcaf_TPrsStd.xsd +42 -0
- package/resources/XmlOcafResource/XmlXcaf.xsd +109 -0
- package/resources/samples/tcl/ANC101.tcl +282 -0
- package/resources/samples/tcl/DataExchangeDemo.tcl +85 -0
- package/resources/samples/tcl/MBBGehauseRohteil.tcl +268 -0
- package/resources/samples/tcl/ModelingDemo.tcl +120 -0
- package/resources/samples/tcl/Penrose.tcl +87 -0
- package/resources/samples/tcl/Readme.txt +4 -0
- package/resources/samples/tcl/VisualizationDemo.tcl +162 -0
- package/resources/samples/tcl/bottle.tcl +115 -0
- package/resources/samples/tcl/cad.tcl +63 -0
- package/resources/samples/tcl/cpu.tcl +327 -0
- package/resources/samples/tcl/cutter.tcl +91 -0
- package/resources/samples/tcl/dimensions.tcl +83 -0
- package/resources/samples/tcl/drill.tcl +147 -0
- package/resources/samples/tcl/logo2019.tcl +89 -0
- package/resources/samples/tcl/markers.tcl +76 -0
- package/resources/samples/tcl/materials.tcl +75 -0
- package/resources/samples/tcl/pathtrace_ball.tcl +79 -0
- package/resources/samples/tcl/pathtrace_cube.tcl +85 -0
- package/resources/samples/tcl/pathtrace_materials.tcl +229 -0
- package/resources/samples/tcl/pencil.tcl +64 -0
- package/resources/samples/tcl/raytrace.tcl +44 -0
- package/resources/samples/tcl/snowflake.tcl +161 -0
- package/resources/samples/tcl/spheres.tcl +148 -0
- package/resources/samples/tcl/vis_pbr_spheres.tcl +94 -0
- package/resources/samples/tcl/xde.tcl +47 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
out vec4 OutColor;
|
|
2
|
+
|
|
3
|
+
// Seed for random number generator (generated on CPU).
|
|
4
|
+
uniform int uFrameRndSeed;
|
|
5
|
+
|
|
6
|
+
//! Enables/disables using of single RNG seed for 16x16 image
|
|
7
|
+
//! blocks. Increases performance up to 4x, but the noise has
|
|
8
|
+
//! become structured. Can be used fo final rendering.
|
|
9
|
+
uniform int uBlockedRngEnabled;
|
|
10
|
+
|
|
11
|
+
//! Number of previously rendered frames (used in non-ISS mode).
|
|
12
|
+
uniform int uAccumSamples;
|
|
13
|
+
|
|
14
|
+
#ifndef ADAPTIVE_SAMPLING
|
|
15
|
+
//! Input image with previously accumulated samples.
|
|
16
|
+
uniform sampler2D uAccumTexture;
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
//! Maximum radiance that can be added to the pixel.
|
|
20
|
+
//! Decreases noise level, but introduces some bias.
|
|
21
|
+
uniform float uMaxRadiance;
|
|
22
|
+
|
|
23
|
+
#ifdef ADAPTIVE_SAMPLING
|
|
24
|
+
//! Wrapper over imageLoad()+imageStore() having similar syntax as imageAtomicAdd().
|
|
25
|
+
//! Modifies one component of 3Wx2H uRenderImage:
|
|
26
|
+
//! |RGL| Red, Green, Luminance
|
|
27
|
+
//! |SBH| Samples, Blue, Hit time transformed into OpenGL NDC space
|
|
28
|
+
//! Returns previous value of the component.
|
|
29
|
+
float addRenderImageComp (in ivec2 theFrag, in ivec2 theComp, in float theVal)
|
|
30
|
+
{
|
|
31
|
+
ivec2 aCoord = ivec2 (3 * theFrag.x + theComp.x,
|
|
32
|
+
2 * theFrag.y + theComp.y);
|
|
33
|
+
#ifdef ADAPTIVE_SAMPLING_ATOMIC
|
|
34
|
+
return imageAtomicAdd (uRenderImage, aCoord, theVal);
|
|
35
|
+
#else
|
|
36
|
+
float aVal = imageLoad (uRenderImage, aCoord).x;
|
|
37
|
+
imageStore (uRenderImage, aCoord, vec4 (aVal + theVal));
|
|
38
|
+
return aVal;
|
|
39
|
+
#endif
|
|
40
|
+
}
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
// =======================================================================
|
|
44
|
+
// function : main
|
|
45
|
+
// purpose :
|
|
46
|
+
// =======================================================================
|
|
47
|
+
void main (void)
|
|
48
|
+
{
|
|
49
|
+
SeedRand (uFrameRndSeed, uWinSizeX, uBlockedRngEnabled == 0 ? 1 : 16);
|
|
50
|
+
|
|
51
|
+
#ifndef PATH_TRACING
|
|
52
|
+
|
|
53
|
+
SRay aRay = GenerateRay (vPixel);
|
|
54
|
+
|
|
55
|
+
#else
|
|
56
|
+
|
|
57
|
+
ivec2 aFragCoord = ivec2 (gl_FragCoord.xy);
|
|
58
|
+
|
|
59
|
+
#ifdef ADAPTIVE_SAMPLING
|
|
60
|
+
|
|
61
|
+
#ifdef ADAPTIVE_SAMPLING_ATOMIC
|
|
62
|
+
ivec2 aTileXY = imageLoad (uOffsetImage, aFragCoord / uTileSize).xy * uTileSize;
|
|
63
|
+
if (aTileXY.x < 0) { discard; }
|
|
64
|
+
|
|
65
|
+
ivec2 aRealBlockSize = ivec2 (min (uWinSizeX - aTileXY.x, uTileSize.x),
|
|
66
|
+
min (uWinSizeY - aTileXY.y, uTileSize.y));
|
|
67
|
+
|
|
68
|
+
aFragCoord.x = aTileXY.x + (aFragCoord.x % aRealBlockSize.x);
|
|
69
|
+
aFragCoord.y = aTileXY.y + (aFragCoord.y % aRealBlockSize.y);
|
|
70
|
+
#else
|
|
71
|
+
int aNbTileSamples = imageAtomicAdd (uTilesImage, aFragCoord / uTileSize, int(-1));
|
|
72
|
+
if (aNbTileSamples <= 0)
|
|
73
|
+
{
|
|
74
|
+
discard;
|
|
75
|
+
}
|
|
76
|
+
#endif
|
|
77
|
+
|
|
78
|
+
#endif // ADAPTIVE_SAMPLING
|
|
79
|
+
|
|
80
|
+
vec2 aPnt = vec2 (float(aFragCoord.x) + RandFloat(),
|
|
81
|
+
float(aFragCoord.y) + RandFloat());
|
|
82
|
+
|
|
83
|
+
SRay aRay = GenerateRay (aPnt / vec2 (uWinSizeX, uWinSizeY));
|
|
84
|
+
|
|
85
|
+
#endif // PATH_TRACING
|
|
86
|
+
|
|
87
|
+
vec3 aInvDirect = InverseDirection (aRay.Direct);
|
|
88
|
+
|
|
89
|
+
#ifdef PATH_TRACING
|
|
90
|
+
|
|
91
|
+
#ifndef ADAPTIVE_SAMPLING
|
|
92
|
+
vec4 aColor = PathTrace (aRay, aInvDirect, uAccumSamples);
|
|
93
|
+
#else
|
|
94
|
+
float aNbSamples = addRenderImageComp (aFragCoord, ivec2 (0, 1), 1.0);
|
|
95
|
+
vec4 aColor = PathTrace (aRay, aInvDirect, int (aNbSamples));
|
|
96
|
+
#endif
|
|
97
|
+
|
|
98
|
+
if (any (isnan (aColor.rgb)))
|
|
99
|
+
{
|
|
100
|
+
aColor.rgb = ZERO;
|
|
101
|
+
}
|
|
102
|
+
aColor.rgb = min (aColor.rgb, vec3 (uMaxRadiance));
|
|
103
|
+
|
|
104
|
+
#ifdef ADAPTIVE_SAMPLING
|
|
105
|
+
|
|
106
|
+
// accumulate RGB color and depth
|
|
107
|
+
addRenderImageComp (aFragCoord, ivec2 (0, 0), aColor.r);
|
|
108
|
+
addRenderImageComp (aFragCoord, ivec2 (1, 0), aColor.g);
|
|
109
|
+
addRenderImageComp (aFragCoord, ivec2 (1, 1), aColor.b);
|
|
110
|
+
addRenderImageComp (aFragCoord, ivec2 (2, 1), aColor.w);
|
|
111
|
+
if (int (aNbSamples) % 2 == 0) // accumulate luminance for even samples only
|
|
112
|
+
{
|
|
113
|
+
addRenderImageComp (aFragCoord, ivec2 (2, 0), dot (LUMA, aColor.rgb));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
#else
|
|
117
|
+
|
|
118
|
+
if (uAccumSamples == 0)
|
|
119
|
+
{
|
|
120
|
+
OutColor = aColor;
|
|
121
|
+
}
|
|
122
|
+
else
|
|
123
|
+
{
|
|
124
|
+
OutColor = mix (texture (uAccumTexture, vPixel), aColor, 1.0 / float(uAccumSamples + 1));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#endif // ADAPTIVE_SAMPLING
|
|
128
|
+
|
|
129
|
+
#else
|
|
130
|
+
|
|
131
|
+
OutColor = clamp (Radiance (aRay, aInvDirect), 0.f, 1.f);
|
|
132
|
+
|
|
133
|
+
#endif // PATH_TRACING
|
|
134
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//! Input ray-traced image.
|
|
2
|
+
uniform sampler2D uFSAAInputTexture;
|
|
3
|
+
|
|
4
|
+
//! Number of accumulated FSAA samples.
|
|
5
|
+
uniform int uSamples;
|
|
6
|
+
|
|
7
|
+
//! Output pixel color.
|
|
8
|
+
out vec4 OutColor;
|
|
9
|
+
|
|
10
|
+
#define LUM_DIFFERENCE 0.085f
|
|
11
|
+
|
|
12
|
+
// =======================================================================
|
|
13
|
+
// function : main
|
|
14
|
+
// purpose :
|
|
15
|
+
// =======================================================================
|
|
16
|
+
void main (void)
|
|
17
|
+
{
|
|
18
|
+
#ifndef PATH_TRACING
|
|
19
|
+
|
|
20
|
+
int aPixelX = int (gl_FragCoord.x);
|
|
21
|
+
int aPixelY = int (gl_FragCoord.y);
|
|
22
|
+
|
|
23
|
+
// Adjust FLIPTRI pattern used for adaptive FSAA
|
|
24
|
+
float anOffsetX = mix (uFsaaOffset.x, -uFsaaOffset.x, float (aPixelX % 2));
|
|
25
|
+
float anOffsetY = mix (uFsaaOffset.y, -uFsaaOffset.y, float (aPixelY % 2));
|
|
26
|
+
|
|
27
|
+
vec4 aClr0 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 0, aPixelY + 0), 0);
|
|
28
|
+
vec4 aClr1 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 0, aPixelY - 1), 0);
|
|
29
|
+
vec4 aClr2 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 0, aPixelY + 1), 0);
|
|
30
|
+
|
|
31
|
+
vec4 aClr3 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 1, aPixelY + 0), 0);
|
|
32
|
+
vec4 aClr4 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 1, aPixelY - 1), 0);
|
|
33
|
+
vec4 aClr5 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX + 1, aPixelY + 1), 0);
|
|
34
|
+
|
|
35
|
+
vec4 aClr6 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX - 1, aPixelY + 0), 0);
|
|
36
|
+
vec4 aClr7 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX - 1, aPixelY - 1), 0);
|
|
37
|
+
vec4 aClr8 = texelFetch (uFSAAInputTexture, ivec2 (aPixelX - 1, aPixelY + 1), 0);
|
|
38
|
+
|
|
39
|
+
float aLum = dot (LUMA, aClr0.xyz);
|
|
40
|
+
|
|
41
|
+
bool aRender = abs (aClr1.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
42
|
+
abs (aClr2.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
43
|
+
abs (aClr3.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
44
|
+
abs (aClr4.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
45
|
+
abs (aClr5.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
46
|
+
abs (aClr6.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
47
|
+
abs (aClr7.w - aClr0.w) > LUM_DIFFERENCE ||
|
|
48
|
+
abs (aClr8.w - aClr0.w) > LUM_DIFFERENCE;
|
|
49
|
+
|
|
50
|
+
if (!aRender)
|
|
51
|
+
{
|
|
52
|
+
aRender = abs (dot (LUMA, aClr1.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
53
|
+
abs (dot (LUMA, aClr2.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
54
|
+
abs (dot (LUMA, aClr3.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
55
|
+
abs (dot (LUMA, aClr4.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
56
|
+
abs (dot (LUMA, aClr5.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
57
|
+
abs (dot (LUMA, aClr6.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
58
|
+
abs (dot (LUMA, aClr7.xyz) - aLum) > LUM_DIFFERENCE ||
|
|
59
|
+
abs (dot (LUMA, aClr8.xyz) - aLum) > LUM_DIFFERENCE;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
vec4 aColor = aClr0;
|
|
63
|
+
|
|
64
|
+
if (aRender)
|
|
65
|
+
{
|
|
66
|
+
SRay aRay = GenerateRay (vPixel + vec2 (anOffsetX, anOffsetY));
|
|
67
|
+
|
|
68
|
+
vec3 aInvDirect = 1.f / max (abs (aRay.Direct), SMALL);
|
|
69
|
+
|
|
70
|
+
aInvDirect = vec3 (aRay.Direct.x < 0.f ? -aInvDirect.x : aInvDirect.x,
|
|
71
|
+
aRay.Direct.y < 0.f ? -aInvDirect.y : aInvDirect.y,
|
|
72
|
+
aRay.Direct.z < 0.f ? -aInvDirect.z : aInvDirect.z);
|
|
73
|
+
|
|
74
|
+
aColor = mix (aClr0, clamp (Radiance (aRay, aInvDirect), 0.0, 1.0), 1.0 / float(uSamples));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
OutColor = aColor;
|
|
78
|
+
|
|
79
|
+
#endif
|
|
80
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// Constants
|
|
2
|
+
const float M_PI = 3.1415926535;
|
|
3
|
+
const float THE_EARTH_RADIUS = 6360e3;
|
|
4
|
+
const vec3 THE_EARTH_CENTER = vec3 (0.0, -THE_EARTH_RADIUS, 0.0);
|
|
5
|
+
const float THE_ATMO_RADIUS = 6380e3; // atmosphere radius (6420e3?)
|
|
6
|
+
const float THE_G = 0.76; // anisotropy of the medium (papers use 0.76)
|
|
7
|
+
const float THE_G2 = THE_G * THE_G;
|
|
8
|
+
const float THE_HR = 8000.0; // Thickness of the atmosphere
|
|
9
|
+
const float THE_HM = 1000.0; // Same as above but for Mie
|
|
10
|
+
const vec3 THE_BETA_R = vec3 (5.8e-6, 13.5e-6, 33.1e-6); // Reyleigh scattering normal earth
|
|
11
|
+
const vec3 THE_BETA_M = vec3 (21e-6); // Normal Mie scattering
|
|
12
|
+
|
|
13
|
+
// Parameters
|
|
14
|
+
const float THE_SunAttenuation = 1.0; // sun intensity
|
|
15
|
+
const float THE_EyeHeight = 100.0; // viewer height
|
|
16
|
+
const float THE_HorizonWidth = 0.002;
|
|
17
|
+
const int THE_NbSamples = 8;
|
|
18
|
+
const int THE_NbSamplesLight = 8; // integral sampling rate (might highly hit performance)
|
|
19
|
+
const float THE_SunPower = 5.0;
|
|
20
|
+
const float THE_StarTreshold = 0.98;
|
|
21
|
+
|
|
22
|
+
// Uniforms
|
|
23
|
+
uniform vec3 uSunDir;
|
|
24
|
+
uniform float uTime;
|
|
25
|
+
uniform float uCloudy;
|
|
26
|
+
uniform float uFog;
|
|
27
|
+
|
|
28
|
+
float hash13 (in vec3 p3)
|
|
29
|
+
{
|
|
30
|
+
p3 = fract (p3 * 0.1031);
|
|
31
|
+
p3 += dot (p3, p3.zyx + 31.32);
|
|
32
|
+
return fract ((p3.x + p3.y) * p3.z);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
float hash12 (in vec2 p)
|
|
36
|
+
{
|
|
37
|
+
vec3 p3 = fract (vec3(p.xyx) * .1031);
|
|
38
|
+
p3 += dot (p3, p3.yzx + 33.33);
|
|
39
|
+
return fract ((p3.x + p3.y) * p3.z);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
float smoothStarField (in vec2 theSamplePos)
|
|
43
|
+
{
|
|
44
|
+
vec2 aFract = fract (theSamplePos);
|
|
45
|
+
vec2 aFloorSample = floor (theSamplePos);
|
|
46
|
+
float v1 = hash12 (aFloorSample);
|
|
47
|
+
float v2 = hash12 (aFloorSample + vec2( 0.0, 1.0 ));
|
|
48
|
+
float v3 = hash12 (aFloorSample + vec2( 1.0, 0.0 ));
|
|
49
|
+
float v4 = hash12 (aFloorSample + vec2( 1.0, 1.0 ));
|
|
50
|
+
|
|
51
|
+
vec2 u = aFract * aFract * (3.0 - 2.0 * aFract);
|
|
52
|
+
|
|
53
|
+
return mix(v1, v2, u.x) +
|
|
54
|
+
(v3 - v1) * u.y * (1.0 - u.x) +
|
|
55
|
+
(v4 - v2) * u.x * u.y;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
float noisyStarField (in vec2 theSamplePos)
|
|
59
|
+
{
|
|
60
|
+
float aStarVal = smoothStarField (theSamplePos);
|
|
61
|
+
if (aStarVal >= THE_StarTreshold)
|
|
62
|
+
{
|
|
63
|
+
aStarVal = pow ((aStarVal - THE_StarTreshold) / (1.0 - THE_StarTreshold), 6.0);
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
{
|
|
67
|
+
aStarVal = 0.0;
|
|
68
|
+
}
|
|
69
|
+
return aStarVal;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
float smoothNoise (in vec3 theCoord)
|
|
73
|
+
{
|
|
74
|
+
vec3 anInt = floor (theCoord);
|
|
75
|
+
vec3 anFract = fract (theCoord);
|
|
76
|
+
anFract = anFract * anFract * (3.0 - (2.0 * anFract));
|
|
77
|
+
return mix(mix(mix(hash13(anInt ),
|
|
78
|
+
hash13(anInt + vec3(1.0, 0.0, 0.0)), anFract.x),
|
|
79
|
+
mix(hash13(anInt + vec3(0.0, 1.0, 0.0)),
|
|
80
|
+
hash13(anInt + vec3(1.0, 1.0, 0.0)), anFract.x), anFract.y),
|
|
81
|
+
mix(mix(hash13(anInt + vec3(0.0, 0.0, 1.0)),
|
|
82
|
+
hash13(anInt + vec3(1.0, 0.0, 1.0)), anFract.x),
|
|
83
|
+
mix(hash13(anInt + vec3(0.0, 1.0, 1.0)),
|
|
84
|
+
hash13(anInt + vec3(1.0, 1.0, 1.0)), anFract.x), anFract.y), anFract.z);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
float fnoise (in vec3 theCoord, in float theTime)
|
|
88
|
+
{
|
|
89
|
+
theCoord *= .25;
|
|
90
|
+
float aNoise;
|
|
91
|
+
|
|
92
|
+
aNoise = 0.5000 * smoothNoise (theCoord);
|
|
93
|
+
theCoord = theCoord * 3.02; theCoord.y -= theTime * 0.2;
|
|
94
|
+
aNoise += 0.2500 * smoothNoise (theCoord);
|
|
95
|
+
theCoord = theCoord * 3.03; theCoord.y += theTime * 0.06;
|
|
96
|
+
aNoise += 0.1250 * smoothNoise (theCoord);
|
|
97
|
+
theCoord = theCoord * 3.01;
|
|
98
|
+
aNoise += 0.0625 * smoothNoise (theCoord);
|
|
99
|
+
theCoord = theCoord * 3.03;
|
|
100
|
+
aNoise += 0.03125 * smoothNoise (theCoord);
|
|
101
|
+
theCoord = theCoord * 3.02;
|
|
102
|
+
aNoise += 0.015625 * smoothNoise (theCoord);
|
|
103
|
+
return aNoise;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
float clouds (in vec3 theTs, in float theTime)
|
|
107
|
+
{
|
|
108
|
+
float aCloud = fnoise (theTs * 2e-4, theTime) + uCloudy * 0.1;
|
|
109
|
+
aCloud = smoothstep (0.44, 0.64, aCloud);
|
|
110
|
+
aCloud *= 70.0;
|
|
111
|
+
return aCloud + uFog;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
void densities (in vec3 thePos, out float theRayleigh, out float theMie, in float theTime)
|
|
115
|
+
{
|
|
116
|
+
float aHeight = length (thePos - THE_EARTH_CENTER) - THE_EARTH_RADIUS;
|
|
117
|
+
theRayleigh = exp (-aHeight / THE_HR);
|
|
118
|
+
|
|
119
|
+
float aCloud = 0.0;
|
|
120
|
+
if (aHeight > 5000.0 && aHeight < 8000.0)
|
|
121
|
+
{
|
|
122
|
+
aCloud = clouds (thePos + vec3 (0.0, 0.,-theTime*3e3), theTime);
|
|
123
|
+
aCloud *= sin (M_PI*(aHeight - 5e3) / 5e3) * uCloudy;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
float aCloud2 = 0.0;
|
|
127
|
+
if (aHeight > 12e3 && aHeight < 15.5e3)
|
|
128
|
+
{
|
|
129
|
+
aCloud2 = fnoise (thePos * 3e-4, theTime) * clouds (thePos * 32.0, theTime);
|
|
130
|
+
aCloud2 *= sin (M_PI * (aHeight - 12e3) / 12e3) * 0.05;
|
|
131
|
+
aCloud2 = clamp (aCloud2, 0.0, 1.0);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
theMie = exp (-aHeight / THE_HM) + aCloud + uFog;
|
|
135
|
+
theMie += aCloud2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ray with sphere intersection problem is reduced to solving the equation
|
|
139
|
+
// (P - C)^2 = r^2 <--- sphere equation
|
|
140
|
+
// where P is P(t) = A + t*B <--- point on ray
|
|
141
|
+
// t^2*dot(B, B) + t*2*dot(B, A-C) + dot(A-C, A-C) - r^2 = 0
|
|
142
|
+
// [ A ] [ B ] [ C ]
|
|
143
|
+
// We just need to solve the above quadratic equation
|
|
144
|
+
float raySphereIntersect (in vec3 theOrig, in vec3 theDir, in float theRadius)
|
|
145
|
+
{
|
|
146
|
+
theOrig = theOrig - THE_EARTH_CENTER;
|
|
147
|
+
// A coefficient will be always 1 (theDir is normalized)
|
|
148
|
+
float B = dot (theOrig, theDir);
|
|
149
|
+
float C = dot (theOrig, theOrig) - theRadius * theRadius;
|
|
150
|
+
// optimized version of classic (-b +- sqrt(b^2 - 4ac)) / 2a
|
|
151
|
+
float aDet2 = B * B - C;
|
|
152
|
+
if (aDet2 < 0.0) { return -1.0; }
|
|
153
|
+
float aDet = sqrt (aDet2);
|
|
154
|
+
float aT1 = -B - aDet;
|
|
155
|
+
float aT2 = -B + aDet;
|
|
156
|
+
return aT1 >= 0.0 ? aT1 : aT2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
void scatter (in vec3 theEye, in vec3 theRay, in vec3 theSun,
|
|
160
|
+
out vec3 theCol, out float theScat, in float theTime)
|
|
161
|
+
{
|
|
162
|
+
float aRayLen = raySphereIntersect (theEye, theRay, THE_ATMO_RADIUS);
|
|
163
|
+
float aMu = dot (theRay, theSun);
|
|
164
|
+
float aMu2 = 1.0 + aMu*aMu;
|
|
165
|
+
// The Raleigh phase function looks like this:
|
|
166
|
+
float aPhaseR = 3.0/(16.0 * M_PI) * aMu2;
|
|
167
|
+
// And the Mie phase function equation is:
|
|
168
|
+
float aPhaseM = (3.0 / (8.0 * M_PI) * (1.0 - THE_G2) * aMu2)
|
|
169
|
+
/ ((2.0 + THE_G2) * pow (1.0 + THE_G2 - 2.0 * THE_G * aMu, 1.5));
|
|
170
|
+
|
|
171
|
+
float anOpticalDepthR = 0.0;
|
|
172
|
+
float anOpticalDepthM = 0.0;
|
|
173
|
+
vec3 aSumR = vec3 (0.0);
|
|
174
|
+
vec3 aSumM = vec3 (0.0); // Mie and Rayleigh contribution
|
|
175
|
+
|
|
176
|
+
float dl = aRayLen / float (THE_NbSamples);
|
|
177
|
+
for (int i = 0; i < THE_NbSamples; ++i)
|
|
178
|
+
{
|
|
179
|
+
float l = float(i) * dl;
|
|
180
|
+
vec3 aSamplePos = theEye + theRay * l;
|
|
181
|
+
|
|
182
|
+
float dR, dM;
|
|
183
|
+
densities (aSamplePos, dR, dM, theTime);
|
|
184
|
+
dR *= dl;
|
|
185
|
+
dM *= dl;
|
|
186
|
+
anOpticalDepthR += dR;
|
|
187
|
+
anOpticalDepthM += dM;
|
|
188
|
+
|
|
189
|
+
float aSegmentLengthLight = raySphereIntersect (aSamplePos, theSun, THE_ATMO_RADIUS);
|
|
190
|
+
if (aSegmentLengthLight > 0.0)
|
|
191
|
+
{
|
|
192
|
+
float dls = aSegmentLengthLight / float (THE_NbSamplesLight);
|
|
193
|
+
float anOpticalDepthRs = 0.0;
|
|
194
|
+
float anOpticalDepthMs = 0.0;
|
|
195
|
+
for (int j = 0; j < THE_NbSamplesLight; ++j)
|
|
196
|
+
{
|
|
197
|
+
float ls = float (j) * dls;
|
|
198
|
+
vec3 aSamplePosS = aSamplePos + theSun * ls;
|
|
199
|
+
float dRs, dMs;
|
|
200
|
+
densities (aSamplePosS, dRs, dMs, theTime);
|
|
201
|
+
anOpticalDepthRs += dRs * dls;
|
|
202
|
+
anOpticalDepthMs += dMs * dls;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
vec3 anAttenuation = exp (-(THE_BETA_R * (anOpticalDepthR + anOpticalDepthRs)
|
|
206
|
+
+ THE_BETA_M * (anOpticalDepthM + anOpticalDepthMs)));
|
|
207
|
+
aSumR += anAttenuation * dR;
|
|
208
|
+
aSumM += anAttenuation * dM;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
theCol = THE_SunPower * (aSumR * THE_BETA_R * aPhaseR + aSumM * THE_BETA_M * aPhaseM);
|
|
213
|
+
theScat = 1.0 - clamp (anOpticalDepthM*1e-5, 0.0, 1.0);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// This is where all the magic happens. We first raymarch along the primary ray
|
|
217
|
+
// (from the camera origin to the point where the ray exits the atmosphere).
|
|
218
|
+
// For each sample along the primary ray,
|
|
219
|
+
// we then "cast" a light ray and raymarch along that ray as well.
|
|
220
|
+
// We basically shoot a ray in the direction of the sun.
|
|
221
|
+
vec4 computeIncidentLight (in vec3 theRayDirection, in vec2 theUv, in float theTime)
|
|
222
|
+
{
|
|
223
|
+
float aSunAttenuation = THE_SunAttenuation;
|
|
224
|
+
vec3 aSunDir = uSunDir;
|
|
225
|
+
// conversion to moon
|
|
226
|
+
float aStarAttenuation = 0.0;
|
|
227
|
+
if (aSunDir.y < 0.0)
|
|
228
|
+
{
|
|
229
|
+
aSunDir *= -1.0;
|
|
230
|
+
aSunAttenuation = aSunAttenuation * 0.1;
|
|
231
|
+
aStarAttenuation = sqrt (aSunDir.y);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
vec3 anEyePosition = vec3(0.0, THE_EyeHeight, 0.0);
|
|
235
|
+
|
|
236
|
+
// draw a water surface horizontally symmetrically to the sky
|
|
237
|
+
if (theRayDirection.y <= -THE_HorizonWidth / 2.0)
|
|
238
|
+
{
|
|
239
|
+
theRayDirection.y = -THE_HorizonWidth - theRayDirection.y;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
float aScattering = 0.0;
|
|
243
|
+
vec3 aColor = vec3 (0.0);
|
|
244
|
+
|
|
245
|
+
scatter (anEyePosition, theRayDirection, aSunDir, aColor, aScattering, theTime);
|
|
246
|
+
aColor *= aSunAttenuation;
|
|
247
|
+
float aStarIntensity = noisyStarField (theUv * 2048.0);
|
|
248
|
+
vec3 aStarColor = vec3 (aScattering * aStarIntensity * aStarAttenuation);
|
|
249
|
+
aColor += aStarColor;
|
|
250
|
+
|
|
251
|
+
return vec4 (1.18 * pow (aColor, vec3(0.7)), 1.0);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
uniform int uSide;
|
|
255
|
+
|
|
256
|
+
void main()
|
|
257
|
+
{
|
|
258
|
+
vec2 anUv = vec2 (2.0 * TexCoord.x - 1.0,
|
|
259
|
+
2.0 * TexCoord.y - 1.0);
|
|
260
|
+
vec3 aPlanes[6];
|
|
261
|
+
aPlanes[0] = vec3 (+1.0, 0.0, 0.0);
|
|
262
|
+
aPlanes[1] = vec3 (-1.0, 0.0, 0.0);
|
|
263
|
+
aPlanes[2] = vec3 ( 0.0,+1.0, 0.0);
|
|
264
|
+
aPlanes[3] = vec3 ( 0.0,-1.0, 0.0);
|
|
265
|
+
aPlanes[4] = vec3 ( 0.0, 0.0,+1.0);
|
|
266
|
+
aPlanes[5] = vec3 ( 0.0, 0.0,-1.0);
|
|
267
|
+
vec3 aRayDirection;
|
|
268
|
+
if (uSide == 0)
|
|
269
|
+
{
|
|
270
|
+
// Positive X side
|
|
271
|
+
aRayDirection = aPlanes[0] + vec3 (0.0, +anUv.y, -anUv.x);
|
|
272
|
+
}
|
|
273
|
+
else if (uSide == 1)
|
|
274
|
+
{
|
|
275
|
+
// Negative X side
|
|
276
|
+
aRayDirection = aPlanes[1] + vec3 (0.0, +anUv.y, +anUv.x);
|
|
277
|
+
}
|
|
278
|
+
else if (uSide == 2)
|
|
279
|
+
{
|
|
280
|
+
// Positive Y side
|
|
281
|
+
aRayDirection = aPlanes[2] + vec3 (+anUv.x, 0.0, +anUv.y);
|
|
282
|
+
}
|
|
283
|
+
else if (uSide == 3)
|
|
284
|
+
{
|
|
285
|
+
// Negative Y side
|
|
286
|
+
aRayDirection = aPlanes[3] + vec3 (+anUv.x, 0.0, -anUv.y);
|
|
287
|
+
}
|
|
288
|
+
else if (uSide == 4)
|
|
289
|
+
{
|
|
290
|
+
// Positive Z side
|
|
291
|
+
aRayDirection = aPlanes[4] + vec3 (+anUv.x, +anUv.y, 0.0);
|
|
292
|
+
}
|
|
293
|
+
else if (uSide == 5)
|
|
294
|
+
{
|
|
295
|
+
// Negative Z side
|
|
296
|
+
aRayDirection = aPlanes[5] + vec3 (-anUv.x, +anUv.y, 0.0);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
occFragColor = computeIncidentLight (normalize (aRayDirection), anUv, uTime);
|
|
300
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//! Calculates transformation from tangent space and apply it to value from normal map to get normal in object space
|
|
2
|
+
vec3 TangentSpaceNormal (in mat2 theDeltaUVMatrix,
|
|
3
|
+
in mat2x3 theDeltaVectorMatrix,
|
|
4
|
+
in vec3 theNormalMapValue,
|
|
5
|
+
in vec3 theNormal,
|
|
6
|
+
in bool theIsInverse)
|
|
7
|
+
{
|
|
8
|
+
theNormalMapValue = normalize(theNormalMapValue * 2.0 - vec3(1.0));
|
|
9
|
+
// Inverse matrix
|
|
10
|
+
theDeltaUVMatrix = mat2 (theDeltaUVMatrix[1][1], -theDeltaUVMatrix[0][1], -theDeltaUVMatrix[1][0], theDeltaUVMatrix[0][0]);
|
|
11
|
+
theDeltaVectorMatrix = theDeltaVectorMatrix * theDeltaUVMatrix;
|
|
12
|
+
// Gram-Schmidt orthogonalization
|
|
13
|
+
theDeltaVectorMatrix[1] = normalize(theDeltaVectorMatrix[1] - dot(theNormal, theDeltaVectorMatrix[1]) * theNormal);
|
|
14
|
+
theDeltaVectorMatrix[0] = cross(theDeltaVectorMatrix[1], theNormal);
|
|
15
|
+
float aDirection = theIsInverse ? -1.0 : 1.0;
|
|
16
|
+
return mat3 (aDirection * theDeltaVectorMatrix[0], aDirection * theDeltaVectorMatrix[1], theNormal) * theNormalMapValue;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
TDataStd_Shape TDataXtd_Shape
|
|
2
|
+
TDataStd_Constraint TDataXtd_Constraint
|
|
3
|
+
TDataStd_Geometry TDataXtd_Geometry
|
|
4
|
+
TDataStd_Axis TDataXtd_Axis
|
|
5
|
+
TDataStd_Point TDataXtd_Point
|
|
6
|
+
TDataStd_Plane TDataXtd_Plane
|
|
7
|
+
TDataStd_Position TDataXtd_Position
|
|
8
|
+
TDataStd_Placement TDataXtd_Placement
|
|
9
|
+
TDataStd_PatternStd TDataXtd_PatternStd
|
|
10
|
+
TPrsStd_AISPresentation TDataXtd_Presentation
|
|
11
|
+
PDataStd_Shape PDataXtd_Shape
|
|
12
|
+
PDataStd_Constraint PDataXtd_Constraint
|
|
13
|
+
PDataStd_Geometry PDataXtd_Geometry
|
|
14
|
+
PDataStd_Axis PDataXtd_Axis
|
|
15
|
+
PDataStd_Point PDataXtd_Point
|
|
16
|
+
PDataStd_Plane PDataXtd_Plane
|
|
17
|
+
PDataStd_Position PDataXtd_Position
|
|
18
|
+
PDataStd_Placement PDataXtd_Placement
|
|
19
|
+
PDataStd_PatternStd PDataXtd_PatternStd
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
! Description of available plugins
|
|
2
|
+
! ********************************
|
|
3
|
+
!
|
|
4
|
+
! standard attribute drivers plugin
|
|
5
|
+
!
|
|
6
|
+
ad696001-5b34-11d1-b5ba-00a0c9064368.Location: TKStd
|
|
7
|
+
!
|
|
8
|
+
! standard attribute drivers plugin
|
|
9
|
+
!
|
|
10
|
+
bd696001-5b34-11d1-b5ba-00a0c9064368.Location: TKStdL
|
|
11
|
+
!
|
|
12
|
+
! XmlOcaf Document Plugin
|
|
13
|
+
!
|
|
14
|
+
03a56820-8269-11d5-aab2-0050044b1af1.Location: TKXml
|
|
15
|
+
03a56822-8269-11d5-aab2-0050044b1af1.Location: TKXml
|
|
16
|
+
03a56824-8269-11d5-aab2-0050044b1af1.Location: TKXml
|
|
17
|
+
!
|
|
18
|
+
! XmlLOcaf Document Plugin
|
|
19
|
+
!
|
|
20
|
+
13a56820-8269-11d5-aab2-0050044b1af1.Location: TKXmlL
|
|
21
|
+
13a56822-8269-11d5-aab2-0050044b1af1.Location: TKXmlL
|
|
22
|
+
13a56824-8269-11d5-aab2-0050044b1af1.Location: TKXmlL
|
|
23
|
+
!
|
|
24
|
+
! BinOcaf Document Plugin
|
|
25
|
+
!
|
|
26
|
+
03a56835-8269-11d5-aab2-0050044b1af1.Location: TKBin
|
|
27
|
+
03a56836-8269-11d5-aab2-0050044b1af1.Location: TKBin
|
|
28
|
+
!
|
|
29
|
+
! BinLOcaf Document Plugin
|
|
30
|
+
!
|
|
31
|
+
13a56835-8269-11d5-aab2-0050044b1af1.Location: TKBinL
|
|
32
|
+
13a56836-8269-11d5-aab2-0050044b1af1.Location: TKBinL
|
|
33
|
+
!
|
|
34
|
+
! XmlXCAF Document Plugin
|
|
35
|
+
!
|
|
36
|
+
f78ff496-a779-11d5-aab4-0050044b1af1.Location: TKXmlXCAF
|
|
37
|
+
f78ff497-a779-11d5-aab4-0050044b1af1.Location: TKXmlXCAF
|
|
38
|
+
!
|
|
39
|
+
! BinXCAF Document Plugin
|
|
40
|
+
!
|
|
41
|
+
a78ff496-a779-11d5-aab4-0050044b1af1.Location: TKBinXCAF
|
|
42
|
+
a78ff497-a779-11d5-aab4-0050044b1af1.Location: TKBinXCAF
|
|
43
|
+
!
|
|
44
|
+
! TObjXml Document Plugin
|
|
45
|
+
!
|
|
46
|
+
f78ff4a0-a779-11d5-aab4-0050044b1af1.Location: TKXmlTObj
|
|
47
|
+
f78ff4a1-a779-11d5-aab4-0050044b1af1.Location: TKXmlTObj
|
|
48
|
+
!
|
|
49
|
+
! TObjBin Document Plugin
|
|
50
|
+
!
|
|
51
|
+
f78ff4a2-a779-11d5-aab4-0050044b1af1.Location: TKBinTObj
|
|
52
|
+
f78ff4a3-a779-11d5-aab4-0050044b1af1.Location: TKBinTObj
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
formatlist:MDTV-Standard|XmlOcaf|BinOcaf
|
|
2
|
+
!
|
|
3
|
+
! Default format
|
|
4
|
+
xml.FileFormat: XmlOcaf
|
|
5
|
+
cbf.FileFormat: BinOcaf
|
|
6
|
+
!
|
|
7
|
+
! standard attributes
|
|
8
|
+
!
|
|
9
|
+
MDTV-Standard.Description: Standard Document Version 1.0
|
|
10
|
+
MDTV-Standard.FileExtension: std
|
|
11
|
+
MDTV-Standard.RetrievalPlugin: ad696001-5b34-11d1-b5ba-00a0c9064368
|
|
12
|
+
!
|
|
13
|
+
! XmlOcaf format
|
|
14
|
+
!
|
|
15
|
+
XmlOcaf.Description: Xml Document Version 1.0
|
|
16
|
+
XmlOcaf.FileExtension: xml
|
|
17
|
+
XmlOcaf.StoragePlugin: 03a56820-8269-11d5-aab2-0050044b1af1
|
|
18
|
+
XmlOcaf.RetrievalPlugin: 03a56822-8269-11d5-aab2-0050044b1af1
|
|
19
|
+
!
|
|
20
|
+
! BinOcaf format
|
|
21
|
+
!
|
|
22
|
+
BinOcaf.Description: Bin Ocaf Document Version 1.0
|
|
23
|
+
BinOcaf.FileExtension: cbf
|
|
24
|
+
BinOcaf.StoragePlugin: 03a56835-8269-11d5-aab2-0050044b1af1
|
|
25
|
+
BinOcaf.RetrievalPlugin: 03a56836-8269-11d5-aab2-0050044b1af1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
formatlist:OCC-StdLite|BinLOcaf|XmlLOcaf
|
|
2
|
+
!
|
|
3
|
+
!
|
|
4
|
+
! Lite attributes
|
|
5
|
+
!
|
|
6
|
+
OCC-StdLite.Description: Lite Document Version 1.0
|
|
7
|
+
OCC-StdLite.FileExtension: stdl
|
|
8
|
+
OCC-StdLite.RetrievalPlugin: bd696001-5b34-11d1-b5ba-00a0c9064368
|
|
9
|
+
!
|
|
10
|
+
! BinLOcaf format
|
|
11
|
+
!
|
|
12
|
+
BinLOcaf.Description: Lite Bin Ocaf Document Version 1.0
|
|
13
|
+
BinLOcaf.FileExtension: cbfl
|
|
14
|
+
BinLOcaf.StoragePlugin: 13a56835-8269-11d5-aab2-0050044b1af1
|
|
15
|
+
BinLOcaf.RetrievalPlugin: 13a56836-8269-11d5-aab2-0050044b1af1
|
|
16
|
+
!
|
|
17
|
+
! XmlLOcaf format
|
|
18
|
+
!
|
|
19
|
+
XmlLOcaf.Description: Lite Xml Document Version 1.0
|
|
20
|
+
XmlLOcaf.FileExtension: xmll
|
|
21
|
+
XmlLOcaf.StoragePlugin: 13a56820-8269-11d5-aab2-0050044b1af1
|
|
22
|
+
XmlLOcaf.RetrievalPlugin: 13a56822-8269-11d5-aab2-0050044b1af1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
formatlist: TObjXml|TObjBin
|
|
2
|
+
!
|
|
3
|
+
! Default format
|
|
4
|
+
xml.FileFormat: TObjXml
|
|
5
|
+
cbf.FileFormat: TObjBin
|
|
6
|
+
!
|
|
7
|
+
! TObjXml format
|
|
8
|
+
TObjXml.Description: TObj XML Document Version 1.0
|
|
9
|
+
TObjXml.FileExtension: xml
|
|
10
|
+
TObjXml.StoragePlugin: f78ff4a0-a779-11d5-aab4-0050044b1af1
|
|
11
|
+
TObjXml.RetrievalPlugin: f78ff4a1-a779-11d5-aab4-0050044b1af1
|
|
12
|
+
!
|
|
13
|
+
! TObjBin format
|
|
14
|
+
TObjBin.Description: TObj BIN Document Version 1.0
|
|
15
|
+
TObjBin.FileExtension: cbf
|
|
16
|
+
TObjBin.StoragePlugin: f78ff4a2-a779-11d5-aab4-0050044b1af1
|
|
17
|
+
TObjBin.RetrievalPlugin: f78ff4a3-a779-11d5-aab4-0050044b1af1
|