0 votes

I am trying to make a tv give off a glow, and I want this glow to roughly match the color of the texture it is currently displaying. How do I get the current color of the texture? I want to have access to this color from other places so a shader doesn't seem to work. Can you read texture fragments from a normal script?

in Engine by (14 points)

1 Answer

0 votes

I know with an Image, there is a get_pixel(x,y) function, to use it, you need to convert the texture to an Image resource, and call image.lock() firs, then you can use image.get_pixel()

by (153 points)
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.