Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2036,12 +2036,9 @@ void HeightfieldRenderer::render(bool cursor) { · 2035 unmodified lines | ||
| 2036 | 2036 | glColor4f(1.0f, 1.0f, 1.0f, 1.0f); |
| 2037 | 2037 | |
| 2038 | 2038 | DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().bind(); |
| 2039 | − float sDistance = 2.0f / (innerWidth - 1); | |
| 2040 | − float tDistance = 2.0f / (innerHeight - 1); | |
| 2041 | − float distanceProduct = -sDistance * tDistance; | |
| 2042 | 2039 | DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue( |
| 2043 | 2040 | DefaultMetavoxelRendererImplementation::getBaseHeightScaleLocation(), 1.0f / width, 1.0f / height, |
| 2044 | − sDistance / distanceProduct, tDistance / distanceProduct); | |
| 2041 | + (innerWidth - 1) / -2.0f, (innerHeight - 1) / -2.0f); | |
| 2045 | 2042 | DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue( |
| 2046 | 2043 | DefaultMetavoxelRendererImplementation::getBaseColorScaleLocation(), (float)width / innerWidth, |
| 2047 | 2044 | (float)height / innerHeight); |