eeew warnings

master
hYdos 2020-02-21 20:53:23 +10:00
parent adab339efc
commit 12755ea903
4 changed files with 3 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import org.joml.Vector3f;
import io.github.hydos.ginger.engine.math.Maths;
import io.github.hydos.ginger.engine.render.models.RawModel;
@SuppressWarnings("unused")
public class NormalMappedObjLoader
{
public static RawModel loadOBJ(String objFileName)

View File

@ -123,7 +123,7 @@ public class NormalMappingShader extends ShaderProgram
{
Vector3f position = light.getPosition();
Vector4f eyeSpacePos = new Vector4f(position.x, position.y, position.z, 1f);
// eyeSpacePos no transform method :p
viewMatrix.transform(eyeSpacePos, eyeSpacePos);
return Maths.Vec4ToVec3(eyeSpacePos);
}

View File

@ -186,7 +186,7 @@ public class ShadowBox
{
Vector3f point = new Vector3f().add(startPoint, new Vector3f(direction.x * width, direction.y * width, direction.z * width));
Vector4f point4f = new Vector4f(point.x, point.y, point.z, 1f);
//TODO: may be lighting bug due to .translate missing from vector4f
lightViewMatrix.transform(point4f);
return point4f;
}

View File

@ -10,8 +10,6 @@ import org.lwjgl.opengl.GL32;
import com.github.halotroop.litecraft.LiteCraftMain;
import io.github.hydos.ginger.engine.io.Window;
/** The frame buffer for the shadow pass. This class sets up the depth texture
* which can be rendered to during the shadow render pass, producing a shadow
* map. */