Skip to content

Commit 299cfec

Browse files
committed
Fix docker problem
Fix pipeline config problem
1 parent a80f8ea commit 299cfec

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ ELSEIF(ANDROID)
156156
SET(THIRDPARTY_ROOT ${VERSE_3RDPARTY_PATH}/android)
157157
ELSEIF(APPLE)
158158
SET(THIRDPARTY_ROOT ${VERSE_3RDPARTY_PATH}/apple)
159-
ELSEIF(NOT CMAKE_CL_64)
160-
SET(THIRDPARTY_ROOT ${VERSE_3RDPARTY_PATH}/x86)
161159
ENDIF()
162160

163161
FIND_PATH(BULLET_INCLUDE_DIR btBulletDynamicsCommon.h
@@ -168,7 +166,7 @@ FIND_PATH(BULLET_INCLUDE_DIR btBulletDynamicsCommon.h
168166
NO_CMAKE_FIND_ROOT_PATH
169167
)
170168

171-
FIND_PATH(BULLET_LIB_DIR libBulletDynamics.so BulletDynamics.lib
169+
FIND_PATH(BULLET_LIB_DIR libBulletDynamics.so libBulletDynamics.a BulletDynamics.lib
172170
PATHS ${THIRDPARTY_ROOT}/lib
173171
$ENV{BULLET_ROOT}/lib $ENV{BULLET_ROOT}/${FIND_LIB_POSTFIX}
174172
/usr/lib /usr/${FIND_LIB_POSTFIX} /usr/lib/x86_64-linux-gnu
@@ -183,7 +181,7 @@ FIND_PATH(DRACO_INCLUDE_DIR draco/draco_features.h
183181
NO_CMAKE_FIND_ROOT_PATH
184182
)
185183

186-
FIND_PATH(DRACO_LIB_DIR libdraco.so libdraco.a draco.lib
184+
FIND_PATH(DRACO_LIB_DIR libdraco.so draco.lib
187185
PATHS ${THIRDPARTY_ROOT}/lib
188186
/usr/lib /usr/${FIND_LIB_POSTFIX}
189187
/usr/local/lib /usr/local/${FIND_LIB_POSTFIX}
@@ -192,12 +190,12 @@ FIND_PATH(DRACO_LIB_DIR libdraco.so libdraco.a draco.lib
192190

193191
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
194192
PATHS ${THIRDPARTY_ROOT}/include/SDL
195-
/usr/include
196-
/usr/local/include
193+
${THIRDPARTY_ROOT}/include/SDL2
194+
/usr/include /usr/local/include
197195
NO_CMAKE_FIND_ROOT_PATH
198196
)
199197

200-
FIND_PATH(SDL2_LIB_DIR libSDL2.so SDL2.lib
198+
FIND_PATH(SDL2_LIB_DIR libSDL2.so libSDL2.a SDL2.lib
201199
PATHS ${THIRDPARTY_ROOT}/lib
202200
/usr/lib /usr/${FIND_LIB_POSTFIX} /usr/lib/x86_64-linux-gnu
203201
/usr/local/lib /usr/local/${FIND_LIB_POSTFIX}

applications/viewer/viewer_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ int main(int argc, char** argv)
184184
viewer.setUpViewOnSingleScreen(0); // Always call viewer.setUp*() before setupStandardPipeline()!
185185

186186
// Setup the pipeline
187-
#if true
187+
#if false
188188
params.enablePostEffects = true; params.enableAO = true;
189189
setupStandardPipeline(pipeline.get(), &viewer, params);
190190
#else

assets/shaders/standard_pipeline.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@
684684
{
685685
"name": "BrightnessExtracting", "type": "deferred",
686686
"inputs": [ { "stage": "ShadowCombining", "name": "CombinedBuffer", "sampler_name": "ColorBuffer", "unit": 0 } ],
687-
"outputs": [ { "name": "BrightnessBuffer0", "format": "RGB_INT8" } ],
687+
"outputs": [ { "name": "BrightnessBuffer0", "format": "R_INT8" } ],
688688
"uniforms": [ { "name": "BrightnessThreshold", "uniform_type": "float", "value": "0.7" } ],
689689
"shaders": [
690690
{ "name": "QuadVS" },
@@ -712,35 +712,35 @@
712712
{
713713
"name": "BrightnessDownsampling1", "type": "deferred", "scale": 0.5,
714714
"inputs": [ { "stage": "BrightnessExtracting", "name": "BrightnessBuffer0", "sampler_name": "ColorBuffer", "unit": 0 } ],
715-
"outputs": [ { "name": "BrightnessBuffer1", "format": "RGB_INT8" } ],
715+
"outputs": [ { "name": "BrightnessBuffer1", "format": "R_INT8" } ],
716716
"uniforms": [ { "name": "InvBufferResolution", "uniform_type": "vec2", "value": "0.000260417 0.00185185" } ],
717717
"shaders": [ { "name": "QuadVS" }, { "name": "BrightnessDownsampleFS" } ]
718718
},
719719
{
720720
"name": "BrightnessDownsampling2", "type": "deferred", "scale": 0.125,
721721
"inputs": [ { "stage": "BrightnessDownsampling1", "name": "BrightnessBuffer1", "sampler_name": "ColorBuffer", "unit": 0 } ],
722-
"outputs": [ { "name": "BrightnessBuffer2", "format": "RGB_INT8" } ],
722+
"outputs": [ { "name": "BrightnessBuffer2", "format": "R_INT8" } ],
723723
"uniforms": [ { "name": "InvBufferResolution", "uniform_type": "vec2", "value": "0.0000651 0.00740741" } ],
724724
"shaders": [ { "name": "QuadVS" }, { "name": "BrightnessDownsampleFS" } ]
725725
},
726726
{
727727
"name": "BrightnessDownsampling3", "type": "deferred", "scale": 0.03125,
728728
"inputs": [ { "stage": "BrightnessDownsampling2", "name": "BrightnessBuffer2", "sampler_name": "ColorBuffer", "unit": 0 } ],
729-
"outputs": [ { "name": "BrightnessBuffer3", "format": "RGB_INT8" } ],
729+
"outputs": [ { "name": "BrightnessBuffer3", "format": "R_INT8" } ],
730730
"uniforms": [ { "name": "InvBufferResolution", "uniform_type": "vec2", "value": "0.0000162 0.0296296" } ],
731731
"shaders": [ { "name": "QuadVS" }, { "name": "BrightnessDownsampleFS" } ]
732732
},
733733
{
734734
"name": "BrightnessDownsampling4", "type": "deferred", "scale": 0.0078125,
735735
"inputs": [ { "stage": "BrightnessDownsampling3", "name": "BrightnessBuffer3", "sampler_name": "ColorBuffer", "unit": 0 } ],
736-
"outputs": [ { "name": "BrightnessBuffer4", "format": "RGB_INT8" } ],
736+
"outputs": [ { "name": "BrightnessBuffer4", "format": "R_INT8" } ],
737737
"uniforms": [ { "name": "InvBufferResolution", "uniform_type": "vec2", "value": "0.00000407 0.118519" } ],
738738
"shaders": [ { "name": "QuadVS" }, { "name": "BrightnessDownsampleFS" } ]
739739
},
740740
{
741741
"name": "BrightnessDownsampling5", "type": "deferred", "scale": 0.001953125,
742742
"inputs": [ { "stage": "BrightnessDownsampling4", "name": "BrightnessBuffer4", "sampler_name": "ColorBuffer", "unit": 0 } ],
743-
"outputs": [ { "name": "BrightnessBuffer5", "format": "RGB_INT8" } ],
743+
"outputs": [ { "name": "BrightnessBuffer5", "format": "R_INT8" } ],
744744
"uniforms": [ { "name": "InvBufferResolution", "uniform_type": "vec2", "value": "0.000001017 0.474074" } ],
745745
"shaders": [ { "name": "QuadVS" }, { "name": "BrightnessDownsampleFS" } ]
746746
},
@@ -789,11 +789,11 @@
789789
" vec4 color5 = blur5(BrightnessBuffer4, uv0);",
790790
" vec4 color6 = blur5(BrightnessBuffer5, uv0);",
791791

792-
" vec3 color = mix(color1.rgb, color2.rgb, color2.a);",
793-
" color = mix(color.rgb, color3.rgb, color3.a);",
794-
" color = mix(color.rgb, color4.rgb, color4.a);",
795-
" color = mix(color.rgb, color5.rgb, color5.a);",
796-
" color = mix(color.rgb, color6.rgb, color6.a);",
792+
" vec3 color = mix(color1.rgb, color2.rgb, color2.r);",
793+
" color = mix(color.rgb, color3.rgb, color3.r);",
794+
" color = mix(color.rgb, color4.rgb, color4.r);",
795+
" color = mix(color.rgb, color5.rgb, color5.r);",
796+
" color = mix(color.rgb, color6.rgb, color6.r);",
797797
" fragData = vec4(color, 1.0);",
798798
" VERSE_FS_FINAL(fragData);",
799799
"}"

assets/shaders/standard_pipeline_wasm.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,11 @@
774774
" vec4 color5 = blur5(BrightnessBuffer4, uv0);",
775775
" vec4 color6 = blur5(BrightnessBuffer5, uv0);",
776776

777-
" vec3 color = mix(color1.rgb, color2.rgb, color2.a);",
778-
" color = mix(color.rgb, color3.rgb, color3.a);",
779-
" color = mix(color.rgb, color4.rgb, color4.a);",
780-
" color = mix(color.rgb, color5.rgb, color5.a);",
781-
" color = mix(color.rgb, color6.rgb, color6.a);",
777+
" vec3 color = mix(color1.rgb, color2.rgb, color2.r);",
778+
" color = mix(color.rgb, color3.rgb, color3.r);",
779+
" color = mix(color.rgb, color4.rgb, color4.r);",
780+
" color = mix(color.rgb, color5.rgb, color5.r);",
781+
" color = mix(color.rgb, color6.rgb, color6.r);",
782782
" fragData = vec4(color, 1.0);",
783783
" VERSE_FS_FINAL(fragData);",
784784
"}"

dockerfiles/linux/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# !IMPORTANT!
2+
# Use 'docker build -t osgverse:linux -m 2GB <dockerfile_path>' to build
23
# * Pass -m 2GB (or more) when building the image.
34
# * Configure Docker to use disks larger than the default 20 GB.
45

@@ -33,6 +34,8 @@ RUN cd /home/osgv/Source; \
3334
git clone --branch release-2.28.4 https://github.com/libsdl-org/SDL.git SDL
3435
RUN cd /home/osgv/Source; \
3536
git clone --branch OpenSceneGraph-3.6.5 https://github.com/openscenegraph/OpenSceneGraph.git OpenSceneGraph
37+
RUN cd /home/osgv/Release; \
38+
git clone https://github.com/openscenegraph/OpenSceneGraph-Data.git data
3639
RUN cd /home/osgv; \
3740
git clone https://github.com/xarray/osgverse.git osgverse
3841

@@ -44,7 +47,7 @@ RUN mkdir -p /home/osgv/Builds/bullet3; cd /home/osgv/Builds/bullet3; \
4447
# cmake -DCMAKE_INSTALL_PREFIX=/home/osgv/Dependencies/x64 -DCMAKE_BUILD_TYPE=Release ../../Source/ZLMediaKit; \
4548
# make; make install
4649
RUN mkdir -p /home/osgv/Builds/draco; cd /home/osgv/Builds/draco; \
47-
cmake -DCMAKE_INSTALL_PREFIX=/home/osgv/Dependencies/x64 -DCMAKE_BUILD_TYPE=Release ../../Source/draco; \
50+
cmake -DCMAKE_INSTALL_PREFIX=/home/osgv/Dependencies/x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ../../Source/draco; \
4851
make; make install
4952
RUN mkdir -p /home/osgv/Builds/SDL; cd /home/osgv/Builds/SDL; \
5053
cmake -DCMAKE_INSTALL_PREFIX=/home/osgv/Dependencies/x64 -DCMAKE_BUILD_TYPE=Release ../../Source/SDL; \
@@ -65,6 +68,9 @@ RUN mkdir -p /home/osgv/Builds/osgverse; cd /home/osgv/Builds/osgverse; \
6568
RUN bash -c 'echo -e "%manavr ALL=(ALL) NOPASSWD: ALL\n" > /etc/sudoers.d/01_manavr'
6669
RUN addgroup manavr && useradd -u 1000 -m osgv && usermod -aG manavr osgv
6770

71+
# Use 'docker run -it osgverse:linux' to start the terminal
6872
USER osgv
6973
WORKDIR /home/osgv
74+
ENV OSG_FILE_PATH=/home/osgv/Release/data
75+
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/osgv/Release/lib
7076
CMD ["/bin/bash"]

pipeline/SymbolManager.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,7 @@ void SymbolManager::initialize(osg::Group* group)
304304
geode2->setCullingActive(false);
305305
geode2->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
306306
geode2->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON);
307-
308307
group->addChild(geode1); group->addChild(geode2);
309-
group->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
310308
}
311309

312310
void SymbolManager::update(osg::Group* group, unsigned int frameNo)

0 commit comments

Comments
 (0)