mirror of
https://github.com/overte-org/overte.git
synced 2025-08-03 22:43:15 +02:00
smoother line drawing over network
This commit is contained in:
parent
dab31e5e42
commit
f54d1cf0f6
2 changed files with 5 additions and 13 deletions
|
@ -19,13 +19,8 @@ varying vec4 interpolatedNormal;
|
|||
|
||||
vec3 newNormal = normalize(interpolatedNormal.xyz);
|
||||
|
||||
int frontCondition = 1 -int(gl_FrontFacing) * 2;
|
||||
//if (!gl_FrontFacing) {
|
||||
// newNormal = -newNormal;
|
||||
//}
|
||||
|
||||
|
||||
void main(void) {
|
||||
int frontCondition = 1 -int(gl_FrontFacing) * 2;
|
||||
vec3 color = vec3(0.9, 0.2, 0.9);
|
||||
packDeferredFragment(
|
||||
newNormal * frontCondition,
|
||||
|
|
|
@ -62,7 +62,6 @@ EntityItemProperties PolyLineEntityItem::getProperties() const {
|
|||
|
||||
properties._glowLevel = getGlowLevel();
|
||||
properties._glowLevelChanged = false;
|
||||
_quadReadWriteLock.unlock();
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
@ -89,8 +88,6 @@ bool PolyLineEntityItem::setProperties(const EntityItemProperties& properties) {
|
|||
}
|
||||
setLastEdited(properties._lastEdited);
|
||||
}
|
||||
|
||||
_quadReadWriteLock.unlock();
|
||||
return somethingChanged;
|
||||
|
||||
}
|
||||
|
@ -116,21 +113,21 @@ bool PolyLineEntityItem::setStrokeWidths(const QVector<float>& strokeWidths ) {
|
|||
}
|
||||
|
||||
bool PolyLineEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
||||
|
||||
_normals = normals;
|
||||
if( _normals.size() != _points.size() || _normals.size() != _strokeWidths.size()) {
|
||||
qDebug() << "normals dont equal points!";
|
||||
if( _normals.size() != _points.size()) {
|
||||
// qDebug() << "normals dont equal points!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_points.size () < 2) {
|
||||
qDebug() << "points size is less than 2!";
|
||||
// qDebug() << "points size is less than 2!";
|
||||
return false;
|
||||
}
|
||||
|
||||
// int minArraySize = glm::min(_normals.size(), _points.size())
|
||||
_vertices.clear();
|
||||
glm::vec3 v1, v2, tangent, binormal, point;
|
||||
|
||||
for (int i = 0; i < _points.size()-1; i++) {
|
||||
float width = _strokeWidths.at(i);
|
||||
point = _points.at(i);
|
||||
|
|
Loading…
Reference in a new issue