bug fixes, enforcing best practices
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
7a2bdf7745
commit
8dcff7efe0
@ -383,6 +383,8 @@ Transvoxel implementation
|
|||||||
Transvoxel implementation
|
Transvoxel implementation
|
||||||
- Scaling LODed chunks by lod level
|
- Scaling LODed chunks by lod level
|
||||||
|
|
||||||
|
Fix items falling below the ground
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
|
||||||
@ -399,7 +401,6 @@ Audio FX for everything
|
|||||||
|
|
||||||
= Coding =
|
= Coding =
|
||||||
Sour spot, sweet spot for damage hitboxes and hurtboxes
|
Sour spot, sweet spot for damage hitboxes and hurtboxes
|
||||||
Fix items falling below the ground
|
|
||||||
Sub menu on title screen that allows changing control mappings
|
Sub menu on title screen that allows changing control mappings
|
||||||
Redo hitboxes to have capsules and also chaining between frames (but not between swinging the camera around)
|
Redo hitboxes to have capsules and also chaining between frames (but not between swinging the camera around)
|
||||||
- Introduce block hitbox (blockbox) type
|
- Introduce block hitbox (blockbox) type
|
||||||
|
|||||||
@ -188,43 +188,6 @@ public class ClientLoading {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test LODed chunk
|
|
||||||
*/
|
|
||||||
float[][][] isoValues = new float[ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE];
|
|
||||||
int[][][] atlasValues = new int[ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE];
|
|
||||||
float[][] edgeIsoValues = new float[ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE + ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE + ServerTerrainChunk.CHUNK_DIMENSION];
|
|
||||||
int[][] edgeAtlasValues = new int[ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE + ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE + ServerTerrainChunk.CHUNK_DIMENSION];
|
|
||||||
for(int x = 0; x < ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE; x++){
|
|
||||||
for(int y = 0; y < ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE; y++){
|
|
||||||
for(int z = 0; z < ServerTerrainChunk.CHUNK_DATA_GENERATOR_SIZE; z++){
|
|
||||||
if(x < 5 && y < 5){
|
|
||||||
isoValues[x][y][z] = 1.0f;
|
|
||||||
}
|
|
||||||
atlasValues[x][y][z] = 1;
|
|
||||||
}
|
|
||||||
if(y < 10 && x < 10){
|
|
||||||
edgeIsoValues[x][y] = 1.0f;
|
|
||||||
}
|
|
||||||
if(y == 3 && x == 3){
|
|
||||||
edgeIsoValues[x][y] = -1.0f;
|
|
||||||
}
|
|
||||||
edgeAtlasValues[x][y] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TransvoxelChunkData chunkData = new TransvoxelChunkData(
|
|
||||||
isoValues,
|
|
||||||
atlasValues,
|
|
||||||
1
|
|
||||||
);
|
|
||||||
chunkData.addZNegativeEdge(
|
|
||||||
edgeIsoValues,
|
|
||||||
edgeAtlasValues
|
|
||||||
);
|
|
||||||
Entity transvoxelEntityTest = TerrainChunk.clientCreateTerrainChunkEntity(chunkData, 1, Globals.voxelTextureAtlas);
|
|
||||||
ClientEntityUtils.initiallyPositionEntity(transvoxelEntityTest, new Vector3d(3,3,3));
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Targeting crosshair
|
Targeting crosshair
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -52,6 +52,9 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
//is the voxel selection window open
|
//is the voxel selection window open
|
||||||
static boolean voxelWindowOpen = false;
|
static boolean voxelWindowOpen = false;
|
||||||
|
|
||||||
|
//vertical offset from cursor position to spawn things at
|
||||||
|
static final Vector3d cursorVerticalOffset = new Vector3d(0,0.05,0);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the level editor side panel top view
|
* Creates the level editor side panel top view
|
||||||
@ -172,7 +175,7 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, data.getCreatureId(), null);
|
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, data.getCreatureId(), null);
|
||||||
return false;
|
return false;
|
||||||
}}));
|
}}));
|
||||||
@ -202,7 +205,7 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
FoliageUtils.serverSpawnTreeFoliage(realm, cursorPos, data.getName(), new Random().nextLong());
|
FoliageUtils.serverSpawnTreeFoliage(realm, cursorPos, data.getName(), new Random().nextLong());
|
||||||
return false;
|
return false;
|
||||||
}}));
|
}}));
|
||||||
@ -232,7 +235,7 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
ItemUtils.serverSpawnBasicItem(realm, cursorPos, item.getItemId());
|
ItemUtils.serverSpawnBasicItem(realm, cursorPos, item.getItemId());
|
||||||
return false;
|
return false;
|
||||||
}}));
|
}}));
|
||||||
@ -263,7 +266,7 @@ public class MenuGeneratorsLevelEditor {
|
|||||||
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
Vector3d eyePos = new Vector3d(CameraEntityUtils.getCameraEye(Globals.playerCamera));
|
||||||
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
Vector3d centerPos = new Vector3d(CameraEntityUtils.getCameraCenter(Globals.playerCamera));
|
||||||
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
Realm realm = Globals.realmManager.getRealms().iterator().next();
|
||||||
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0);
|
Vector3d cursorPos = realm.getCollisionEngine().rayCastPosition(new Vector3d(centerPos), new Vector3d(eyePos).mul(-1.0), 5.0).add(cursorVerticalOffset);
|
||||||
ObjectUtils.serverSpawnBasicObject(realm, cursorPos, object.getObjectId());
|
ObjectUtils.serverSpawnBasicObject(realm, cursorPos, object.getObjectId());
|
||||||
return false;
|
return false;
|
||||||
}}));
|
}}));
|
||||||
|
|||||||
@ -24,13 +24,13 @@ public class RenderScreenPipeline implements RenderPipeline {
|
|||||||
//the leftover texture gets used to draw the screen framebuffer quad
|
//the leftover texture gets used to draw the screen framebuffer quad
|
||||||
//which doesnt work
|
//which doesnt work
|
||||||
openGLState.glActiveTexture(GL40.GL_TEXTURE0);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE0);
|
||||||
GL40.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
||||||
openGLState.glActiveTexture(GL40.GL_TEXTURE1);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE1);
|
||||||
GL40.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
||||||
openGLState.glActiveTexture(GL40.GL_TEXTURE2);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE2);
|
||||||
GL40.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
||||||
openGLState.glActiveTexture(GL40.GL_TEXTURE3);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE3);
|
||||||
GL40.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
openGLState.glBindTexture(GL40.GL_TEXTURE_2D, 0);
|
||||||
openGLState.glActiveTexture(GL40.GL_TEXTURE0);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE0);
|
||||||
|
|
||||||
openGLState.glDepthTest(false);
|
openGLState.glDepthTest(false);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class VolumeBufferPipeline implements RenderPipeline {
|
|||||||
|
|
||||||
RenderingEngine.volumeDepthBackfaceFramebuffer.bind();
|
RenderingEngine.volumeDepthBackfaceFramebuffer.bind();
|
||||||
GL40.glClear(GL40.GL_DEPTH_BUFFER_BIT);
|
GL40.glClear(GL40.GL_DEPTH_BUFFER_BIT);
|
||||||
GL40.glActiveTexture(GL40.GL_TEXTURE0);
|
openGLState.glActiveTexture(GL40.GL_TEXTURE0);
|
||||||
// glBindTexture(GL_TEXTURE_2D, woodTexture);
|
// glBindTexture(GL_TEXTURE_2D, woodTexture);
|
||||||
// renderScene(simpleDepthShader);
|
// renderScene(simpleDepthShader);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user