Skip to content

Commit

Permalink
DEV: Removed GLSL_DEFAULT_PRECISION_FLOAT references from shaders, un…
Browse files Browse the repository at this point in the history
…used. Removed #version string from GradientShader.cpp and Picker.cpp shaders. Intended to allow code to compile against master osgEarth. Review: 27255

--HG--
branch : stable
  • Loading branch information
emminizer committed Mar 15, 2022
1 parent 10b3173 commit f78bf69
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion SDK/simUtil/TerrainToggleEffect.frag.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#version $GLSL_VERSION_STR
$GLSL_DEFAULT_PRECISION_FLOAT

#pragma vp_entryPoint simutil_terraintoggle_frag
#pragma vp_location fragment_coloring
Expand Down
1 change: 0 additions & 1 deletion SDK/simUtil/TerrainToggleEffect.vert.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#version $GLSL_VERSION_STR
$GLSL_DEFAULT_PRECISION_FLOAT

#pragma vp_entryPoint simutil_terraintoggle_vert
#pragma vp_location vertex_view
Expand Down
1 change: 0 additions & 1 deletion SDK/simUtil/VelocityParticleLayer.part.frag.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#version $GLSL_VERSION_STR
$GLSL_DEFAULT_PRECISION_FLOAT

#pragma vp_entryPoint simutil_vpl_frag
#pragma vp_location fragment_coloring
Expand Down
1 change: 0 additions & 1 deletion SDK/simUtil/VelocityParticleLayer.part.vert.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#version $GLSL_VERSION_STR
$GLSL_DEFAULT_PRECISION_FLOAT

#pragma vp_entryPoint simutil_vpl_rtt_vertex
#pragma vp_location vertex_model
Expand Down
1 change: 0 additions & 1 deletion SDK/simVis/DisableDepthOnAlpha.frag.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#version $GLSL_VERSION_STR
$GLSL_DEFAULT_PRECISION_FLOAT

#pragma import_defines(SV_USE_DISABLE_DEPTH_ON_ALPHA)
#pragma import_defines(SV_USE_LOG_DEPTH_BUFFER)
Expand Down
2 changes: 0 additions & 2 deletions SDK/simVis/GradientShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ std::string GradientShader::buildShader() const
{
std::stringstream buf;

buf << "#version " GLSL_VERSION_STR << "\n";
buf << GLSL_DEFAULT_PRECISION_FLOAT << "\n";
buf << "vec4 " << functionName_ << "(in float value)\n";
buf << "{\n";

Expand Down
1 change: 0 additions & 1 deletion SDK/simVis/Picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ void RTTPicker::setUpViewWithDebugTexture(osgViewer::View* intoView, simVis::Vie
stateSet->setAttributeAndModes(new osg::BlendFunc(GL_ONE, GL_ZERO), 1);

const char* fs =
"#version " GLSL_VERSION_STR "\n"
"void swap(inout vec4 c) { c.rgba = c==vec4(0)? vec4(1) : vec4(vec3((c.r+c.g+c.b+c.a)/4.0),1); }\n";
osgEarth::Registry::shaderGenerator().run(geode);
osgEarth::VirtualProgram::getOrCreate(geode->getOrCreateStateSet())->setFunction("swap", fs, osgEarth::ShaderComp::LOCATION_FRAGMENT_COLORING);
Expand Down

0 comments on commit f78bf69

Please sign in to comment.