AaAaA
This commit is contained in:
@@ -106,17 +106,17 @@ public class HierarchicalOcclusionTraverser {
|
||||
MemoryUtil.memPutInt(ptr, sy); ptr += 4;
|
||||
MemoryUtil.memPutInt(ptr, sz); ptr += 4;
|
||||
|
||||
MemoryUtil.memPutInt(ptr, viewport.width); ptr += 4;
|
||||
MemoryUtil.memPutFloat(ptr, viewport.width); ptr += 4;
|
||||
|
||||
var innerTranslation = new Vector3f((float) (viewport.cameraX-(sx<<5)), (float) (viewport.cameraY-(sy<<5)), (float) (viewport.cameraZ-(sz<<5)));
|
||||
innerTranslation.getToAddress(ptr); ptr += 4*3;
|
||||
|
||||
MemoryUtil.memPutInt(ptr, viewport.height); ptr += 4;
|
||||
MemoryUtil.memPutFloat(ptr, viewport.height); ptr += 4;
|
||||
|
||||
MemoryUtil.memPutInt(ptr, (int) (this.renderList.size()/4-1)); ptr += 4;
|
||||
|
||||
//Screen space size for descending
|
||||
MemoryUtil.memPutFloat(ptr, 128*128); ptr += 4;
|
||||
MemoryUtil.memPutFloat(ptr, 150*150); ptr += 4;
|
||||
}
|
||||
|
||||
private void bindings() {
|
||||
|
||||
@@ -82,7 +82,7 @@ bool isCulledByHiz() {
|
||||
if (minBB.z < 0) {//Minpoint is behind the camera, its always going to pass
|
||||
return false;
|
||||
}
|
||||
vec2 ssize = size.xy * vec2(ivec2(screenW, screenH));
|
||||
vec2 ssize = size.xy * vec2(screenW, screenH);
|
||||
float miplevel = ceil(log2(max(max(ssize.x, ssize.y),1)));
|
||||
vec2 midpoint = (maxBB.xy + minBB.xy)*0.5f;
|
||||
// printf("HiZ sample point culled: (%f,%f)@%f against %f", midpoint.x, midpoint.y, miplevel, minBB.z);
|
||||
|
||||
@@ -8,9 +8,9 @@ layout(local_size_x=LOCAL_SIZE) in;//, local_size_y=1
|
||||
layout(binding = SCENE_UNIFORM_BINDING, std140) uniform SceneUniform {
|
||||
mat4 VP;
|
||||
ivec3 camSecPos;
|
||||
uint screenW;
|
||||
float screenW;
|
||||
vec3 camSubSecPos;
|
||||
uint screenH;
|
||||
float screenH;
|
||||
uint renderQueueMaxSize;
|
||||
float minSSS;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user