Commit graph

60 commits

Author SHA1 Message Date
AzaezelX 5ffa3b81f1 dial back nullPtr usage
while it still remains a good idea to port as many NULL compares and assignments over to nullPtr as feasable, we do still need to sort out how to better support scripted empty, false, and zero assigns for things like objectIDs.

this means we'll need to both fully convert the backend of the parser to support that kind of thing, but also alter most if not all exisiting NULLs. up to and including things like SAFE_DELETE. while that's certainly feasable, given there's aproximatel 400 nullptr assigns/checks prior to this commit, and roughly 1800 of the prior, if it terminates in a script call and not an aip one direct, we'll be dialing that back until such time as fork fully fopcused on converting and resolving any lingering mismatches is completed.
2025-12-29 17:45:09 -06:00
AzaezelX 022f8d1732 set GFXTextureManager::_validateTexParams to respect sen mipcaps
also kill console spam
2025-08-04 14:36:11 -05:00
AzaezelX 3cdbd4e87e don't let GFXD3D11TextureTarget::deactivate() try to generate mips if we haven't told that target to do so 2025-08-04 14:11:00 -05:00
AzaezelX 7aa4ea75a6 typofix 2025-08-04 12:48:22 -05:00
AzaezelX cacd8a6064 mipwork, laregly courtesy of @mmarauder2k9-torque 2025-08-03 20:25:31 -05:00
AzaezelX 83a3ef877e don't trace setShaderConsts or onNewMessage callbacks
they spam up the console to uselessness when using the trace(true/false) command
2025-06-09 13:35:32 -05:00
AzaezelX 1e2b6c4e35 remove shaderconst timer clamp
looks ike the postfx shaderconst update cycle rate limiter is the source of our flickering
2025-05-30 20:01:30 -05:00
AzaezelX 091b75930b postfx throttling
don't execute shadercont updates via callback more than the standard tick
don't execute preprocess more than once, unless explicitly reloading
2025-05-18 09:59:12 -05:00
marauder2k7 73ad92b757 review notes from Az
Should render fallback for namedTarget if namedTarget fails
Add safety around namedtarget getTexture to stop assert
Missing assets should revert to fallback image and print a warning to console
Remove REFACTOR tag from all macros.
2025-03-30 11:22:42 +01:00
marauder2k7 d86962d1fd requirements for postfx
update to handle posteffects with image_asset_refactor
2025-03-26 14:31:11 +00:00
AzaezelX ffe83b1d2d use the same renderpriority range across all cases 2025-03-18 01:18:37 -05:00
AzaezelX f633ef3a3d fill in the validated variables 2025-03-09 11:53:23 -05:00
AzaezelX fe26ffc375 shift capturing from a globalMacro to a sceneRenderstate S32
lets us ditch shader recompilation so that can be done on the fly without hitches, though does cost us a per-shader const for objects and postfx
2024-04-16 13:51:41 -05: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 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 90cb07a550 uniform float targetRatio; var by request 2022-09-04 13:15:50 -05:00
AzaezelX 6474413aaf fix reported ASAN crash 2021-11-16 12:40:22 -06:00
AzaezelX e211f502e8 better handle old style references to named texture targets 2021-11-04 15:44:43 -05:00
AzaezelX e45b959d7d correct imageassetarrays having a singular texture profile as oposed to a type per.
while that certainly works for most cases it falls apart when dealing with postfx where it's an unnamed array of variable types of inputs.
shifted the profile assignment to #define INIT_IMAGEASSET_ARRAY(name, profile, index) so there's still a really obvious point where you can see the default setting, even if it's not in the more desireable OG definition spot
for postfx in particular, given we can swap that, provided an example of how to do just that
2021-11-03 12:30:52 -05:00
AzaezelX 98a079a797 code duplication prune. should aid in stability 2021-10-03 02:56:26 -05:00
Areloch 5525f8ecdd Converts all game, gui editor, and system classes to utilize assets
Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
2021-07-19 01:07:08 -05:00
Lukas Joergensen e1a6fa01ca PostEffect: Rename isEnabled field to enabled, to fix name clash 2020-11-15 21:30:45 +01:00
AzaezelX 28e4a86cff forgot the initializers and shader variable to source hooks 2019-09-06 14:48:15 -05:00
AzaezelX 022b87cac2 from user Ewyncat: adds invcameratrans, cameratoscrren, and screentocamera postfx and shader matrix interfaces.
also a bit of backend work to normalize those later once we've proof-of-concepted the calcs
2019-09-06 14:25:17 -05:00
Areloch 07b28cb29a GFX card profile config file logging moved to debug only
WIP mode of guiSliderCtrl to be a filled rectangle instead of a textured UI
Fixed bug with guiTextEditCtrl losing focus updating history passing malformed strings
Updated WIP options menu
Editor/Project settings WIP
Updated editor theme to be consistent, and feed off the editor settings
Updated popup menus to reference renamed profiles
Added more in-progress modules for examples/stress testing
2019-06-17 02:30:45 -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 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 87e9d3edbd Correct stateblock settings to display probes more correctly without crushing other forward elements. 2019-02-18 00:43:21 -06:00
Areloch fd8840ff53 Updated the PostFX ability to setShaderConsts and cubetextures for probes 2019-02-12 01:10:30 -06:00
Areloch 64db2b1d15 Ongoing PostFX org rework. 2019-02-11 00:17:53 -06:00
Tim Barnes 6e17475f86 WIP shader work - not complete! 2018-11-02 09:08:45 +10:00
Areloch 25686ed4be Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy 2017-06-23 11:36:20 -05:00
Areloch edd1e0a270 Removes Direct3D9 functionality. 2017-05-28 16:51:31 -05:00
Areloch 124ecb2fe0 Merge pull request #1984 from FooBarbarians/fix-1912
Reordering initialization methods #1912
2017-04-26 01:11:51 -05:00
Masquara 15f67015d3 Reordering initialization methods #1912 2017-04-19 14:02:45 -04:00
Areloch ed14b6fced Removes bits of code and includes that are based on old 360, xbox and PS3 flags that are no longer needed. 2017-04-08 20:30:57 -05:00
Areloch 1ed8b05169 Initial implementation of the new Base Game Template and some starting modules.
This makes some tweaks to the engine to support this, specifically, it tweaks the hardcoded shaderpaths to defer to a pref variable, so none of the shader paths are hardcoded.

Also tweaks how post effects read in texture files, removing a bizzare filepath interpretation choice, where if the file path didn't start with "/" it forcefully appended the script's file path. This made it impossible to have images not in the same dir as the script file defining the post effect.

This was changed and the existing template's post effects tweaked for now to just add "./" to those few paths impacted, as well as the perf vars to support the non-hardcoded shader paths in the engine.
2017-02-24 02:40:56 -06:00
James Urquhart 64b751a7c8 Basic port of code 2016-09-11 22:42:42 +01:00
rextimmy 41e5caf22b Direct3D11 Engine/source changes 2016-03-20 21:52:11 +10:00
Areloch 3a18819e1e Issue found by PVS Studio:
Several instances where we utilize a pointer variable without properly testing that they aren't null first.
2015-07-28 23:25:09 -05:00
Areloch 2002d74b78 Issue found with PVS-Studio:
Many instances of a function or expression being used repeatedly, which can lower performance.

Fixed it in these cases by creating on local var, reference or pointer that's used instead.
2015-07-13 22:51:17 -05:00
James Urquhart 3a457749ec Oculus VR DK2 Support
- Updated to work with 0.5.x SDK
- Uses Oculus Rendering rather than PostFX
- Stereo rendering refactored so more rendering info is grabbed from the DisplayDevice
- Implements an Offscreen Canvas for in-game gui with oculus
- Message dialogs and metrics display can now go to the OffScreen Canvas (if oculus demo is setup correctly)
2015-05-06 23:09:51 +01:00
Vincent Gee 9bd6d2e614 This just adds some console spam if the PostEffect Texture isn't found. I had a problem back where it was that I mistyped the texture and it took hours to find it. This way you know right away. 2014-11-30 21:47:45 -05:00
LuisAntonRebollo a4c8e1d881 Merge pull request #934 from BeamNG/postfx_opengl
Changes on PostFX for OpenGL.
2014-11-30 02:23:02 +01:00
LuisAntonRebollo 3e7c7b3e49 Merge pull request #622 from BeamNG/texel_pixel_offset
Handle texel-pixel offset with diferents graphics APIs.
2014-11-30 02:20:45 +01:00
LuisAntonRebollo 1c95ce21d6 Merge pull request #608 from BeamNG/use_gfxdevice_setupgenericshaders
Use GFXDevice::setupGenericShaders for support non Fixed Fuction Pipelines.
2014-11-30 02:20:00 +01:00
LuisAntonRebollo 823b413c1f Handle texel-pixel offset with diferents graphics APIs. 2014-11-27 00:59:17 +01:00
LuisAntonRebollo eb200c988c Changes on PostFX for OpenGL. 2014-11-08 18:56:39 +01:00
Daniel Buckmaster 1702573b78 Merge pull request #612 from GarageGames/platform-type-consistency
Platform type consistency
2014-05-10 11:40:40 +10:00
LuisAntonRebollo 33742599b3 Use GFXDevice::setupGenericShaders for support non Fixed Fuction Pipelines.
OpenGL and DirectX11 not support FFP, and GFDevice::disableShaders has not the necessary information to decide the shader to be used.

GFDevice::SetupGenericShaders is used instead of GFDevice::disableShaders.

GFDevice::disableShaders will be deprecated on T3D 4.0
2014-04-13 17:57:40 +02:00