Migration vers UPBGE 0.36

This commit is contained in:
Philippe Roy 2023-07-11 22:25:15 +02:00
parent c54c5e555d
commit ba23f4933b
2 changed files with 3 additions and 33 deletions

6
rp.py
View File

@ -131,10 +131,6 @@ def terrain_init (cont):
if cont.sensors['Init'].positive == False: # 1 seule fois
return False
# Configuration du moteur de rendu
# eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = True
# Ajout du Hud
scene.active_camera = scene.objects["Camera"]
scene.objects['Sun'].setVisible(True,True)
@ -391,7 +387,7 @@ color_cmd = (0.8, 0.8, 0.8, 1) # Blanc
color_cmd_hl = (0.8, 0.619, 0.021, 1) # Jaune
##
# Init
# Initialisation des commandes
##
def cmd_init(cont):

View File

@ -115,20 +115,6 @@ def open():
scene.objects['About_quality-down'].setVisible(True,True)
scene.objects['About_quality-down-colbox'].restorePhysics()
# # Boutons < et > ("640x360", "960x540", "1280x720", "1920x1080")
# if bge.render.getWindowWidth() <=640:
# scene.objects['About_screen-down'].setVisible(False,True)
# scene.objects['About_screen-down-colbox'].suspendPhysics (True)
# else:
# scene.objects['About_screen-down'].setVisible(True,True)
# scene.objects['About_screen-down-colbox'].restorePhysics()
# if bge.render.getWindowWidth() >= 1920:
# scene.objects['About_screen-up'].setVisible(False,True)
# scene.objects['About_screen-up-colbox'].suspendPhysics (True)
# else:
# scene.objects['About_screen-up'].setVisible(True,True)
# scene.objects['About_screen-up-colbox'].restorePhysics()
##
# Animation de l'ouverture
##
@ -205,7 +191,7 @@ def credits(cont):
scene.objects['Camera'].setVisible(False,True)
scene.objects['Doc-cmd-colbox'].suspendPhysics (True)
# Afficher la page Créditsp
# Afficher la page Crédits
scene.objects["Credits"].worldPosition.x = scene.objects["About"]['init_lx']
scene.objects["Credits"].worldPosition.y = scene.objects["About"]['init_ly']
scene.objects["Credits"].worldPosition.z = scene.objects["About"]['init_lz']
@ -416,15 +402,13 @@ def quality_apply(quality, start_flag=False):
# Texte du About
quality_txt=("Inconvenant", "Basse", "Moyenne", "Haute", "Épique")
# quality_eevee=('NOSMAA', 'LOW', 'MEDIUM','HIGH','ULTRA')
scene.objects['About_quality']['Text']= "Qualité : "+quality_txt[quality]
if start_flag== False and sys.platform!="linux": # Plantage sur Windows -> redémarrage après changement
return
# Inconvenant
if quality== 0:
# eevee.use_eevee_smaa = False # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = False
eevee.use_taa_reprojection = False
eevee.use_ssr = False # Screen space reflection
eevee.use_gtao = False # Ambient occlusion
eevee.taa_render_samples = 1
@ -436,9 +420,7 @@ def quality_apply(quality, start_flag=False):
# Basse
if quality== 1:
# eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = True
# eevee.smaa_quality= 'LOW' # Option obsolète depuis la version UPBGE 0.36
eevee.use_ssr = True # Screen space reflection
eevee.use_ssr_refraction = False # Screen space refractions
eevee.use_ssr_halfres = True
@ -452,9 +434,7 @@ def quality_apply(quality, start_flag=False):
# Moyenne
if quality== 2:
# eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = True
# eevee.smaa_quality= 'MEDIUM' # Option obsolète depuis la version UPBGE 0.36
eevee.use_ssr = True # Screen space reflection
eevee.use_ssr_refraction = True # Screen space refractions
eevee.use_ssr_halfres = True
@ -468,9 +448,7 @@ def quality_apply(quality, start_flag=False):
# Haute
if quality== 3:
# eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = True
# eevee.smaa_quality= 'HIGH' # Option obsolète depuis la version UPBGE 0.36
eevee.use_ssr = True
eevee.use_ssr_refraction = True
eevee.use_ssr_halfres = False
@ -484,9 +462,7 @@ def quality_apply(quality, start_flag=False):
# Épique
if quality== 4:
# eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36
eevee.use_taa_reprojection = True
# eevee.smaa_quality= 'ULTRA' # Option obsolète depuis la version UPBGE 0.36
eevee.use_ssr = True
eevee.use_ssr_refraction = True
eevee.use_ssr_halfres = False
@ -497,5 +473,3 @@ def quality_apply(quality, start_flag=False):
eevee.use_volumetric_shadows = True
eevee.shadow_cascade_size='4096'
eevee.shadow_cube_size='4096'