diff options
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/NeoRenderer.java')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/NeoRenderer.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java index 6a1c1e9..8d15eed 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java +++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java @@ -332,6 +332,8 @@ public class NeoRenderer { int u_projInv = glGetUniformLocation(shaderProgram, "projInv"); int u_fogColor = glGetUniformLocation(shaderProgram, "fogColor"); int u_fogStartEnd = glGetUniformLocation(shaderProgram, "fogStartEnd"); + int u_fogMode = glGetUniformLocation(shaderProgram, "fogMode"); + int u_fogDensity = glGetUniformLocation(shaderProgram, "fogDensity"); glUniformMatrix4(u_modelView, false, modelView); glUniformMatrix4(u_proj, false, projBuf); @@ -339,6 +341,8 @@ public class NeoRenderer { glUniform4f(u_viewport, viewportBuf.get(0),viewportBuf.get(1),viewportBuf.get(2),viewportBuf.get(3)); glUniform4(u_fogColor, fogColorBuf); glUniform2(u_fogStartEnd, fogStartEnd); + glUniform1i(u_fogMode, glGetInteger(GL_FOG_MODE)); + glUniform1f(u_fogDensity, glGetFloat(GL_FOG_DENSITY)); glUniform3f(u_playerPos, (float)eyePosX, (float)eyePosY, (float)eyePosZ); |