dont overcomplicate things
This commit is contained in:
@@ -128,6 +128,6 @@ public class HiZBuffer {
|
||||
}
|
||||
|
||||
public int getPackedLevels() {
|
||||
return ((Integer.numberOfTrailingZeros(this.width))<<16)|(Integer.numberOfTrailingZeros(this.height));//+1
|
||||
return (this.width<<16)|this.height;//+1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ bool outsideFrustum() {
|
||||
}
|
||||
|
||||
bool isCulledByHiz() {
|
||||
ivec2 ssize = ivec2(1)<<ivec2((packedHizSize>>16)&0xFFFF,packedHizSize&0xFFFF);
|
||||
ivec2 ssize = ivec2(packedHizSize>>16,packedHizSize&0xFFFF);
|
||||
vec2 size = (maxBB.xy-minBB.xy)*ssize;
|
||||
float miplevel = log2(max(max(size.x, size.y),1));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ layout(local_size_x=LOCAL_SIZE) in;//, local_size_y=1
|
||||
layout(binding = SCENE_UNIFORM_BINDING, std140) uniform SceneUniform {
|
||||
mat4 VP;
|
||||
ivec3 camSecPos;
|
||||
int packedHizSize;
|
||||
uint packedHizSize;
|
||||
vec3 camSubSecPos;
|
||||
float minSSS;
|
||||
Frustum frustum;
|
||||
|
||||
Reference in New Issue
Block a user