Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
197ed498
Commit
197ed498
authored
Apr 27, 2017
by
Jan Möbius
Browse files
Revert "Merge branch 'gl_clipdistance_passthrough' into 'master'"
This reverts merge request
!4
parent
4eee0178
Changes
3
Hide whitespace changes
Inline
Side-by-side
libs_required/ACG/GL/ShaderGenerator.cc
View file @
197ed498
...
...
@@ -1615,20 +1615,6 @@ void ShaderProgGenerator::buildGeometryShader()
mainCode
.
push_back
(
"gl_Position = gl_in[inIdx].gl_Position;"
);
mainCode
.
push_back
(
"gl_PrimitiveID = gl_PrimitiveIDIn;"
);
// built-in gl_ClipDistance[]
static
int
maxClipDistances
=
-
1
;
if
(
maxClipDistances
<
0
)
{
glGetIntegerv
(
GL_MAX_CLIP_DISTANCES
,
&
maxClipDistances
);
maxClipDistances
=
std
::
min
(
maxClipDistances
,
32
);
// clamp to 32 bits
}
for
(
int
i
=
0
;
i
<
maxClipDistances
;
++
i
)
{
if
(
desc_
.
clipDistanceMask
&
(
1
<<
i
))
mainCode
.
push_back
(
QString
(
"gl_ClipDistance[%1] = gl_in[inIdx].gl_ClipDistance[%1];"
).
arg
(
i
));
}
// custom IO
for
(
int
i
=
0
;
i
<
geometry_
->
getNumInputs
();
++
i
)
{
...
...
@@ -2734,7 +2720,7 @@ QString ShaderGenDesc::toString() const
resStrm
<<
"version: "
<<
version
;
resStrm
<<
"
\n
shaderDesc.numLights: "
<<
numLights
;
resStrm
<<
"shaderDesc.numLights: "
<<
numLights
;
if
(
numLights
)
{
...
...
libs_required/ACG/GL/ShaderGenerator.hh
View file @
197ed498
...
...
@@ -102,7 +102,6 @@ public:
fragmentTemplateFile
(
""
),
normalizeTexColors
(
true
),
colorMaterialMode
(
GL_AMBIENT_AND_DIFFUSE
),
clipDistanceMask
(
0
),
textureTypes_
(),
texGenDim
(
0
),
texGenMode
(
GL_EYE_LINEAR
),
...
...
@@ -179,11 +178,6 @@ public:
// default: GL_AMBIENT_AND_DIFFUSE
GLenum
colorMaterialMode
;
// Bitmask of enabled hardware clip planes.
// Bit i represents the i'th clip plane starting at the least significant bit.
// This is needed to pass the gl_ClipDistance[] array through the geometry shader stage.
uint
clipDistanceMask
;
struct
TextureType
{
GLenum
type
;
...
...
@@ -285,13 +279,6 @@ public:
return
false
;
}
if
(
!
geometryTemplateFile
.
isEmpty
())
{
// clip distance mask only affects the geometry shader
if
(
clipDistanceMask
!=
_rhs
.
clipDistanceMask
)
return
false
;
}
if
(
fragmentTemplateFile
!=
_rhs
.
fragmentTemplateFile
)
return
false
;
...
...
libs_required/ACG/Scenegraph/ClippingNode.cc
View file @
197ed498
...
...
@@ -248,8 +248,6 @@ void ClippingNode::ClippingObjectModifier::apply(RenderObject* _obj)
// set shader modifier
_obj
->
shaderDesc
.
shaderMods
.
push_back
(
shaderModID
);
// enable clip distance pass through in geometry shader
_obj
->
shaderDesc
.
clipDistanceMask
=
_obj
->
clipDistanceMask
;
}
//=============================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment