@@ -67,7 +67,8 @@ function display_physics_debug(view_id, cam, res_x, res_y, vtx_line_layout, line
6767 physics :RenderCollision (view_id , vtx_line_layout , line_shader , rs , 0 )
6868end
6969
70- function SetupBackgroundEnvironment (_res , _pipeline_info )
70+ function SetupBackgroundEnvironment (_res , _pipeline_info , is_aaa_enabled )
71+ is_aaa_enabled = is_aaa_enabled or false
7172 local scene = hg .Scene ()
7273
7374 hg .LoadSceneFromAssets (" main_stage.scn" , scene , _res , _pipeline_info )
@@ -76,6 +77,13 @@ function SetupBackgroundEnvironment(_res, _pipeline_info)
7677
7778 local camera_root = scene :GetNode (" camera_root" )
7879
80+ if is_aaa_enabled == false then
81+ local light = scene :GetNode (" Light" )
82+ local light_c = light :GetLight ()
83+ light_c :SetDiffuseIntensity (light_c :GetDiffuseIntensity () / 2.0 )
84+ light_c :SetSpecularIntensity (light_c :GetSpecularIntensity () / 2.0 )
85+ end
86+
7987 return scene , cam , camera_root
8088end
8189
@@ -336,7 +344,7 @@ if config_done == 1 then
336344
337345 -- credits
338346 local bench = {scene , cam , camera_root , rb_nodes , physics , physics_step , dt_frame_step }
339- bench .scene , bench .cam , bench .camera_root = SetupBackgroundEnvironment (res , pipeline_info )
347+ bench .scene , bench .cam , bench .camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
340348 bench .rb_nodes = SetupBenchmark (bench .scene , res , {vtx_layout = vtx_layout , materials = {gold = mat_gold , neon = mat_neon_red , black = mat_black }})
341349 bench .physics , bench .physics_step , bench .dt_frame_step = SetupScenePhysics (bench .scene , physics_freq , estimated_framerate )
342350 bench .scene :SetCurrentCamera (bench .cam )
@@ -405,7 +413,7 @@ if config_done == 1 then
405413 local _last_clock
406414
407415 -- title screen
408- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
416+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
409417 local initial_cam_pos = nil -- _cam:GetTransform():GetPos()
410418 local title_cam_timing = nil
411419 local _rb_nodes , _camera_tv , _ctx = SetupTitleScene (_scene , res , pipeline_info , vtx_layout , {gold = mat_gold })
@@ -424,7 +432,7 @@ if config_done == 1 then
424432 table.insert (mapping_sequences , {frame = {543 , 651 }, time_remap = {seq_idx .title_screen , 0.244 , 0.311 }})
425433
426434 -- rotating plates
427- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
435+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
428436 local _rb_nodes = SetupRotatingPlates (_scene , res , {vtx_layout = vtx_layout , materials = {gold = mat_gold , neon = mat_neon_red , black = mat_black }})
429437 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
430438 table.insert (sequences , {name = " rotating_plates" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -433,7 +441,7 @@ if config_done == 1 then
433441 table.insert (mapping_sequences , {frame = {868 , 1193 }, time_remap = {seq_idx .rotating_plates , 0.157 , 0.698 }})
434442
435443 -- wave grid
436- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
444+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
437445 local _rb_nodes = SetupWaveGrid (_scene , res , {vtx_layout = vtx_layout , materials = {gold = mat_gold , neon = mat_neon_red , black = mat_black }})
438446 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
439447 table.insert (sequences , {name = " wave_grid" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -447,7 +455,7 @@ if config_done == 1 then
447455 table.insert (mapping_sequences , {frame = {1621 , 1841 }, time_remap = {seq_idx .wave_grid , 0.615 , 0.228 }})
448456
449457 -- wall of bricks
450- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
458+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
451459 local _rb_nodes , _ctx = SetupWallOfBricks (_scene , res , pipeline_info , vtx_layout , {neon = mat_neon_red , chrome = mat_chrome , black = mat_black })
452460 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
453461 ApplyPhysicsWallOfBricks (_rb_nodes , _scene , _physics , _ctx )
@@ -458,7 +466,7 @@ if config_done == 1 then
458466 table.insert (mapping_sequences , {frame = {2162 , 2599 }, time_remap = {seq_idx .wall_of_bricks , 0.016 , 0.716 }})
459467
460468 -- Neons
461- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
469+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
462470 local _rb_nodes = SetupVerticalNeonChaos (_scene , res , {vtx_layout = vtx_layout , materials = {neon = mat_neon_red , gold = mat_gold }})
463471 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
464472 table.insert (sequences , {name = " neons" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -472,7 +480,7 @@ if config_done == 1 then
472480 table.insert (mapping_sequences , {frame = {3465 , 3469 }, time_remap = {seq_idx .neons , 0.777 , 0.782 }})
473481
474482 -- Simple cubes (greetings)
475- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
483+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
476484 local _rb_nodes = SetupSimpleCubeStack (_scene , res , pipeline_info , {model_size = cube_size , model_ref = cube_ref , materials = {grey = mat_grey , chrome = mat_chrome }})
477485 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq * 2.0 , estimated_framerate )
478486 table.insert (sequences , {name = " simple_cubes" , display_name = " greetings" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -481,7 +489,7 @@ if config_done == 1 then
481489 table.insert (mapping_sequences , {frame = {3983 , 4331 }, time_remap = {seq_idx .simple_cubes , 1.0 , 0.415 }})
482490
483491 -- oscillating_wall
484- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
492+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
485493 local _rb_nodes , _ctx = SetupOscillatingWall (_scene , res , {vtx_layout = vtx_layout , materials = {neon = mat_neon_red , black = mat_black }})
486494 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
487495 table.insert (sequences , {name = " oscillating_wall" , display_name = " kubes vader" , apply_physics = ApplyPhysicsOscillatingWall , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -498,15 +506,15 @@ if config_done == 1 then
498506 table.insert (mapping_sequences , {frame = {4977 , 5072 }, time_remap = {seq_idx .oscillating_wall , 0.408 , 0.316 }})
499507
500508 -- (in)visible colliders
501- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
509+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
502510 local _rb_nodes = SetupInvisibleColliders (_scene , res , {vtx_layout = vtx_layout , materials = {neon = mat_neon_red , silver = mat_silver , chrome = mat_chrome , black = mat_piano_black }})
503511 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
504512 table.insert (sequences , {name = " invisible_colliders" , display_name = " dear Yayoi" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
505513 table.insert (mapping_sequences , {frame = {5072 , 5360 }, time_remap = {seq_idx .invisible_colliders , 0.240 , 0.382 }})
506514 table.insert (mapping_sequences , {frame = {5360 , 5626 }, time_remap = {seq_idx .invisible_colliders , 0.382 , 0.252 }})
507515
508516 -- tornado
509- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
517+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
510518 local _rb_nodes = SetupTornado (_scene , res , {vtx_layout = vtx_layout , materials = {chrome = mat_chrome , neon = mat_neon_red , black = mat_black }})
511519 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
512520 table.insert (sequences , {name = " tornado" , display_name = " blobnado" , apply_physics = ApplyPhysicsTornado , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -516,15 +524,15 @@ if config_done == 1 then
516524 table.insert (mapping_sequences , {frame = {6100 , 6276 }, time_remap = {seq_idx .tornado , 0.199 , 0.463 }})
517525
518526 -- Repulsion core
519- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
527+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
520528 local _rb_nodes , _ctx = SetupRepulsionCore (_scene , res , {vtx_layout = vtx_layout , materials = {silver = mat_silver , black = mat_piano_black , neon = mat_neon_red }})
521529 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
522530 table.insert (sequences , {name = " repulsion_core" , display_name = " attraction core" , apply_physics = ApplyPhysicsRepulsionCore , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
523531 table.insert (mapping_sequences , {frame = {6276 , 6323 }, time_remap = {seq_idx .repulsion_core , 0.072 , 0.149 }})
524532 table.insert (mapping_sequences , {frame = {6323 , 6492 }, time_remap = {seq_idx .repulsion_core , 0.398 , 0.118 }})
525533
526534 -- Attraction core
527- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
535+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
528536 local _rb_nodes , _ctx = SetupAttractionCore (_scene , res , {vtx_layout = vtx_layout , materials = {silver = mat_silver , black = mat_piano_black , neon = mat_neon_red }})
529537 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
530538 table.insert (sequences , {name = " attraction_core" , display_name = " repulsion core" , apply_physics = ApplyPhysicsAttractionCore , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -533,7 +541,7 @@ if config_done == 1 then
533541 table.insert (mapping_sequences , {frame = {6815 , 7128 }, time_remap = {seq_idx .tornado , 0.862 , 0.339 }})
534542
535543 -- Voxel
536- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
544+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
537545 local _rb_nodes = SetupXiVoxel (_scene , res , {vtx_layout = vtx_layout , materials = {gold = mat_gold }})
538546 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
539547 table.insert (sequences , {name = " slices of voxel" , record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -543,7 +551,7 @@ if config_done == 1 then
543551 table.insert (mapping_sequences , {frame = {7364 , 7464 }, time_remap = {seq_idx .voxel , 0.754 , 0.507 }})
544552
545553 -- flocks
546- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
554+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
547555 local _rb_nodes = SetupFlocks (_scene , res , {vtx_layout = vtx_layout , materials = {silver = mat_silver , neon = mat_neon_red , black = mat_black }})
548556 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
549557 ApplyPhysicsFlocks (_rb_nodes , _physics )
@@ -552,7 +560,7 @@ if config_done == 1 then
552560 table.insert (mapping_sequences , {frame = {7682 , 7776 }, time_remap = {seq_idx .flocks , 0.125 , 0.238 }})
553561
554562 -- spiral tornado
555- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
563+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
556564 local _rb_nodes = SetupSpiralTornado (_scene , res , {vtx_layout = vtx_layout , materials = {chrome = mat_chrome , neon = mat_neon_red , black = mat_black }})
557565 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
558566 table.insert (sequences , {name = " spiral_tornado" , apply_physics = ApplyPhysicsSpiralTornado , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
@@ -561,7 +569,7 @@ if config_done == 1 then
561569
562570 -- last dummy sequence
563571 _last_clock = mapping_sequences [# mapping_sequences ].frame [2 ] / 60.0
564- local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info )
572+ local _scene , _cam , _camera_root = SetupBackgroundEnvironment (res , pipeline_info , enable_aaa )
565573 local _rb_nodes , _ctx = {}, {}
566574 local _physics , _physics_step , _dt_frame_step = SetupScenePhysics (_scene , physics_freq , estimated_framerate )
567575 table.insert (sequences , {name = " dummy" , display_name = " ...nd ths wll ffct th dmscn." , ctx = {}, record = {}, scene = _scene , camera = _cam , camera_root = _camera_root , nodes = _rb_nodes , physics = _physics , physics_step = _physics_step , dt_frame_step = _dt_frame_step })
0 commit comments