viromedia / virocore

ViroCore cross-platform AR/VR renderer
MIT License
370 stars 108 forks source link

Weird rendering of the Text #36

Open icanb opened 6 years ago

icanb commented 6 years ago

I'm trying to render a 3D text ("Hello"), but getting this weird output when I run it:

screen shot 2018-03-02 at 6 35 46 pm

Interestingly, the size of the letters match to the Hello text, but the pixels are all looking like 5s.

The code is:

        Text text = new Text(mViroView.getViroContext(), "Hello", 2, 1);
        text.setHorizontalAlignment(Text.HorizontalAlignment.CENTER);

        // Create a Node, position it, and attach the Text geometry to it
        Node textNode = new Node();
        textNode.setPosition(new Vector(0, 0, -1));
        textNode.setGeometry(text);

        Scene scene = new Scene();
        Node rootNode = scene.getRootNode();
        rootNode.addChildNode(textNode);

        mViroView.setScene(scene);

Any ideas on what might be causing this?

radvani commented 6 years ago

Hi @icanb, thanks for reporting this. Could you let us know what device and OS you're running, and also the GPU type? Viro reports the GPU type in the logs, a line like the following will be printed when you create a ViroView:

GPU vendor [XYZ], renderer [XYZ]

Once we have that data we'll try to reproduce and drill down what the issue may be.