Converts a String to an std::pair of int64_t (long long), which contain the size or 0 if none could be parsed. Any delimiter except digits(0-9), a minus sign(-) or a plus sign(+) between width and height are allowed. If a plus or minus sign is used as a delimiter, it must immediately be followed by the second size number. This allows for formats such as: 100x100, 100:100, 100p100, 100@100, 100+100 and so on, but not formats such as 100+:100, 100ThisIsSomeReall+yLongText100, etc.
The parameter 'allowSquare' also determines what to do when the height parameter is not found. A value of true will have the function return <width,width> instead of <width,0>.
This utility class is used to quickly render and retrieve a Texture from a source. It should be used in place of manual rendering since it can be updated quickly, fixing outstanding issue in all places of the plugin instead of just one.
The custom allocator occasionally returned memory that was aligned, but did not have enough space to store the actual size due to a calculation error in the size. This resulted in situations where allocating 1022 bytes would give you a writable buffer of only 1020 bytes or less, or also known as writing into unknown memory, possibly even the heap. This is now fixed by doubling the padding used.
Additionally it will now default to using standard allocators, which should work better and rely on the Compiler.
- Shaders now have all promised special variables available to them.
- 'Pass' (int) is no longer a special variable.
- Files should now properly update every half second.
- Fixed a ton of compiler warnings.
- Forced loading shaders from text instead of files to avoid caching.
- Fixed file modification tests always failing.
- Actually renders shaders now.
Known issues:
- Parameters aren't updated with file modifications unless the file is actually changed in the UI.
HasParameter can be used to safely check if a parameter exists and such should be preferred over try-catch blocks. Additionally, SetFloat2, SetFloat3, SetFloat4, SetFloatArray, SetInteger2, SetInteger3, SetInteger4 and SetIntegerArray should no longer cause rendering issues due to invalid buffer sizes.
### Plugin
- Shipped files should now be actual images instead of broken images.
### Source Mirror
- Fixed a memory leak caused by not releasing the mirrored source.
- Fixed a rendering slowdown caused by trying to render the source inside an effect loop.
- Fixed 'Point' scaling not actually using the correct sampling.
- Implemented an option for Source Mirror to keep the original size even if rescaling.
Custom Shader allows you to write your own effect files and just have them applied to your source(s). It will dynamically update the properties to match the parameters in the source as well as offer some special parameters to the shader.
# Conflicts:
# CMakeLists.txt
# data/locale/en-US.ini
# Conflicts:
# data/locale/en-US.ini
Scaling was previously incorrectly rendering the source with another effect forced onto it, resulting in slower rendering and some sources that would no longer render properly.
Additionally the new option allows the user to have the source render at the original resolution in order to allow previously applied transform to stay identical. The rescaling however will no longer apply to filters after this source then, thus the speed bonus is lost.
Also categorized the localization file and adds descriptions for existing and new properties for Source Mirror.
Allows code to directly use GS::Vertex for their own purposes without having to rely on GS::VertexBuffer, which comes with the added overhead of allocating GPU memory.
- Switched all filters and sources over to new initialization code.
- Fixed a 32-bit crash on machines with CPUs capable of SSE caused by Vertex Buffers.
- Reduced memory requirements of Vertex Buffers by ~60%.
- Removed a superfluous reallocation, loop and copy from Vertex Buffers.
Changes the GS::VertexBuffer storage to be one continuous buffer that is properly aligned and is also now used for GS::Vertex. This halves the necessary memory, removes reallocation cost and removes the copy necessary to get things onto the GPU.
Related: #9
This unifies the logic in GS::IndexBuffer and GS::VertexBuffer so that both can take the same amount of vertices. Additionally the limit for vertices was increased to 16777216 from 65536 to allow for proper models to be stored.
The previous fix unfortunately didn't actually fix it and instead made the crash invisible at first and then corrupt the heap at a later point. With this, VS2013 and VS2015 create code identical to what VS2017 creates, and no longer seem to crash.
Related: #9
This fixes the crash on creation issues, but a crash on exit still happens with the plugin installed. Unsure what exactly is causing it but it looks like something is writing into heap memory.
Related: #9
A bug in Visual C++ 2013 32-bit & 2015 32-bit causes the C++ compiler to incorrectly align the vec3 and vec4 structs to 8-byte instead of 16-byte, resulting in a crash if the target PC supports SSE. Visual Studio 2017 and 64-bit builds are not affected.
Related: #9
- Improved initialization code to ease future development.
- Fixed several possible crashes in the GS subsystem wrappers.
- Fixed 'Blur' filter color being wrong due to non-power-of-two textures.
- Improved 'Blur' filter error reporting for better debugging and support.
- Fixed 'Blur' filter crashing OBS on GPU reset, better support for this is added in a future version of OBS.
- Fixed 'Blur' filter occasionally just not working.
- Added 'Source Mirror' source which allows you to add filters to a source without modifying it as well as rescaling it.