minor render cleanup
This commit is contained in:
-4
@@ -220,12 +220,8 @@ public class LodBufferContainer implements AutoCloseable
|
||||
|
||||
ByteBuffer buffer = byteBuffers.get(i);
|
||||
int size = buffer.limit() - buffer.position();
|
||||
//int vertexCount = size / LodUtil.DH_VERTEX_FORMAT.getByteSize();
|
||||
int vertexCount = size / lodRenderer.getVertexSize();
|
||||
|
||||
// 6,1,0
|
||||
// java.nio.DirectByteBuffer[pos=0 lim=219840 cap=10485760]
|
||||
// 13740
|
||||
try
|
||||
{
|
||||
vbo.upload(buffer, vertexCount);
|
||||
|
||||
@@ -109,6 +109,7 @@ public class LodUtil
|
||||
public static final int MAX_ALLOCATABLE_DIRECT_MEMORY = 64 * 1024 * 1024;
|
||||
|
||||
/** the format of data stored in the GPU buffers */
|
||||
@Deprecated
|
||||
public static final LodVertexFormat DH_VERTEX_FORMAT = VertexFormats.POSITION_COLOR_BLOCK_LIGHT_SKY_LIGHT_MATERIAL_ID_NORMAL_INDEX;
|
||||
|
||||
|
||||
|
||||
-5
@@ -26,11 +26,6 @@ import com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindab
|
||||
|
||||
public interface IMcLodRenderer extends IBindable
|
||||
{
|
||||
//void fillUniformData(DhApiRenderParam renderEventParam);
|
||||
///** sets the vec3 that all DH verticies should be offset by when rendering */
|
||||
//void setModelOffsetPos(DhApiVec3f modelPos);
|
||||
|
||||
//void render(IVertexBufferWrapper[] bufferList, IProfilerWrapper profiler);
|
||||
void render(
|
||||
DhApiRenderParam renderEventParam, boolean opaquePass,
|
||||
DhApiVec3f modelPos, IVertexBufferWrapper[] bufferList,
|
||||
|
||||
@@ -4,20 +4,23 @@ in vec2 TexCoord;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
// inverted model view matrix and projection matrix
|
||||
uniform mat4 uDhInvMvmProj;
|
||||
uniform mat4 uMcInvMvmProj;
|
||||
|
||||
uniform sampler2D uMcDepthTexture;
|
||||
uniform sampler2D uDhDepthTexture;
|
||||
uniform sampler2D uCombinedMcDhColorTexture;
|
||||
uniform sampler2D uDhColorTexture;
|
||||
|
||||
uniform float uStartFadeBlockDistance;
|
||||
uniform float uEndFadeBlockDistance;
|
||||
uniform float uMaxLevelHeight;
|
||||
layout (std140) uniform fragUniformBlock
|
||||
{
|
||||
// inverted model view matrix and projection matrix
|
||||
mat4 uDhInvMvmProj;
|
||||
mat4 uMcInvMvmProj;
|
||||
|
||||
uniform bool uOnlyRenderLods;
|
||||
float uStartFadeBlockDistance;
|
||||
float uEndFadeBlockDistance;
|
||||
float uMaxLevelHeight;
|
||||
|
||||
bool uOnlyRenderLods;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,27 +7,17 @@ in vec4 gl_FragCoord;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
//// Fade/Clip Uniforms
|
||||
//layout (std140) uniform uClipDistance { float uClipDistance; };
|
||||
//
|
||||
//// Noise Uniforms
|
||||
//layout (std140) uniform uNoiseEnabled { bool uNoiseEnabled; };
|
||||
//layout (std140) uniform uNoiseSteps { int uNoiseSteps; };
|
||||
//layout (std140) uniform uNoiseIntensity { float uNoiseIntensity; };
|
||||
//layout (std140) uniform uNoiseDropoff { int uNoiseDropoff; };
|
||||
//layout (std140) uniform uDitherDhRendering { bool uDitherDhRendering; };
|
||||
|
||||
layout (std140) uniform fragUniformBlock
|
||||
{
|
||||
// Fade/Clip Uniforms
|
||||
float uClipDistance;
|
||||
|
||||
// Noise Uniforms
|
||||
bool uNoiseEnabled;
|
||||
int uNoiseSteps;
|
||||
float uNoiseIntensity;
|
||||
int uNoiseSteps;
|
||||
int uNoiseDropoff;
|
||||
bool uDitherDhRendering;
|
||||
bool uNoiseEnabled;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#version 330 core
|
||||
#version 150
|
||||
|
||||
in uvec4 vPosition;
|
||||
in vec4 vColor;
|
||||
@@ -8,21 +8,17 @@ out vec4 vertexColor;
|
||||
out vec3 vertexWorldPos;
|
||||
out float vertexYPos;
|
||||
|
||||
//layout (std140) uniform uIsWhiteWorld { bool uIsWhiteWorld; };
|
||||
//layout (std140) uniform uCombinedMatrix { mat4 uCombinedMatrix; };
|
||||
//layout (std140) uniform uModelOffset { vec3 uModelOffset; };
|
||||
//layout (std140) uniform uWorldYOffset { float uWorldYOffset; };
|
||||
//layout (std140) uniform uMircoOffset { float uMircoOffset; };
|
||||
//layout (std140) uniform uEarthRadius { float uEarthRadius; };
|
||||
|
||||
layout (std140) uniform vertUniformBlock
|
||||
{
|
||||
bool uIsWhiteWorld;
|
||||
mat4 uCombinedMatrix;
|
||||
vec3 uModelOffset;
|
||||
|
||||
float uWorldYOffset;
|
||||
float uMircoOffset;
|
||||
float uEarthRadius;
|
||||
|
||||
vec3 uModelOffset;
|
||||
|
||||
mat4 uCombinedMatrix;
|
||||
};
|
||||
|
||||
uniform sampler2D uLightMap;
|
||||
|
||||
Reference in New Issue
Block a user