mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-20 17:05:32 +01:00
Add new uniforms to cull shader
This commit is contained in:
parent
3e55ae6aea
commit
8f4958ee2a
3 changed files with 13 additions and 1 deletions
|
@ -82,7 +82,12 @@ public class IndirectPrograms extends AtomicReferenceCounted {
|
|||
.withComponent(IndirectComponent::create)
|
||||
.withResource(InstanceType::cullShader)
|
||||
.withResource(CULL_SHADER_MAIN))
|
||||
.postLink((key, program) -> program.setUniformBlockBinding("_FlwFrameUniforms", Uniforms.FRAME_INDEX))
|
||||
.postLink((key, program) -> {
|
||||
program.setUniformBlockBinding("_FlwFrameUniforms", Uniforms.FRAME_INDEX);
|
||||
program.setUniformBlockBinding("_FlwOptionsUniforms", Uniforms.OPTIONS_INDEX);
|
||||
program.setUniformBlockBinding("_FlwPlayerUniforms", Uniforms.PLAYER_INDEX);
|
||||
program.setUniformBlockBinding("_FlwLevelUniforms", Uniforms.LEVEL_INDEX);
|
||||
})
|
||||
.harness("culling", sources);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#include "flywheel:internal/indirect/model_descriptor.glsl"
|
||||
#include "flywheel:internal/indirect/object.glsl"
|
||||
#include "flywheel:internal/uniforms/frame.glsl"
|
||||
#include "flywheel:internal/uniforms/options.glsl"
|
||||
#include "flywheel:internal/uniforms/player.glsl"
|
||||
#include "flywheel:internal/uniforms/level.glsl"
|
||||
#include "flywheel:util/matrix.glsl"
|
||||
|
||||
layout(local_size_x = _FLW_SUBGROUP_SIZE) in;
|
||||
|
|
|
@ -3,3 +3,7 @@
|
|||
// Fog doesn't seem like a valid thing to query during the cull pass. Other uniforms added in the
|
||||
// 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"
|
||||
|
|
Loading…
Add table
Reference in a new issue