Provide all uniforms to cull shaders

This commit is contained in:
Kneelawk 2024-03-05 12:45:20 -08:00
parent d11a6e3b48
commit 206aa8d312
No known key found for this signature in database
GPG Key ID: FA28611EBBA770B9
3 changed files with 5 additions and 13 deletions

View File

@ -84,6 +84,7 @@ public class IndirectPrograms extends AtomicReferenceCounted {
.withResource(CULL_SHADER_MAIN)) .withResource(CULL_SHADER_MAIN))
.postLink((key, program) -> { .postLink((key, program) -> {
program.setUniformBlockBinding("_FlwFrameUniforms", Uniforms.FRAME_INDEX); program.setUniformBlockBinding("_FlwFrameUniforms", Uniforms.FRAME_INDEX);
program.setUniformBlockBinding("_FlwFogUniforms", Uniforms.FOG_INDEX);
program.setUniformBlockBinding("_FlwOptionsUniforms", Uniforms.OPTIONS_INDEX); program.setUniformBlockBinding("_FlwOptionsUniforms", Uniforms.OPTIONS_INDEX);
program.setUniformBlockBinding("_FlwPlayerUniforms", Uniforms.PLAYER_INDEX); program.setUniformBlockBinding("_FlwPlayerUniforms", Uniforms.PLAYER_INDEX);
program.setUniformBlockBinding("_FlwLevelUniforms", Uniforms.LEVEL_INDEX); program.setUniformBlockBinding("_FlwLevelUniforms", Uniforms.LEVEL_INDEX);

View File

@ -1,10 +1,7 @@
#include "flywheel:internal/indirect/buffers.glsl" #include "flywheel:internal/indirect/buffers.glsl"
#include "flywheel:internal/indirect/model_descriptor.glsl" #include "flywheel:internal/indirect/model_descriptor.glsl"
#include "flywheel:internal/indirect/object.glsl" #include "flywheel:internal/indirect/object.glsl"
#include "flywheel:internal/uniforms/frame.glsl" #include "flywheel:internal/uniforms/uniforms.glsl"
#include "flywheel:internal/uniforms/options.glsl"
#include "flywheel:internal/uniforms/player.glsl"
#include "flywheel:internal/uniforms/level.glsl"
#include "flywheel:util/matrix.glsl" #include "flywheel:util/matrix.glsl"
layout(local_size_x = _FLW_SUBGROUP_SIZE) in; layout(local_size_x = _FLW_SUBGROUP_SIZE) in;

View File

@ -1,9 +1,3 @@
#include "flywheel:internal/uniforms/frame.glsl" // Cull shaders may not need all uniforms, but it is
// more consistent if we just provide all uniforms anyways.
// Fog doesn't seem like a valid thing to query during the cull pass. Other uniforms added in the #include "flywheel:internal/uniforms/uniforms.glsl"
// future may also be excluded, and we'll have to document each one.
// #include "flywheel:internal/uniforms/fog.glsl"
#include "flywheel:internal/uniforms/options.glsl"
#include "flywheel:internal/uniforms/player.glsl"
#include "flywheel:internal/uniforms/level.glsl"