mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-04 17:24:59 +01:00
Chipping away at light
This commit is contained in:
parent
1d4bb972b9
commit
fe62302d25
2 changed files with 2 additions and 3 deletions
|
@ -46,8 +46,6 @@ public class MaterialGroupImpl<P extends WorldProgram> implements MaterialGroup
|
|||
public void render(Matrix4f viewProjection, double camX, double camY, double camZ) {
|
||||
for (MaterialRenderer<P> renderer : renderers) {
|
||||
renderer.render(viewProjection, camX, camY, camZ);
|
||||
|
||||
GlError.pollAndThrow(renderer.material.spec.name::toString);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ public class GPULightVolume extends LightVolume {
|
|||
private final GlTexture glTexture;
|
||||
|
||||
private final RGPixelFormat pixelFormat;
|
||||
private final GlTextureUnit textureUnit = GlTextureUnit.T4;
|
||||
protected boolean bufferDirty;
|
||||
|
||||
public GPULightVolume(ImmutableBox sampleVolume) {
|
||||
|
@ -70,7 +71,7 @@ public class GPULightVolume extends LightVolume {
|
|||
// just in case something goes wrong, or we accidentally call this before this volume is properly disposed of.
|
||||
if (lightData == null) return;
|
||||
|
||||
GlTextureUnit.T4.makeActive();
|
||||
textureUnit.makeActive();
|
||||
glTexture.bind();
|
||||
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
|
Loading…
Reference in a new issue