fixed more merge conflicts (afxZodiac and MaterialDefinition)
Updated cubemapdata to use refactor asset
added new part to image_asset macro to create a private asset if the file exists.
updated reflectionProbe errors to actual function name where the error occurs.
bump default fidelity from 0,0001 to 0.01
fix F32Range. needs to go from - to +, not smallest to largest positive value
fix several misasigned validator ranges. most of which use some form of -1 default to do a Special Thing
report *what* field is an invalid console type
prune down floating point fuzzed validators to 0
default the visual fidelity to POINT_EPSILON (0.0001) rather than 1/FLT_MAX
use the bit(bitcount) macro for legibility
fix breakangle
as well as inspector support to treat a significant chunk of the codebase as range-clmped values which can take a guisliderbarctrl with a configurable at the validator level fidelity variable
additionally adds a new addfieldV and addprotetedfieldV for further callback validated slider-presented variables
*also* adds an on additional callbacks to the inspector itself, like onPreinspectobject, onPostinspectObject, and onPostInspectorfieldModified
in addition to *that*, adds a new hidefield command to tag a given specific field not to show in inspector
adds the following behaviours: onPostAdd, send an updatePath event so that paths created post-pathOnMissionLoadDone command can register with clients (like say when they are loaded from a submis)
for editing tool purposes, allow Path::SetTransform to impact child objects so that pre-existing ones can be copy/pasted without the markers ending up in the same spot, or so that you can shift the entire path around and have those move in a relative manner
dx11 has a 2048/6 cap on how many cubemaps can fit in a given array. bump the probe count up to just under that to buy folks head room while we work on revising a more robust solution
adds a pause, reversed, and significantTime inspector exposed variable to guiClockHuds
significantTime is in sceconds and triggers an onSignificantTimeReached callback
splitTerrainMaps("data/some/file"); or makeTerrainMapsFrom("module:anAsset"); to take a detailed albedo map and split it into a _bas(is) file thats an averaghe of the inut and a _det(ail) file to raise and lower different channels from that average.
special note: while used primarily for terrain authoring, these files could also be plugged into a normal material
* Fixed issue of creating new SubScene using the full level template instead of a blank level file
* Fixed subScene inspector field handling so clicking the create new will mark the 'in place' created level asset as a subscene appropriately
* Changed up persistenceManager logic when parsing objects out - especially with specialty fields - to use Strings instead of const char* to simplify memory juggling and improve stability
* Rolled back specialty array field outputs for decal roads and convex shapes to have the field names in the output again
* Added sanity check for MeshRoad's when writing out via specialty array field to ensure there are profile nodes before trying to write any
* Added sanity check to avoid pointlessly writing out meshroad and river position field into subScene file as it could cause a transform double-up and cause them to move when loading from a subscene
According to doc and man pages we should not be using %Lg for a double as %Lg relates to a long double, F64 in torque is just a double so. This also produces better results when going from colorF to the colorPicker dialogue
moved error printout in guiType guiControlProfile incLoadCount inside a check to make sure the profile has a bitmap asset set.
remove older typeImageAssetId from group and variable inspector classes
Few fixes to display float values if the inspector field asks for floats
Split Hsb out from colorI now linearColorF can return HSB from its own color without having to go through the colorI conversion, hopefully gets rid of rounding errors etc since we are only doing the calc once.
Adds eye dropper functionality
adds eye dropper button image supplied by jeff
adds a few missing asset files (due to in asset browser scan and add all loose files)
had a bunch of dupliated code injectors that are bypassed by the nature of AbstractClassRep::FIELD_SpecialtyArrayField
since those getSpecialFieldOut entries return a const char * from the stringtable, we *don't* want to try and kill those off, since that can lead to trying to delete deleted things from what was designed as a permanent record
classes using AbstractClassRep::FIELD_SpecialtyArrayField use an explicit-writing mechanism, rather than tying things to a variable 'slot', so don't try and concaenate the two
Multiple fixes in files sent by Az but matrix look at function was creating a view matrix that messed up the capture.
Look at function for matrix now returns the correct matrix and bakes looking better
Reverted to the original calc clip space aabb to fix flickering bug reported by Rod in discord. Unfortunately this reintroduces the original issue of faint shadows showing at all times on the first split. But shadows render correctly where they are expected. A full review of pssm is required for later updates to be made.
Added logic to ModuleManager's findModules method to allow priority sorting as well as pre-filtering by a given module group
Adjusts the %isFine argument for the onMapLoadFailed callback events to %canContinueOnFail for a bit more clarity on what the arg conveys
Shifts the setSpawnObjectType, setSpawnPoint and onPostSpawn call stack to utilize an event manager to allow the setup process for spawners and gamemode prepwork to run in it's own time, if needbe. Such as if a gamemode has to generate a map and there's no guarantees on when it'll b e done for one client vs another
Added getModulesAndGameModesList, callOnObjectList and getNumCanCallOnObjectList utility functions
copies over .in and .cmake files for those cases when libraries themselves need to self-configure
searches for a source/libs/libs.cmake file for any torque-specific confiugurations we need to make for a given library
autoinclude any source/wrappers directory for unique to orque files, which will most commonly be data holder classes and script exposure, as well as adding those dirs to the #include listener list
also ditches forcing warn levels to lowest for libraries since if folks are going to experiment, best tey know about anmy underlying things to avoid
Fixes behavior with gamemode selection in ChooseLevelMenu so if there is only one gamemode, it is auto-selected and advances to the level selection
Update ExampleLevel in ExampleModule to have updated gamemodes field name
new /= operator in point4f
_calcClipSpaceAABB in pssm no longer uses radius just transform points into light space and do min max
_roundProjection matrix also optimized.
the key part of this issue was to invert the order we were baking the faces. Not much of a fix but it works better than before need to get a proper fix implement
the way the issue is copying X+ into every other face but isnt doing it in the reverse order means the rtv for face 0 must be being replicated into all other faces.
Added mode toggle for if changing the transform influences the child objects of a SubScene or not
Added onSelected/onUnselected callbacks for SimObjects to allow contextual behavior in the editor
Added functionality of programmatic/dynamic Tool Button Palettes
Added logic so when selecting SubScenes the world editor palette has new buttons for letting the move/rotate actions influence the child objects
Shifted to utilizing SimGroupInterator and persistenceManager to fix saving issues with SubScenes
Shifted to utilizing SimGroupIterator for Scene saving to standardize and minimize object misses
Changed prefab load file logic to add loaded child simgroup to rootscene for consistent tracking and avoiding conflicts with subScene's hijacking the ImmediateGroup var
Reduced duplication of build<type>field callback for inspectors
Added more standard field type lookups to inspector group when creating a field to avoid misses for types like 'F32' or similar.
Folded the added-on MinSize/MaxSize/SimgroupSelect fields for SimGroup editing into a single compound field and fixed bugs with it's behavior so it works as expected now
adds an isValid(gridinfo tile) command to prefilter out grid elements of a specified nature
applies that to SetEmptyAction::process
also corrects sliderbar positions for terrain painting elements, as ell as adds a min/max slope for removal
potential TODOs: apply it more places pending feedback. add a min/max hieght filter as well
Fixes for child iteration of subscenes
Renamed tripCondition field in triggers to tripIf for consistency/naming clarity
Added ability for callbacks for gamemode to have reference on which subscene was loaded/unloaded for respective callback
Adds loadIf conditional logic to evaluate if a subscene is 'allowed' to load when tested
Adds isAlwaysActive to GameMode to be able to flag a gamemode as being defaulted to on and used automatically
Updated GetGameModesList function to return an arrayObject of the gamemodes found
Overhauled CallGameModeFunction to utilize the gamemodes list with active/alwaysActive modes being called against, rather than level-scanning
Updated ChooseLevelMenu to be able to toggle on/off multiple gamemodes with an image indicator if it's active or not
This streamlines much of the code and makes it easier to find and follow how different asset, object and file types are handled by the asset browser
Also clears out various bits of cruft and old commented blocks of code
Standardizes Gamemodes to be an actual class with data and utility functions that can be parsed
Adds inspector field handling for selecting gamemodes
Updated Scene class to work with Gamemodes for the gamemode field
Updates editor suite elements to be able to create SubScenes, SceneGroups and Gamemodes
Adds ability to convert SimGroup to SubScene
Updates BaseUI's chooselevel menu to have gamemode selection and filters shown levels based on selected gamemode
further ensure sound playback isn't even started unless the test condition is true and the gui element is awake
remove redundant sfx->stop(). already does so with SFX_DELETE(source)
ditch description: not needed.
set process ticking off when the gui element is put to sleep
for the case of re-use of 3d sounds, set emission to the listener position
now openal and sdl are embedded in the app bundle along with their symlink alternatives
clear out the openal framework and use the embedded dll instead
archiving works and will produce a notarized app if you provide the correct information and enable hardening.
further tests showed issues with inverse function, now to better match what was originally happening, the inverse only happens on the 3x3 portion of the matrix and translation is handled separately.
Frustum test now uses more real world examples of a projection matrix. Test for the full unproject stack of math to test its result as unproject was where the issue about inverse originated
added more unit tests to match values between templated and matrix
tests showed discrepancies in affineInverse, fixed the function to return what is expected.
apparently templated classes need all functions to be inline, otherwise unresolved symbols
macro for switching between matrixf and templated
few functions that were missed
Changed:
if check on vals now return true if the value has a string value
%val = "test me" if(%val) will now return true since %val is not null
Script side:
string checks for "true" and "false" will now be parsed as integer values of 1 and 0.
TEST VIGOUROUSLY
Fixed: convex and shape nodes are now the same transform as the target nodes
Changed: addNode now has the target at the end of its call for backwards compat
Fixed: renameNode was overwriting addNode calls, should not have been so
ADDED: functionality to clean nodes out of the script that are related to a specific target
ADDED: functionality to clean multiple addCollisionDetails from the script
ADDED: ColConvex get added as nodes now and dont just get skipped (for future reference ColMeshes are checked for colConvex are not but this will be needed in future)
Removed: erroneous deletion of nodes and meshes from shapeEditorActions tscript file.
Adding multiple collision hulls and shapes through the shape editor now works as intended though with multiple convex hulls it does produce a few lag spikes on first load of the objects.
repurposed and renamed the 2 sliders in the gui to be for settings in vhacd
added the drop down for fillMode types but it is not hooked up to source yet
final cleanup removal of the old convexDecomp library
ADDDED: library for the floatmath from v-hacd resource, required for fit sphere/capsule/box functions
renamed ThreadPool to TorqueThreadPool to avoid conflics
fixed data transmission between stages of convexDecome and trimesh creation
TODO: re-add our own functions for generating sphere/cylinder/box
fix a crash caused by having boundingBoxCollision on, while projecting the mouse so that there is nothing between it and a globalbounds object
it would seem we're somehow ending up in a state of WorldEditor::collide returning true it hit somethging, but NULL as far as *what*
until we properly fix this, doublecheck to make sure the hitObject isn't NULL before we start trying to reference membervars/methods
Updated Trigger triggeredBy field to utilize new enum type for editing
Updated MaterialDefinition's animFlags field to utilize appropriate enum type for editing
Fixed image reference in bitmask inspectorField type to use correct image asset name
Adds handling for complex fields such as Point2, Point3 and Point4's to be able to apply value changes to only one axis across a multi-object set without affecting other axis'
now torquescript will print out a more modern error message with a pointer to the offending character.
Multi line error outputs to be added to this for context
stb loader was spamming NO SOI with the function of stbi_info_from_memory because it checks for a jpeg first. This will always return an error if you are sending any other format. Remove this check and just load the memory stream. if it fails to return pixeldata then we have an error.
SFXResource was always creating a new file for each sound resource. Sometimes this would happen 3 times since the asset was creating a resource, then the profile, then the object that was using it.
Now if the sfxResource exists and we call openStream it returns the sfxFileStream linked to that file instead of just creating a new one.
fix for stereo files (2d sound files) frames report back as bytesPerSample * channels
which for us is bytesPerSample. This needs to be applied to the return from read so sfx resource knows we have read all the info.
Ogg file from libsndfile now working. we can pull more information from the format and specifics of the file from libsndfile should maybe look at updating all the parameters around mFormat so it feeds openal settings better.
Next step is to remove the other stream classes.
read an ogg file through libsndfile instead of libvorbis.
There are still issues with this part of the file opens but doesn't read the whole file for some reason
added libraries:
opus
flac
libsndfile
updated:
libvorbis
libogg
openal
- Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
mac was failing to generate an archive.
Icons now in an app asset so it can be properly modified in the project instead of being a static .icns file.
Info.plist now gets its bundle name from the product bundle identifier field, this means it can be changed through the gui instead of having to manually modify the bundle identifier. All other settings are left blank.
Info.plist will need further updates to take values set in Xcode to make it easier to distribute apps.
OpenAL and SDL have to skip installation in release mode builds for the archive to be created correctly.
for imageassets and materialassets, check any other assets using them, and uppon completion of reloading, kick off the using assets reload as well in serial
changes required to get masox to run.
Some further changes possible required around resourceHolder in future.
The geometry shader works in macosx with gl version 3.3, though i do think some changes are required internally to account for a lack of OUT_col%
now shaders ask the device to create a buffer, if a buffer of the same name and size already exist then a pointer to that buffer is returned instead. Going to see if something similar can be added to the opengl end.
opengl can now compile with ubo buffer objects similar to cbuffers on dx side.
cleaned double up of data from both sides, gfxhandles only need to use the desc info instead of holding onto its own.
deleteSelection when an output node had multiple connections only the first one was deleted, needed a new function to return a vector of connections that are now looped and deleted at the end of delete selection.
few other minor additions and fixes.
add the extra functions for drawing gui elements
RoundedRectangle:
All draw rect functions now pass through roundedRectangle which uses a shader and can draw borders, and rounds the corners
Draw thick line:
draws a line thicker than 1 pixel, uses a geometry shader to do this
Draw Circle:
Draws a circle with a border parameter.
Adds the ground work for geometry shaders
Expands shaderData and gfxShader to allow for more shader types
note: when building a GFXShader in source you have to call setShaderStageFile with the shaderStage and the filepath for that stage.
Once we add compute shaders this will become more apparent as compute shaders are a stage of their own and do not require vertex and pixel files whereas other shaders sometimes do.
Incorrect cmake directory was messing up reading from zips
STB was failing to read from zips, it was failing to get the file info, something we were using as an early out, now if that files on the filepath, we use the memory read instead since stream needs to be a success to get to that point.
Reverted back to a 2d array since when the const buffer changes are made to the shaders they will be completely swapped out for a 1d array with a max size of 16 for the program, id3d11buffers will be shared across shaders apart from object buffers. We still need to decide on a structure to get everything setup so to keep functionality a max of 2 buffers per stage with 1 buffer as a padding so we can start coding constant buffers right away
need to reverse the bitshift on shaderstages so we get values between 0-5, need to also revert the mBoundConstVec back to a 2dimensional array so that the binding point can be dynamic as well.
Added multiple descriptions to handles.
While maps are very efficient and match data very quickly due to hashing and what not, they are tricky memory wise, we cant clear them if they are only made up of structs and enums. Need to explore other methods for doing this. Original system had a sub buffer system with a check based on whether the handle was marked vertex/pixel. With 6 stages possible now we need to think of a more effective method. Since shaderstage is now a bit flag maybe some sort of streaming setup could be used to write without a loop.
working example, renders all gui controls.
We still cant render a scene, something to do with the constant buffer at slot 0 of the vertex shader being too small..... gotta figure this one out..................
up custommaterial inputs to 16
add Material::PhotometricMask:handling to processedcustommaterial
and for paranoias sake go ahead and be explicit about _getLightMaterial (those *should* be unneeded as they optionally default to that, but it's how they were in the beatup fork during testing)
Refactored DX Shader compilation and reflection to be more similar to opengl
Added support for more than 1 const buffer per shader stage.
This is boilerplate code, no functionality yet, that will be added in further commits. Though this builds without errors do not try and run it at this point.
Updated IES loader to use torque math functions and calls in the problem areas for mac and linux.
New F32_MIN_EX which is lower than F32_MIN (required for ies profiles)
Both ies and cookies can now exist on a light
We are still not using all the capabilities of an IES profile, such as candela and luminance values we are just using them as a mask for the moment
Issues compiling on mac and linux, will need to update the ies-loader to use torque methods instead of std::
ADDED: Ability to add IES profile as the cookie texture slot in both point lights and spot lights
TODO:
Have the IES Profile also drive the settings for the lights.
Make it work with Cookie textures. IES profiles are to be another slot in the advanced light section.
note this *does* require a baked skylight in the main scene
todo: track down why a similar protocol does not operate for guimaterialpreview and guiobjectview