Commit Graph

2787 Commits

Author SHA1 Message Date
116de5733c Fix upside-down and vertical effect misalignment issues.
If anyone else can come up with a solution that doesn't involve up to three vertical flips, please implement.
2023-10-06 22:11:02 +02:00
483b32d546 Set library base name once in top-level CMakeLists.txt.
Will avoid making errors in future versions. Include dirs still are hard-coded, as they partially exist as paths in the source tree.
2023-10-06 12:51:22 +02:00
ce56c3ed09 Fix filenames of static libraries.
These were missing the "-4" suffix, and the static playlist library also used underscores instead of dashes.
2023-10-06 12:41:43 +02:00
70132f18e6 Updated build instructions. 2023-09-19 18:38:43 +02:00
b88f96b780 Fix CMake scripts, so they can be used via add_subdirectory(). 2023-09-19 18:38:43 +02:00
70c29af884 Added build check script for Android 2023-09-19 18:38:43 +02:00
cadcdda6b4 Add output for which GL implementation we build and always use GLES on Android 2023-09-19 18:38:43 +02:00
5fe105cb31 Don't search for desktop GL libraries if any GLES component is requested 2023-09-19 18:38:43 +02:00
c93e80bcc4 Updated build status badges in README.md 2023-09-19 17:49:51 +02:00
c08de98a7d Properly initialize u/v texture size for motion vectors. 2023-09-11 10:19:49 +02:00
48b8d6a0aa Restore framebuffer bindings after modifying texture attachments. 2023-09-11 10:19:49 +02:00
c266599933 Instead of color masking, attach/detach the motion vector u/v texture.
Only GLES 3.2 supports glColorMaski, which would exclude any platforms only supporting GLES 3.0 or 3.1, so we simply change the color attachment accordingly. This change also improves VRAM usage, as now there's only a single u/v texture used for both framebuffers as required.
2023-09-11 10:19:49 +02:00
561ea8cf8b Added methods to Framebuffer class to add externally created texture attachments and remove existing ones. 2023-09-11 10:19:49 +02:00
b05a8cc812 GLES: Use GL_BACK instead of GL_COLOR_ATTACHMENT0 with default framebuffer. 2023-09-11 10:19:49 +02:00
494718d2fa Added missing float precision specifiers in vertex/fragment shaders. 2023-09-11 10:19:49 +02:00
b7572ea936 Use glDrawBuffers instead of glDrawBuffer with GLES. 2023-09-11 10:19:49 +02:00
1c93302b7d Removed a few unused files. 2023-09-11 10:19:49 +02:00
a294b8a374 Fix two Emscripten/GLES compile issues. 2023-09-11 10:19:49 +02:00
b07163dd51 Check active preset after the preset switch event, as this might have failed.
Another option would be skipping the rendering if there's no active preset instead of displaying the idle preset.
2023-09-11 10:19:48 +02:00
e9438ee0f6 Deleted lots of unused files and code. 2023-09-11 10:19:48 +02:00
486c86cb7c Filename fix in comment. 2023-09-11 10:19:48 +02:00
e84acbca92 Renamed simple textured/untextured shaders to be more readable. 2023-09-11 10:19:48 +02:00
879c6c7111 Split StaticGlShaders class into shader files and code templates, removed ShaderEngine class.
Milkdrop shaders are now read from .vert/.frag and .inc files, then copied into a generated code file by CMake. Makes editing easier, as many IDEs can properly syntax-highlight the shader code.

The class was also moved into MilkdropPreset, as it's the only preset type which will ever make use of those shaders.

Deleted the now fully "dissolved" ShaderEngine class.
2023-09-11 10:19:48 +02:00
d2780c5db4 Check out submodules (for projectM-eval) in GitHub Actions workflows. 2023-09-11 10:19:48 +02:00
ef62ddf480 Add omptl to Renderer linked library list. 2023-09-11 10:19:48 +02:00
feb7a3330a A few Windows build fixes 2023-09-11 10:19:48 +02:00
4b3226ac3a Added projectM-Eval as submodule, flipped rendering stuff around a bit more. 2023-09-11 10:19:48 +02:00
74bd99a46f Fix idle preset and filters, load logo textures y-flipped.
Idle preset doesn't render the same way as before, as it was presumably adapted to projectM's previous math. It's now a bit more complex, with the M tilting, a sine waveform at the bottom and some other tweaks.

The filter mesh was broken, so the effects didn't render at all.
2023-09-11 10:19:48 +02:00
75fe0f0ede Fixed more UV coordinate issues in the warp shader.
Main issue was a wrong -, replaced with + in the rotation calculation. Plus we shouldn't negate the Y pos, as this may mess up UV calculations done in HLSL.
2023-09-11 10:19:48 +02:00
2707a1d221 Fix uv_orig coordinates in warp shader.
Should fix visuals in about half of the presets.
2023-09-11 10:19:47 +02:00
0ac9fe20f3 Finished final composite implementation, more fixes and cleanups.
Now rendering everything upside down to make up for the difference in UV coordinates in HLSL shaders.
2023-09-11 10:19:47 +02:00
df7cd08bdc Fill both spectrum channels with data. 2023-09-11 10:19:47 +02:00
f88fe7018e Fix wrong assignment in per-frame context. 2023-09-11 10:19:47 +02:00
904292e577 Implemented motion vector grid.
Have to do the motion reverse-propagation on the GPU, as the warp mesh is also calculated there. This is done storing the U/V warp coordinates in a separate texture attachment and then read the (already interpolated) coordinate in the next frame.

Added a second color buffer output to the HLSL shader to accomplish it with both the default warp shader and preset-supplied ones. Luckily, the HLSL transpiler knows what to do.

Since all framebuffer textures must match in size, this adds a bit more VRAM usage. We also need to mask all other draw calls from writing to the second texture expect in the warp shader.
2023-09-11 10:19:47 +02:00
ce0e5853b2 More work on shader stuff, warp/comp shaders now compile properly.
Fixed a transpile issue with a hack used by some preset authors to set a texture sampler to a different filter/wrap mode, removing the "sampler_state" block entirely now as there's no GLSL equivalent (samplers are solely configured on the application side).

Also consolidated a few vertex types into RenderItem and fixed a few old-school effects like DarkenCenter.
2023-09-11 10:19:47 +02:00
e603793402 Finished per-pixel mesh, started rework of warp/comp shaders and textures.
Moved per-pixel mesh texture coordinate calculations into the vertex shader. This is probably more performant than the SSE2 code in the old PresetFrameIO class, as the GPU is better at running this stuff in parallel.

All the texture management also needs some refactoring, so now that I've already broken everything, I can just do it as well.
2023-09-11 10:19:47 +02:00
09607a29c9 Fix issues with the framebuffer implementation and reenable it.
Mainly forgot to call glDrawBuffers() and created the color attachment with a completely wrong pixel format specifier.
2023-09-11 10:19:47 +02:00
102d4ba4cf Overhauled all primitives (waves, shapes and borders).
Now using Milkdrop's DX9 coordinate system for all vertex positions and have the vertex shader take care of transforming these into the OpenGL screen space. Makes calculations easier.

Also continued implementing per-pixel mesh and shader stuff.
2023-09-11 10:19:47 +02:00
e73b0f3092 Working on getting stuff being rendered again, focus on default waveform.
Fixed many typos, errors and crashes on the way.
2023-09-11 10:19:47 +02:00
62b84ef724 Added a framebuffer class for drawing the presets into. 2023-09-11 10:19:47 +02:00
7db50da0c9 A few fixes for warnings etc. 2023-09-11 10:19:46 +02:00
6e49989301 Fixed some typo, added missing call to RegisterBuiltinVariables(). 2023-09-11 10:19:46 +02:00
e48e6f3962 Remove call to deleted function. 2023-09-11 10:19:46 +02:00
a55fa071b4 Fix a few linker issues with the eval lib. 2023-09-11 10:19:46 +02:00
5c5bb0a147 PresetFileParser: Fix line reader and a compiler warning, re-add tests.
Don't skip lines with no data after "=", as there are many presets with empty code lines. skipping it would create a gap in the line numbers, aborting the loop in GetCode() early.
2023-09-11 10:19:46 +02:00
ecea456127 Remove unnecessary functions in PresetFileParser.
projectm-eval can properly skip comments and whitespace.
2023-09-11 10:19:46 +02:00
29b3d4a463 Fix namespace issues in PCMTest.cpp 2023-09-11 10:19:46 +02:00
95f3cb973b Move BlurTexture to MilkdropPreset. 2023-09-11 10:19:46 +02:00
7c4e0c8d9f Delete MilkdropPresetFactory dir, left over from a previous rebase. 2023-09-11 10:19:46 +02:00
e7094aa190 Remove "Pipeline" classes and temp fix all compilation issues. 2023-09-11 10:19:46 +02:00