Commit graph

113 commits

Author SHA1 Message Date
AzaezelX 8c38448428 probe capture fixes
review of per and post bake protocols showed that the CAPTURING shader macro was not being properly recompiled in. as opengl was not playing nice with a simple batch shader recompilation for all effected shaders, a full lightmanager restart is at time of writing required. once we have a proper globally cached scene structure stored off GPU side, we'll want to change  GFXShader::addGlobalMacro("CAPTURING", String("1")); on over to dirtying that value in the cached buffer via setting a shader global uniform
review of prefilter examples shows a fixed sample count of 1024 across multiple implementations, so we'll use the standard barring further research into where that number is comming from for a scalar approach
review of gl shaders shows a doubleup in compiled state testing, so slimmed that down and added additional debugging reports
2023-12-05 13:32:03 -06:00
Johan Mattsson 5b8bfffdec
Fix operator 2023-03-05 12:12:57 +01:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
AzaezelX 5f319e50ed ammend caputre mask so that skylight et al gets terrain, but skips editor-only renders 2023-01-03 06:53:59 -06:00
AzaezelX d23ee397e6 adds wetness
cliffsnotes:
   $Core::WetnessTexture = "core/rendering/images/wetMap.png"; //for the influence degree map
probes/skylight have a new canDamp boolean, set to off for probes, on for skylight by default.
:levelinfo has a dampness multiplier (0-1)
kicked up numTextures from 8 to 16 for shaderdata and postfx since that hit the 8 texture-in prior limit, and we've already adopted apis that can handle the higher count
2022-11-21 21:12:23 -06:00
AzaezelX ad3c961579 get probes displaying with low Texture quality
refactored detection of texture sizes for cubemaps
removed the assumption that if we give U32 GFXTextureManager::getTextureDownscalePower( GFXTextureProfile *profile ) no profile, it should go right ahead and downscale anyway
sniped the downscaling strings in the resulting U32 getProbeTexSize(); and void setCubeTexSize(const U32 cubemapFaceSize); until sucj time as we can properly follow up all possible combinations of shiping in one scale, and a customer choosing to use lower resolution textures as the current result is a hard shutoff entirely
2022-09-14 15:58:32 -05:00
AzaezelX 5453d53f4c correct capturing flag test 2022-08-28 17:24:59 -05:00
AzaezelX 748f884671 adds light fade and cap trackign to probe manager
prebake removes them, postbake restores them to ap settings.
also went ahead and threw the probes::capturing val at it as well
2022-08-28 14:27:15 -05:00
AzaezelX 111f0c840d probe capture cleanups pt1
fix high-metalness object capture (had the lerp the wrong direction for canceling out NULL-ibl due to full metallic)
use dStrcmp for (Con::getVariable("$Probes::Capturing", "0") comparisons. and early out on rendering probes when we are capturing, not when we aren't.
2022-08-27 17:25:35 -05:00
JeffR 28bf6c5b8f Ensures that the capturing flag is toggled regardless of how we invoke for a probe to bake(previously it was only done with the batch bake) 2022-02-14 08:58:19 -06:00
JeffR e04f844240 Scaling correction to probes in deferred mode to improve parallax adjustment
Ensure that probes are masked to be rendered during bake passes so they can contribute during a bake allowing multibakes
Adjusted order of the connect data for the forward shaders to fix a mis-port issue
2022-02-13 19:24:01 -06:00
JeffR 79eebdd5f3 Cleaned and repacked work to update the probe bin and reflection probe behavior to clean and standardize it. 2022-02-12 15:53:40 -06:00
AzaezelX b60d51969e brdf handling corrections
1-handle the brdfTexture in linear space, not srgb.
2-clamp surface.NoV across the board for consistency. (solves several new and ongoing artifacts)
2021-11-13 19:05:26 -06:00
AzaezelX 42bc6fa358 differentiate forward lit and deferred ibl vars
since we're not currently using the same arrays et al for the whole pass, need to make sure those don't fight
2021-10-26 12:32:37 -05:00
AzaezelX 53f9f49410 mMipCount was never being filled out. just use mPrefilterArray->getMipMapLevels() direct 2020-12-05 00:04:19 -06:00
Areloch 94e6d19fb2 Ensures that baking is consistently set to use HDR formats or not which avoids an occasional mismatch crash
Also corrected a string formatting issue with loading static cubemaps on probes that could lead to a crash
Fixed the resources loaded handling so it would correctly initialize the probe's cubemaps even if the initial ghost network packet assigned a cubemap before we fully init'd the client object
2020-10-29 23:27:07 -05:00
Areloch 6a3603c737 Overhauls the handling of probes to utilize an active probe list to improve performance and allow a greater total number of active probes in a scene.
Also fixes handling of metal materials during bakes to render properly, and fixes a possible double-up return in findObjectByType, which could cause doubling when getting probes in the scene
2020-10-19 00:53:09 -05:00
AzaezelX 0c7811bd1a shift pbrconfig to ORM 2020-09-30 13:51:12 -05:00
Areloch 8956559bfd Various misc. tweaks and fixes based on static code analysis to minimize/fix memleaks, crashes, or other performance impacting code. 2020-09-19 18:25:10 -05:00
Areloch 5289fdf7f1 Re-implements the dynamic cubemap mode option for reflection probes 2020-09-11 02:13:05 -05:00
Areloch 638a515702 Merge branch 'alpha40_BandingBreakup' of https://github.com/Azaezel/Torque3D into Preview4_0_w_alph40_cleanups 2020-05-16 02:16:52 -05:00
AzaezelX 8aa03a4ac9 uninitialized variables-renderinstance
(cherry picked from commit dcbc22bf8450250f192ae56b303affd760f63db1)
2020-05-11 15:17:09 -05:00
AzaezelX 1a33d483a3 ensure we've got a known stateblock set for GeneratePrefilterMap 2020-04-14 12:40:31 -05:00
Areloch 6ade6f08ce Updated Assimp
Added initial behavior for ImageAssets to hold a list of GFX resources of different texture profiles to avoid mem leaks with incorrect-typed usages
Added function to ImageAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Added function to ShapeAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found
Disabled fields for dynamic and static shadowmap refresh rates
Moved noShape model to core/rendering/shapes to place it in a more logical module position
Added an include to avoid undefined type compile error and removed unneeded semicolon from zone code
Added call to reload probe textures when a reloadTextures call is made
Adjusted default directional light shadowmap settings to not be as extreme
Added utility function to probe manager to allow any class to request a 'best fit' list of probes that would affect a given location, allowing other classes such as fog or particles to utilize IBL. Also updated probeManager's forward rendering to utilize same function to reduce code duplication.
Shifted shape loader code to utilize assimp for loader consistency and testing
Changed render bin used for SSAO postfx so it runs at the right time
Made Core_Rendering module scan for assets
Updated loose file references to a number of assets to follow proper formatting
Refactored asset import code to follow a more consistent object heirarchy structure on importing assets, allowing more reliable cross-referencing between inbound items
Updated asset import logic for materials/images so that they properly utilize ImageType. Images correctly save out the assigned image type, materials reference the images' type to know what map slot they should be used in. Importer logic also updated to better find-and-add associated images based on type.
Cleaned up a bunch of old, outdated code in the asset importer
Added initial handling for in-place importing of files without needing to process them through the UI.
Added ability to edit module script from RMB context menu if torsion path is set
Updated list field code for variable inspector to utilize correct ownerObject field
2020-03-19 09:47:38 -05:00
AzaezelX d75593bf6f hooks up missing probe capture filters 2020-01-01 22:37:27 -06:00
Brian Roberts c0226d4640 mac crashfix and compilation correction. the former's down to a typo, the latter, needed specification for which class->setTexture(near identical sig) to use 2019-12-05 21:30:01 -06:00
Areloch 72ceede272 Added Forward Material debug viz for HLSL(so far) and integrated it back into editor flagging.
Re-added logic to track existing probe shader consts instead of constantly recreating it
Added logic for pre multiplied translucency mode
2019-11-21 00:48:55 -06:00
AzaezelX 501990c3b6 from @rextimmy: ssao work
shifts ssao from the vectorlight to ibl-only via the reflectionProbearray postfx shader
2019-10-31 19:06:40 -05:00
Areloch ff4c2d59fc Utilizes old method to clean up tree items in GuiTreeViewCtrl to resolve guiEditor crashes
Updates probeManager to correctly utilize skylight idx to infer if a skylight is active, and set the SKYLIGHT_ONLY macro correctly, resolving erroneous behavior
Cleaned up some of the guiEditor initialization script to remove redundancy
Cleaned up tools modules loading script to remove redundancy
2019-09-18 01:41:57 -05:00
AzaezelX 9859d9b7bc 'correct' refscale back to mismatching between forward and deferred. Because Reasons. >.> 2019-07-21 23:01:15 -05:00
Jeff Raab 38b0d0f1fe Updates names of probe forward shader consts to be consistent with shadergen, allowing proper data throughput 2019-07-16 09:34:31 -05:00
AzaezelX e83eabcb87 refbox calc parity, and killed off some doubled up alpha subtraction 2019-07-14 10:44:50 -05:00
Areloch 98f50a4453 Fixed probe cubemap reindexing assignment
Fixed BRDF texture binding in forward pass so it doesn't screw with the probes or regular lighting results during bakes
Fixed early-out check on probe manager so probes can be rendered during reflect pass as well.
2019-07-10 23:41:55 -05:00
Areloch e87dc787ee Corrected probe init'ing so they don't fight for the cubemap idx order
Also correct deleting behavior so it updates indicies when a probe is removed
Updated forward lighting to utilize the same math as deferred
2019-06-30 23:04:16 -05:00
AzaezelX 4d714091b7 missed a few conversions 2019-06-28 10:56:38 -05:00
AzaezelX 01f6938746 nomenclature shift for clarity: bunch of stuff tagged as probe that refferenced things properly tied conceptually to the reflection refrence box. 2019-06-28 10:21:50 -05:00
Areloch af77444ec9 Merge branch 'MatInstanceViewer' of https://github.com/Areloch/Torque3D into Preview4_0
Fixed up forward IBL
Reimplemented old forward light shader code as a baseline so it can be updated to new PBR math
2019-06-27 00:36:56 -05:00
Areloch e5c12f4aab Reduce console spam from probe manager when not in debug
Added ability to activate height override on inspector fields from script
Further refinements of theme usage as well as editor settings
2019-06-17 23:48:20 -05:00
Areloch dd3422b5a2 Added ability to pass ints to post effect shader consts
Reorg'd probe init to flow better and be more robust on load
Cleaned up various parts of the probe render manager to be more stable
Fixed issue with crash on release due to numProbe in loops being 0
Updated glsl probe array shader
Beginning of rework of editor settings
Beginning of conversion of asset import config to similar system as editor settings
2019-06-13 00:37:12 -05:00
Areloch b40d33a663 WIP of shifting the skylight cubemap to be packed into the cubemap array 2019-06-05 01:04:47 -05:00
Areloch 27b304eec3 Various fixes
Separated baked cubemap load/processing logic into a separate function for clarity
various corrections for when fields change so it properly notifies down to the client
Fixed enable flag logic to actually work
Fixed skylight enable flag so it properly disables if flipped off
2019-06-05 00:07:46 -05:00
Areloch a552471e4e Reorg of the probe initialization/update code to streamline parts of it, and make it flow more obviously
Added some initial asset stuffs for Das Boot for building out a better testing level.
2019-06-04 00:21:52 -05:00
Areloch 17cec11b97 Added refactor of Editor Settings window
Various fixes for asset handling.
WIP of crash tracking
2019-06-03 02:47:30 -05:00
Areloch 8196ad9d32 Removed old code that set the BRDF texture and caused a texture profile conflict with the probe array post effect, leading to a crash.
Renamed hasSkylight to mHasSkylight to avoid var ambiguity.
2019-05-26 03:13:16 -05:00
Areloch 3fa7a0d4fa Various fixes 2019-05-11 21:42:27 -05:00
Areloch cedbd387d9 Updating BaseGame to work with PBR, and a PBR example module 2019-05-08 01:27:51 -05:00
AzaezelX ae752a04e8 remed out stray code cleanups, added more remmed out code for referencing the way defered calculates bbminmax (as a percentage of the probes actual scale so folks can just copypaste most times) 2019-05-05 18:30:40 -05:00
Areloch bd170b5abe WIP of forward probe scoring. 2019-05-03 00:03:58 -05:00
Areloch 4e557aec83 Added fetch for BRDF texture for forward rendering use, re-enabled brdf logic in the lighting shader and got the probe arrays properly sampling into forward as well.
TODO: core::rendering pref on the BRDF texture instead of hardcode path, add best-pick logic for forward probes and double-check ogl forward is playing nice.
2019-05-02 00:05:12 -05:00
Areloch 65fb8bc5f3 Ongoing fiddling with correcting the forward render behavior. 2019-04-29 00:07:38 -05:00