@@ -670,7 +670,7 @@ pl_renderer_create_scene(plSceneInit tInit)
670670
671671 ptScene -> ptComponentLibrary = tInit .ptComponentLibrary ;
672672 ptScene -> pcName = "unnamed scene" ;
673- ptScene -> tFlags = PL_SCENE_INTERNAL_FLAG_ACTIVE | PL_SCENE_INTERNAL_FLAG_PROBE_COUNT_DIRTY ;
673+ ptScene -> tFlags = PL_SCENE_INTERNAL_FLAG_ACTIVE ;
674674 gptFreeList -> create ((uint64_t )tInit .szMaterialBufferSize , sizeof (plGpuMaterial ), & ptScene -> tMaterialFreeList );
675675
676676 // create global bindgroup
@@ -1128,11 +1128,8 @@ pl_renderer_create_scene(plSceneInit tInit)
11281128 ptScene -> tDirectionalLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_directional" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
11291129 ptScene -> tSpotLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_spot" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
11301130 ptScene -> tPointLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_point" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
1131- aiLightingConstantData [0 ] = gptData -> tRuntimeOptions .bPunctualLighting ? PL_RENDERING_FLAG_SHADOWS : 0 ;
1132- ptScene -> tEnvDirectionalLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_directional" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
1133- ptScene -> tEnvSpotLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_spot" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
1134- ptScene -> tEnvPointLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_point" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
1135-
1131+ ptScene -> tProbeLightingShader = gptShaderVariant -> get_shader ("deferred_lighting" , NULL , NULL , NULL , & gptData -> tRenderPassLayout );
1132+
11361133 for (uint32_t i = 0 ; i < gptGfx -> get_frames_in_flight (); i ++ )
11371134 {
11381135 const plBindGroupUpdateBufferData atGlobalBufferData [] =
@@ -2665,12 +2662,7 @@ pl_renderer_reload_scene_shaders(plScene* ptScene)
26652662 ptScene -> tDirectionalLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_directional" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
26662663 ptScene -> tSpotLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_spot" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
26672664 ptScene -> tPointLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_point" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
2668- int iProbeCount = (int )pl_sb_size (ptScene -> sbtProbeData );
2669- ptScene -> tProbeLightingShader = gptShaderVariant -> get_shader ("deferred_lighting" , NULL , NULL , & iProbeCount , & gptData -> tRenderPassLayout );
2670- aiLightingConstantData [0 ] = gptData -> tRuntimeOptions .bPunctualLighting ? PL_RENDERING_FLAG_SHADOWS : 0 ;
2671- ptScene -> tEnvDirectionalLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_directional" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
2672- ptScene -> tEnvSpotLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_spot" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
2673- ptScene -> tEnvPointLightingShader = gptShaderVariant -> get_shader ("deferred_lighting_point" , NULL , NULL , aiLightingConstantData , & gptData -> tRenderPassLayout );
2665+ ptScene -> tProbeLightingShader = gptShaderVariant -> get_shader ("deferred_lighting" , NULL , NULL , NULL , & gptData -> tRenderPassLayout );
26742666 gptShader -> set_options (& tOriginalOptions );
26752667
26762668 const uint32_t uDrawableCount = pl_sb_size (ptScene -> sbtDrawables );
@@ -2925,7 +2917,6 @@ void
29252917pl_renderer_add_probe_to_scene (plScene * ptScene , plEntity tProbe )
29262918{
29272919 pl__renderer_create_probe_data (ptScene , tProbe );
2928- ptScene -> tFlags |= PL_SCENE_INTERNAL_FLAG_PROBE_COUNT_DIRTY ;
29292920 pl_renderer_add_drawable_objects_to_scene (ptScene , 1 , & tProbe );
29302921}
29312922
@@ -3977,13 +3968,6 @@ pl_renderer_begin_frame(void)
39773968 if (!(ptScene -> tFlags & PL_SCENE_INTERNAL_FLAG_ACTIVE ))
39783969 continue ;
39793970
3980- if (ptScene -> tFlags & PL_SCENE_INTERNAL_FLAG_PROBE_COUNT_DIRTY )
3981- {
3982- ptScene -> tFlags &= ~PL_SCENE_INTERNAL_FLAG_PROBE_COUNT_DIRTY ;
3983- int iProbeCount = (int )pl_sb_size (ptScene -> sbtProbeData );
3984- ptScene -> tProbeLightingShader = gptShaderVariant -> get_shader ("deferred_lighting" , NULL , NULL , & iProbeCount , & gptData -> tRenderPassLayout );
3985- }
3986-
39873971 if (ptScene -> uMaterialDirtyValue > 0 )
39883972 {
39893973 if (gptStage -> completed (ptScene -> uMaterialDirtyValue ))
0 commit comments