Add higher quality noise, real oscilloscope displays, increase resolution, use hardward encoding on mac silicone
Przed Szerokość: | Wysokość: | Rozmiar: 21 KiB Po Szerokość: | Wysokość: | Rozmiar: 25 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 6.3 KiB Po Szerokość: | Wysokość: | Rozmiar: 25 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 84 KiB Po Szerokość: | Wysokość: | Rozmiar: 465 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 79 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.7 MiB |
Przed Szerokość: | Wysokość: | Rozmiar: 33 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.5 MiB |
Przed Szerokość: | Wysokość: | Rozmiar: 56 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 4.1 MiB |
Przed Szerokość: | Wysokość: | Rozmiar: 64 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 3.6 MiB |
|
@ -95,6 +95,14 @@ public:
|
|||
// not supported by all media players)
|
||||
return 50 * (1.0 - quality) + 1;
|
||||
}
|
||||
|
||||
int getVideoToolboxQuality() {
|
||||
if (parameters.losslessVideo.getBoolValue()) {
|
||||
return 100;
|
||||
}
|
||||
double quality = juce::jlimit(0.0, 1.0, parameters.qualityEffect.getValue());
|
||||
return 100 * quality;
|
||||
}
|
||||
|
||||
bool recordingVideo() {
|
||||
return parameters.recordVideo.getBoolValue();
|
||||
|
|
|
@ -421,6 +421,14 @@ void VisualiserComponent::setRecording(bool recording) {
|
|||
" -y" +
|
||||
" -pix_fmt yuv420p" +
|
||||
" -crf " + juce::String(recordingSettings.getCRF()) +
|
||||
#if JUCE_MAC
|
||||
#if JUCE_ARM
|
||||
// use software encoding on Apple Silicon
|
||||
" -c:v hevc_videotoolbox" +
|
||||
" -q:v " + juce::String(recordingSettings.getVideoToolboxQuality()) +
|
||||
" -tag:v hvc1" +
|
||||
#endif
|
||||
#endif
|
||||
" -vf vflip" +
|
||||
" \"" + tempVideoFile->getFile().getFullPathName() + "\"";
|
||||
|
||||
|
@ -821,12 +829,12 @@ void VisualiserComponent::setupTextures() {
|
|||
glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);
|
||||
|
||||
// Create textures
|
||||
lineTexture = makeTexture(1024, 1024);
|
||||
lineTexture = makeTexture(2048, 2048);
|
||||
blur1Texture = makeTexture(512, 512);
|
||||
blur2Texture = makeTexture(512, 512);
|
||||
blur3Texture = makeTexture(128, 128);
|
||||
blur4Texture = makeTexture(128, 128);
|
||||
renderTexture = makeTexture(1024, 1024);
|
||||
renderTexture = makeTexture(2048, 2048);
|
||||
|
||||
screenOpenGLTexture.loadImage(emptyScreenImage);
|
||||
screenTexture = { screenOpenGLTexture.getTextureID(), screenTextureImage.getWidth(), screenTextureImage.getHeight() };
|
||||
|
@ -1072,7 +1080,7 @@ void VisualiserComponent::drawCRT() {
|
|||
|
||||
activateTargetTexture(blur1Texture);
|
||||
setShader(texturedShader.get());
|
||||
texturedShader->setUniform("uResizeForCanvas", lineTexture.width / 1024.0f);
|
||||
texturedShader->setUniform("uResizeForCanvas", lineTexture.width / 2048.0f);
|
||||
drawTexture({lineTexture});
|
||||
|
||||
//horizontal blur 512x512
|
||||
|
@ -1131,7 +1139,7 @@ void VisualiserComponent::drawCRT() {
|
|||
outputShader->setUniform("uFishEye", screenOverlay == ScreenOverlay::VectorDisplay ? VECTOR_DISPLAY_FISH_EYE : 0.0f);
|
||||
outputShader->setUniform("uRealScreen", settings.parameters.screenOverlay->isRealisticDisplay() ? 1.0f : 0.0f);
|
||||
#endif
|
||||
outputShader->setUniform("uResizeForCanvas", lineTexture.width / 1024.0f);
|
||||
outputShader->setUniform("uResizeForCanvas", lineTexture.width / 2048.0f);
|
||||
juce::Colour colour = juce::Colour::fromHSV(settings.getHue() / 360.0f, 1.0, 1.0, 1.0);
|
||||
outputShader->setUniform("uColour", colour.getFloatRed(), colour.getFloatGreen(), colour.getFloatBlue());
|
||||
drawTexture({
|
||||
|
@ -1250,7 +1258,7 @@ Texture VisualiserComponent::createScreenTexture() {
|
|||
glVertexAttribPointer(glGetAttribLocation(simpleShader->getProgramID(), "vertexPosition"), 2, GL_FLOAT, GL_FALSE, 0, nullptr);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
simpleShader->setUniform("colour", 0.01f, 0.05f, 0.01f, 1.0f);
|
||||
glLineWidth(2.0f);
|
||||
glLineWidth(4.0f);
|
||||
glDrawArrays(GL_LINES, 0, data.size() / 2);
|
||||
glBindTexture(GL_TEXTURE_2D, targetTexture.value().id);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
|
|
@ -209,12 +209,12 @@ private:
|
|||
juce::Image emptyScreenImage = juce::ImageFileFormat::loadFrom(BinaryData::empty_jpg, BinaryData::empty_jpgSize);
|
||||
|
||||
#if SOSCI_FEATURES
|
||||
juce::Image oscilloscopeImage = juce::ImageFileFormat::loadFrom(BinaryData::real_jpg, BinaryData::real_jpgSize);
|
||||
juce::Image vectorDisplayImage = juce::ImageFileFormat::loadFrom(BinaryData::vector_display_jpg, BinaryData::vector_display_jpgSize);
|
||||
juce::Image oscilloscopeImage = juce::ImageFileFormat::loadFrom(BinaryData::real_png, BinaryData::real_pngSize);
|
||||
juce::Image vectorDisplayImage = juce::ImageFileFormat::loadFrom(BinaryData::vector_display_png, BinaryData::vector_display_pngSize);
|
||||
|
||||
juce::Image emptyReflectionImage = juce::ImageFileFormat::loadFrom(BinaryData::no_reflection_jpg, BinaryData::no_reflection_jpgSize);
|
||||
juce::Image oscilloscopeReflectionImage = juce::ImageFileFormat::loadFrom(BinaryData::real_reflection_jpg, BinaryData::real_reflection_jpgSize);
|
||||
juce::Image vectorDisplayReflectionImage = juce::ImageFileFormat::loadFrom(BinaryData::vector_display_reflection_jpg, BinaryData::vector_display_reflection_jpgSize);
|
||||
juce::Image oscilloscopeReflectionImage = juce::ImageFileFormat::loadFrom(BinaryData::real_reflection_png, BinaryData::real_reflection_pngSize);
|
||||
juce::Image vectorDisplayReflectionImage = juce::ImageFileFormat::loadFrom(BinaryData::vector_display_reflection_png, BinaryData::vector_display_reflection_pngSize);
|
||||
|
||||
OsciPoint REAL_SCREEN_OFFSET = { 0.02, -0.15 };
|
||||
OsciPoint REAL_SCREEN_SCALE = { 0.6 };
|
||||
|
|
|
@ -37,13 +37,13 @@
|
|||
<FILE id="RgmiPU" name="no_reflection.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/no_reflection.jpg"/>
|
||||
<FILE id="dNtZYs" name="noise.jpg" compile="0" resource="1" file="Resources/oscilloscope/noise.jpg"/>
|
||||
<FILE id="FyEDbA" name="real.jpg" compile="0" resource="1" file="Resources/oscilloscope/real.jpg"/>
|
||||
<FILE id="v8E6y9" name="real_reflection.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/real_reflection.jpg"/>
|
||||
<FILE id="QrCP4w" name="vector_display.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/vector_display.jpg"/>
|
||||
<FILE id="s3VNsJ" name="vector_display_reflection.jpg" compile="0"
|
||||
resource="1" file="Resources/oscilloscope/vector_display_reflection.jpg"/>
|
||||
<FILE id="ZeLdkV" name="real.png" compile="0" resource="1" file="Resources/oscilloscope/real.png"/>
|
||||
<FILE id="LRgixi" name="real_reflection.png" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/real_reflection.png"/>
|
||||
<FILE id="arGLS1" name="vector_display.png" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/vector_display.png"/>
|
||||
<FILE id="a6URcP" name="vector_display_reflection.png" compile="0"
|
||||
resource="1" file="Resources/oscilloscope/vector_display_reflection.png"/>
|
||||
</GROUP>
|
||||
<GROUP id="{82BCD6F1-A8BF-F30B-5587-81EE70168883}" name="svg">
|
||||
<FILE id="rl17ZK" name="cog.svg" compile="0" resource="1" file="Resources/svg/cog.svg"/>
|
||||
|
|
14
sosci.jucer
|
@ -32,13 +32,13 @@
|
|||
<FILE id="ZgcesA" name="no_reflection.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/no_reflection.jpg"/>
|
||||
<FILE id="dNtZYs" name="noise.jpg" compile="0" resource="1" file="Resources/oscilloscope/noise.jpg"/>
|
||||
<FILE id="xxXx4Q" name="real.jpg" compile="0" resource="1" file="Resources/oscilloscope/real.jpg"/>
|
||||
<FILE id="nuEXXn" name="real_reflection.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/real_reflection.jpg"/>
|
||||
<FILE id="bdQp0Q" name="vector_display.jpg" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/vector_display.jpg"/>
|
||||
<FILE id="XojumY" name="vector_display_reflection.jpg" compile="0"
|
||||
resource="1" file="Resources/oscilloscope/vector_display_reflection.jpg"/>
|
||||
<FILE id="LAmlcm" name="real.png" compile="0" resource="1" file="Resources/oscilloscope/real.png"/>
|
||||
<FILE id="FKUOID" name="real_reflection.png" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/real_reflection.png"/>
|
||||
<FILE id="P9kYdq" name="vector_display.png" compile="0" resource="1"
|
||||
file="Resources/oscilloscope/vector_display.png"/>
|
||||
<FILE id="IiqBke" name="vector_display_reflection.png" compile="0"
|
||||
resource="1" file="Resources/oscilloscope/vector_display_reflection.png"/>
|
||||
</GROUP>
|
||||
<GROUP id="{08DE8F94-4A00-7C71-4AF3-4C34C821A5DF}" name="sosci">
|
||||
<FILE id="jtOYDo" name="clean.sosci" compile="0" resource="1" file="Resources/sosci/clean.sosci"/>
|
||||
|
|