0 votes

Hello i am having problems with setting textures as black bars in VisualServer.
I cannot get it work properly. It always draws one color of the texture (instead of the texture itself) like if it was zoomed in or something. I tried doing it on GLES 2 with mixed result and also using images instead of textures but nothing seems to help. I guess it scales the texture in some strange way but there is nothing about it written in the docs so i am not sure. Does the texture have to have specific resolution for it to work ?

Code i use:

var top = ResourceLoader.load("res://texture1.png")
var bottom = ResourceLoader.load("res://texture2.png")
var right = ResourceLoader.load("res://texture3.png")
var left = ResourceLoader.load("res://texture4.png")
VisualServer.blackbarssetimages(left.getrid(),top.getrid(),right.getrid(),bottom.get_rid())

I am running out of ideas of what to try so any help would be appreciated.

Godot version : 3.1

OS : Windows 10 64bit

asked Mar 26, 2019 in Engine by parradoxSVK (30 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.