kopia lustrzana https://github.com/jameshball/osci-render
Add opengl debug statements to save files
rodzic
6a78b69ccd
commit
6d0207b150
|
@ -133,7 +133,6 @@ VisualiserComponent::VisualiserComponent(
|
|||
addAndMakeVisible(audioPlayer);
|
||||
audioPlayer.addMouseListener(static_cast<juce::Component*>(this), true);
|
||||
|
||||
openGLContext.setOpenGLVersionRequired(juce::OpenGLContext::OpenGLVersion::openGL3_2);
|
||||
openGLContext.setRenderer(this);
|
||||
openGLContext.attachTo(*this);
|
||||
|
||||
|
@ -1067,40 +1066,54 @@ void VisualiserComponent::drawCRT() {
|
|||
using namespace juce::gl;
|
||||
|
||||
setNormalBlending();
|
||||
|
||||
saveTextureToQOI(lineTexture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("line.qoi"));
|
||||
|
||||
activateTargetTexture(blur1Texture);
|
||||
setShader(texturedShader.get());
|
||||
texturedShader->setUniform("uResizeForCanvas", lineTexture.width / 1024.0f);
|
||||
drawTexture({lineTexture});
|
||||
|
||||
saveTextureToQOI(blur1Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur1.qoi"));
|
||||
|
||||
//horizontal blur 512x512
|
||||
activateTargetTexture(blur2Texture);
|
||||
setShader(blurShader.get());
|
||||
blurShader->setUniform("uOffset", 1.0f / 512.0f, 0.0f);
|
||||
drawTexture({blur1Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur2.qoi"));
|
||||
|
||||
//vertical blur 512x512
|
||||
activateTargetTexture(blur1Texture);
|
||||
blurShader->setUniform("uOffset", 0.0f, 1.0f / 512.0f);
|
||||
drawTexture({blur2Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur1_1.qoi"));
|
||||
|
||||
//preserve blur1 for later
|
||||
activateTargetTexture(blur3Texture);
|
||||
setShader(texturedShader.get());
|
||||
texturedShader->setUniform("uResizeForCanvas", 1.0f);
|
||||
drawTexture({blur1Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur3.qoi"));
|
||||
|
||||
//horizontal blur 128x128
|
||||
activateTargetTexture(blur4Texture);
|
||||
setShader(wideBlurShader.get());
|
||||
wideBlurShader->setUniform("uOffset", 1.0f / 128.0f, 0.0f);
|
||||
drawTexture({blur3Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur4.qoi"));
|
||||
|
||||
//vertical blur 128x128
|
||||
activateTargetTexture(blur3Texture);
|
||||
wideBlurShader->setUniform("uOffset", 0.0f, 1.0f / 128.0f);
|
||||
drawTexture({blur4Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("blur3_1.qoi"));
|
||||
|
||||
#if SOSCI_FEATURES
|
||||
if (settings.parameters.screenOverlay->isRealisticDisplay()) {
|
||||
// create glow texture
|
||||
|
@ -1108,6 +1121,8 @@ void VisualiserComponent::drawCRT() {
|
|||
setShader(glowShader.get());
|
||||
setOffsetAndScale(glowShader.get());
|
||||
drawTexture({blur3Texture});
|
||||
|
||||
saveTextureToQOI(blur2Texture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("glow.qoi"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1142,6 +1157,8 @@ void VisualiserComponent::drawCRT() {
|
|||
glowTexture,
|
||||
#endif
|
||||
});
|
||||
|
||||
saveTextureToQOI(renderTexture, juce::File::getSpecialLocation(juce::File::SpecialLocationType::userDesktopDirectory).getChildFile("render.qoi"));
|
||||
}
|
||||
|
||||
void VisualiserComponent::setOffsetAndScale(juce::OpenGLShaderProgram* shader) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginCharacteristicsValue="pluginWantsMidiIn"
|
||||
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
||||
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
||||
version="2.4.3" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||
version="2.4.3.1" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||
companyEmail="james@ball.sh" defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1"
|
||||
pluginAUMainType="'aumf'">
|
||||
<MAINGROUP id="j5Ge2T" name="osci-render">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<JUCERPROJECT id="HH2E72" name="sosci" projectType="audioplug" useAppConfig="0"
|
||||
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginManufacturer="jameshball"
|
||||
aaxIdentifier="sh.ball.sosci" cppLanguageStandard="20" projectLineFeed=" "
|
||||
headerPath="./include" version="1.0.3" companyName="James H Ball"
|
||||
headerPath="./include" version="1.0.3.1" companyName="James H Ball"
|
||||
companyWebsite="https://osci-render.com" companyEmail="james@ball.sh"
|
||||
defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1"
|
||||
pluginManufacturerCode="Jhba" pluginCode="Sosc" pluginAUMainType="'aufx'">
|
||||
|
|
Ładowanie…
Reference in New Issue