voxelImprovements #5
@ -4,6 +4,7 @@ import java.lang.management.ManagementFactory;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
import org.joml.Matrix4d;
 | 
			
		||||
import org.joml.Matrix4f;
 | 
			
		||||
import org.joml.Vector3f;
 | 
			
		||||
 | 
			
		||||
@ -257,7 +258,7 @@ public class Globals {
 | 
			
		||||
    
 | 
			
		||||
    //matrices for drawing models
 | 
			
		||||
    public static Matrix4f viewMatrix = new Matrix4f();
 | 
			
		||||
    public static Matrix4f projectionMatrix;
 | 
			
		||||
    public static Matrix4d projectionMatrix;
 | 
			
		||||
    public static Matrix4f lightDepthMatrix = new Matrix4f();
 | 
			
		||||
    
 | 
			
		||||
    //locations for shadow map specific variables
 | 
			
		||||
 | 
			
		||||
@ -245,7 +245,7 @@ public class ClientLoading {
 | 
			
		||||
        EntityCreationUtils.makeEntityDrawable(skybox, "Models/environment/skyboxSphere.fbx");
 | 
			
		||||
        DrawableUtils.disableCulling(skybox);
 | 
			
		||||
        EntityUtils.getRotation(skybox).rotateX((float)(-Math.PI/2.0f));
 | 
			
		||||
        EntityUtils.getScale(skybox).mul(200000.0f);
 | 
			
		||||
        EntityUtils.getScale(skybox).mul(600000.0f);
 | 
			
		||||
        Globals.assetManager.queueOverrideMeshShader("Models/environment/skyboxSphere.fbx", "Sphere", "Shaders/entities/skysphere/skysphere.vs", "Shaders/entities/skysphere/skysphere.fs");
 | 
			
		||||
 | 
			
		||||
        //cloud ring pseudo skybox
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
package electrosphere.renderer;
 | 
			
		||||
 | 
			
		||||
import org.joml.FrustumIntersection;
 | 
			
		||||
import org.joml.Matrix4d;
 | 
			
		||||
import org.joml.Matrix4f;
 | 
			
		||||
 | 
			
		||||
import electrosphere.renderer.actor.instance.InstanceData;
 | 
			
		||||
@ -166,7 +167,7 @@ public class RenderPipelineState {
 | 
			
		||||
     * @param projectionMatrix the projection matrix
 | 
			
		||||
     * @param viewMatrix the view matrix
 | 
			
		||||
     */
 | 
			
		||||
    public void updateFrustumIntersection(Matrix4f projectionMatrix, Matrix4f viewMatrix){
 | 
			
		||||
    public void updateFrustumIntersection(Matrix4d projectionMatrix, Matrix4f viewMatrix){
 | 
			
		||||
        Matrix4f projectionViewMatrix = new Matrix4f();
 | 
			
		||||
        projectionViewMatrix.set(projectionMatrix);
 | 
			
		||||
        projectionViewMatrix.mul(viewMatrix);
 | 
			
		||||
 | 
			
		||||
@ -453,7 +453,7 @@ public class RenderingEngine {
 | 
			
		||||
        //
 | 
			
		||||
        // Projection and View matrix creation
 | 
			
		||||
        //
 | 
			
		||||
        Globals.projectionMatrix = new Matrix4f();
 | 
			
		||||
        Globals.projectionMatrix = new Matrix4d();
 | 
			
		||||
        Globals.viewMatrix = new Matrix4f();
 | 
			
		||||
        verticalFOV = (float)(Globals.verticalFOV * Math.PI /180.0f);
 | 
			
		||||
        //set local aspect ratio and global aspect ratio at the same time
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user