mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-26 14:58:51 -06:00
Fix the image flipping on RenderableModelProjection
This commit is contained in:
@@ -403,6 +403,8 @@ void RenderableModelProjection::imageProjectGPU() {
|
||||
_fboProgramObject->setUniform("_scaling", _camScaling);
|
||||
_fboProgramObject->setUniform("boresight", _boresight);
|
||||
|
||||
_geometry->setUniforms(*_fboProgramObject);
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _ibo);
|
||||
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(_geometryIndeces.size()), GL_UNSIGNED_INT, 0);
|
||||
|
||||
@@ -57,7 +57,7 @@ void main() {
|
||||
projected.y /= projected.w;
|
||||
//invert gl coordinates
|
||||
projected.x = 1 - projected.x;
|
||||
projected.y = 1 - projected.y;
|
||||
// projected.y = 1 - projected.y;
|
||||
|
||||
if((inRange(projected.x, 0, 1) && inRange(projected.y, 0, 1)) && (dot(n, boresight) < 0)) {
|
||||
color = texture(projectTexture, projected.xy);
|
||||
|
||||
Reference in New Issue
Block a user