I have built a plug-in that when ran inside a DAW (tried both Reaper and Ableton) there is heavy rasterisation occurring in the VST versions however displays fine and without rastering in the standalone. I have looked at all the associated class functions for the audioprocessoreditor/component classes and looked over a lot of forum posts but I can’t figure out how to get a host to draw the vst at the same resolution as the exe. I also don’t really understand why this would change at all
I’m assuming you are on Windows. This will be dependent on the version of Windows that you are running on, but the difference between the standalone and VST is that the plug-in will use the DPI-awareness settings of the host that it is running in whereas with the standalone we can choose the best setting as we are in full control of the process.
You can try enabling high-DPI monitor support in the host’s preferences (I’m pretty sure both Reaper and Ableton support this) and then the plug-in should hopefully render at a better resolution.
If this is the reason then why aren’t all other plug-ins similarly rasterised? For instance if I run a native instruments VST I do not get a visible rasterisation on a plug-in. I’m running this with unmodified scale in Win10. Surely anything to do with High-dpi monitoring doesn’t factor here?
Edit: Just as an additional and probably key point i forgot to mention, this happens with my background image but not native JUCE buttons and boxes such as the combobox - however the text inside the combobox is not rendered at all when ran in VST
Edit2: I misunderstood what High-DPI monitoring was about, just had a little google, point above still stands however
You might not have modified the scale factor, but Windows may have done it automatically if you’ve got a high-DPI monitor - take a look at the display settings in Explorer. It also might depend on the underlying DPI of the monitor which may be higher than 96.
Anyway, it’s a key point that it’s only images that are affected as it means we could be doing something incorrectly in the native image rendering code. I’ll investigate.
Windows may have done it automatically if you’ve got a high-DPI monitor
Surely then it should equally do this for all VST plug ins? However most other plug-ins don’t look like this - is this a JUCE limitation then?
Anyway, it’s a key point that it’s only images that are affected as it means we could be doing something incorrectly in the native image rendering code. I’ll investigate.
Thanks, in the meantime is there something that could be wrong with how I have set up the image for this to have happened?
EDIT: also when I said the scale was unmodified I originally meant it is at 100% scale in display settings, so scale is on normal. Rasterisation is also the same on a surface laptop I have - which does display at 200% scale, so the native scaling of Win10 i don’t think is the issue here
I’ve just created a new plug-in project in the Projucer and added a .jpg file as binary data, which I’m drawing in the plug-in editor’s paint() method like so:
I’ve also added some standard JUCE widgets like a ComboBox and Button.
I’ve tried loading both the VST and VST3 in Reaper and Live 10 but I’m not seeing the issues that you’ve described - if the hosts are not DPI-aware then the plug-in is rendered at a lower resolution as expected (both the image and the JUCE widgets) and if I enabled high-DPI in the hosts then the plug-in renders at the correct resolution.
Can you post a minimal example plug-in which exhibits the issue?
Like I said above, we are unfortunately at the mercy of the host when it comes to Windows DPI awareness and if the host process isn’t DPI-aware, or chooses to open plug-in windows in DPI-unaware mode, then there’s nothing we can do to prevent this.