Skip to content

Commit

Permalink
Improve memory access handling
Browse files Browse the repository at this point in the history
Early return on fake surface commands.
  • Loading branch information
VReaperV committed Jul 27, 2024
1 parent 1aec06f commit 893d013
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/engine/renderer/glsl_source/cull_cp.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ bool CullSurface( in BoundingSphere boundingSphere ) {
void ProcessSurfaceCommands( const in SurfaceDescriptor surface, const in bool enabled ) {
for( uint i = 0; i < MAX_SURFACE_COMMANDS; i++ ) {
const uint commandID = surface.surfaceCommandIDs[i];
if( commandID == 0 ) {
return;
}
surfaceCommands[commandID + u_SurfaceCommandsOffset].enabled = enabled;
}
}
Expand Down

0 comments on commit 893d013

Please sign in to comment.