OverviewFelgo 2 Support (Qt 5) › ShaderEffects vs Scene scaling

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #13780



    I am using the scene scaling strategy (scene size: 320×480, multi resolution images, etc.). It works fine until I use some ShaderEffects like: DropShadow or ColorOverlay. Such items look blurred on hd/hd2 devices. I use the following workarounds:

    -for images:

    MultiResolutionImage {
    	id: image
    	source: "../assets/img/gear.png"
    	visible: false
    	Component.onCompleted: {
    		width *= 4;
    		height *= 4;
    ColorOverlay {
    	width: 0.25*image.width
    	height: 0.25*image.height
    	source: image
    	color: "red"
    	anchors.bottom: parent.bottom
    	anchors.right: parent.right

    – for texts:

    Text {
    	id: text
    	text: qsTr("text")
    	font.pixelSize: 28
    	visible: false
    	Component.onCompleted: {
    		width *= 4;
    		height *= 4;
    		font.pixelSize *= 4;
    DropShadow {
    	anchors.left: parent.left
    	width: text.width
    	height: text.height
    	scale: 0.25
    	transformOrigin: Item.TopLeft
    	horizontalOffset: 0
    	verticalOffset: 8
    	radius: 8
    	samples: 20
    	color: "#80000000"
    	source: text

    However I don’t like their complexity. Is there any better way of using ShaderEffects?





    I’ve no clue why MultiResolutionImage does not support it, it definitely should… because the “workaround” is really ugly imo.



    Well, I think it’s not the MultiResolutionImage’s fault as it’s only the source of ShaderEffect components which are not the part of the Felgo library. Moreover you can use any item as a source, so it’s understandable it cannot use any Felgo specific component logic. Unfortunately 🙁


    Felgo Team


    Hi Günther,
    the internalContentScaleFactorForImages should be enough in my case.

    Thanks 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support