From 33ac4a08645190e3b2fb1a608a9e084968588fc8 Mon Sep 17 00:00:00 2001 From: Areloch Date: Sun, 26 Feb 2023 12:58:50 -0600 Subject: [PATCH] Corrects the dirt lens image reference from filepath to assetId to not have overhead having to look up the asset each frame when setting the postFX --- .../BaseGame/game/core/postFX/scripts/HDR/HDRPostFX.tscript | 4 ++-- .../game/core/postFX/scripts/default.postfxpreset.tscript | 2 +- .../ExampleModule/levels/ExampleLevel.postfxpreset.tscript | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDRPostFX.tscript b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDRPostFX.tscript index 8909c8d45..4a2fe60e2 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/HDR/HDRPostFX.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/HDR/HDRPostFX.tscript @@ -70,7 +70,7 @@ $PostFX::HDRPostFX::dirtIntensity = 2.0; $PostFX::HDRPostFX::dirtEdgeMinDist = 0.125; $PostFX::HDRPostFX::dirtEdgeMaxDist = 0.75; $PostFX::HDRPostFX::dirtEdgeMinVal = 0.05; -$PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png"; +$PostFX::HDRPostFX::dirtImage = "Core_PostFX:lensDirt_image"; // The tonemapping algo to use $PostFX::HDRPostFX::tonemapMode = "ACES"; @@ -347,7 +347,7 @@ function HDRPostFX::preProcess( %this ) if(%bloomFinal.texture[1] !$= $PostFX::HDRPostFX::dirtImage) { if ($PostFX::HDRPostFX::dirtImage $= "") - $PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png"; + $PostFX::HDRPostFX::dirtImage = "Core_PostFX:lensDirt_image"; %bloomFinal.setTexture(1, $PostFX::HDRPostFX::dirtImage); } diff --git a/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript b/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript index 3e18231aa..b479c753b 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/default.postfxpreset.tscript @@ -17,7 +17,7 @@ $PostFX::HDRPostFX::radius = "4"; $PostFX::HDRPostFX::enableDirt = 1; $PostFX::HDRPostFX::dirtScale = 2048; $PostFX::HDRPostFX::dirtIntensity = 2; -$PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png"; +$PostFX::HDRPostFX::dirtImage = "Core_PostFX:lensDirt_image"; $PostFX::HDRPostFX::dirtEdgeMinDist = 0.125; $PostFX::HDRPostFX::dirtEdgeMaxDist = 0.75; $PostFX::HDRPostFX::dirtEdgeMinVal = 0.05; diff --git a/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.postfxpreset.tscript b/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.postfxpreset.tscript index 3e1da612f..917c27ec5 100644 --- a/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.postfxpreset.tscript +++ b/Templates/BaseGame/game/data/ExampleModule/levels/ExampleLevel.postfxpreset.tscript @@ -17,7 +17,7 @@ $PostFX::HDRPostFX::radius = 4; $PostFX::HDRPostFX::enableDirt = 1; $PostFX::HDRPostFX::dirtScale = 2048; $PostFX::HDRPostFX::dirtIntensity = 2; -$PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png"; +$PostFX::HDRPostFX::dirtImage = "Core_PostFX:lensDirt_image"; $PostFX::HDRPostFX::dirtEdgeMinDist = 0.125; $PostFX::HDRPostFX::dirtEdgeMaxDist = 0.75; $PostFX::HDRPostFX::dirtEdgeMinVal = 0.05;