Light fixes
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7da8472d0e
commit
9db672321f
@ -572,22 +572,6 @@
|
||||
"maxHealth" : 100,
|
||||
"onDamageIFrames" : 30
|
||||
},
|
||||
"pointLight" : {
|
||||
"const": 1.0,
|
||||
"linear": 0.9,
|
||||
"quadratic": 0.9,
|
||||
"radius": 3.0,
|
||||
"color": {
|
||||
"x": 0.3,
|
||||
"y": 0.3,
|
||||
"z": 0.3
|
||||
},
|
||||
"offset": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
},
|
||||
"graphicsTemplate": {
|
||||
"model": {
|
||||
"idleData": {
|
||||
|
||||
@ -456,22 +456,6 @@
|
||||
"maxHealth" : 60,
|
||||
"onDamageIFrames" : 30
|
||||
},
|
||||
"pointLight" : {
|
||||
"const": 1.0,
|
||||
"linear": 0.9,
|
||||
"quadratic": 0.9,
|
||||
"radius": 3.0,
|
||||
"color": {
|
||||
"x": 0.3,
|
||||
"y": 0.3,
|
||||
"z": 0.3
|
||||
},
|
||||
"offset": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
},
|
||||
"graphicsTemplate": {
|
||||
"model": {
|
||||
"idleData": {
|
||||
|
||||
@ -46,11 +46,15 @@ layout(std430, binding = POINT_LIGHT_SSBO_BIND_POINT) restrict buffer lightSSBO
|
||||
|
||||
uniform mat4 viewMatrix;
|
||||
|
||||
/**
|
||||
* Number of lights in the scene
|
||||
*/
|
||||
uniform int lightCount;
|
||||
|
||||
bool testSphereAABB(uint i, Cluster c);
|
||||
|
||||
// each invocation of main() is a thread processing a cluster
|
||||
void main() {
|
||||
uint lightCount = pointLight.length();
|
||||
uint index = gl_WorkGroupID.x * CULL_LOCAL_SIZE + gl_LocalInvocationID.x;
|
||||
Cluster cluster = clusters[index];
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#maven.buildNumber.plugin properties file
|
||||
#Wed Nov 20 16:01:40 EST 2024
|
||||
buildNumber=398
|
||||
#Wed Nov 20 21:32:04 EST 2024
|
||||
buildNumber=399
|
||||
|
||||
@ -1105,6 +1105,8 @@ Fix server terrain generation lock spinning on loading terrain from disk
|
||||
Fix crosshair NPE when camera undefined
|
||||
Fix ray casting entity filtering bug
|
||||
Fix ClientTerrainManager concurrent editing bug
|
||||
Fix point lights not being cleared from buffer after deletion
|
||||
Remove point lights from skeleton + human
|
||||
|
||||
|
||||
# TODO
|
||||
|
||||
@ -214,6 +214,7 @@ public class LightManager {
|
||||
ComputeShader lightCull = Globals.assetManager.fetchComputeShader(AssetDataStrings.COMPUTE_LIGHT_CULL);
|
||||
openGLState.setActiveShader(renderPipelineState, lightCull);
|
||||
lightCull.setUniform(openGLState, "viewMatrix", Globals.viewMatrix);
|
||||
lightCull.setUniform(openGLState, "lightCount", this.entityPointLightMap.values().size());
|
||||
|
||||
int dispatchLocal = (LIGHT_CLUSTER_WIDTH_X * LIGHT_CLUSTER_WIDTH_Y * LIGHT_CLUSTER_WIDTH_Z) / CULL_LOCAL_SIZE;
|
||||
lightCull.dispatch(dispatchLocal, ComputeShader.DEFAULT_LOCAL_SIZE, ComputeShader.DEFAULT_LOCAL_SIZE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user