mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:29:54 +02:00
Normal fix.
This commit is contained in:
parent
a563c66ab8
commit
4153e32f57
2 changed files with 8 additions and 2 deletions
|
@ -2312,7 +2312,7 @@ void HeightfieldNodeRenderer::render(const HeightfieldNodePointer& node, const g
|
||||||
baseBatch.heightScale = glm::vec4(1.0f / width, 1.0f / height, (innerWidth - 1) / -2.0f, (innerHeight - 1) / -2.0f);
|
baseBatch.heightScale = glm::vec4(1.0f / width, 1.0f / height, (innerWidth - 1) / -2.0f, (innerHeight - 1) / -2.0f);
|
||||||
baseBatch.colorTextureID = _colorTextureID;
|
baseBatch.colorTextureID = _colorTextureID;
|
||||||
baseBatch.colorScale = glm::vec2((float)width / innerWidth, (float)height / innerHeight);
|
baseBatch.colorScale = glm::vec2((float)width / innerWidth, (float)height / innerHeight);
|
||||||
Application::getInstance()->getMetavoxels()->addHeightfieldBaseBatch(baseBatch);
|
Application::getInstance()->getMetavoxels()->addHeightfieldBaseBatch(baseBatch);
|
||||||
|
|
||||||
if (!_networkTextures.isEmpty()) {
|
if (!_networkTextures.isEmpty()) {
|
||||||
HeightfieldSplatBatch splatBatch;
|
HeightfieldSplatBatch splatBatch;
|
||||||
|
|
|
@ -2249,8 +2249,14 @@ HeightfieldNode* HeightfieldNode::setMaterial(const glm::vec3& translation, cons
|
||||||
entryDest->material = index;
|
entryDest->material = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
entryDest->hermiteY[0] = glm::fract(voxelHeight) * numeric_limits<quint8>::max();
|
quint16 left = heightLineDest[-1];
|
||||||
|
quint16 right = heightLineDest[1];
|
||||||
|
quint16 up = heightLineDest[heightWidth];
|
||||||
|
quint16 down = heightLineDest[-heightWidth];
|
||||||
|
|
||||||
|
entryDest->setHermiteY(glm::normalize(glm::vec3((left == 0 || right == 0) ? 0.0f :
|
||||||
|
(left - right), 2.0f / voxelScale, (up == 0 || down == 0) ? 0.0f :
|
||||||
|
(down - up))), glm::fract(voxelHeight));
|
||||||
}
|
}
|
||||||
if (!stackDest->isEmpty()) {
|
if (!stackDest->isEmpty()) {
|
||||||
int oldBottom = stackDest->getPosition();
|
int oldBottom = stackDest->getPosition();
|
||||||
|
|
Loading…
Reference in a new issue