Shader not showing correct inputs

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ilikelegos
:warning: Old Version Published before Godot 3 was released.

Hey, Ive been messing around and learning about shaders, but have come across a problem (Possibly a glitch?) where I’m not getting the right inputs in my shader.

Specifically, I wrote (and re-wrote and copied off demo):

uniform vec2 offset = vec2(2,0);

However it’s only showing up with a single scalar input box. Is there a problem with my code?

The code is fine.

Your Godot version, OS, node type, shader type?
Can you reproduce it on a fresh new project?

eons | 2016-10-20 14:08

Hmm, in trying to reproduce it (Or rather trying to not reproduce it), I found that works correctly as long as my vec2 isn’t named “offset” Umm… what?

So I guess my problem is solved, but if this is bug, I’m running:
Godot_v2.1-stable_win64 on Windows 10 and was using a fragment shader on a sprite node, which had several frames and an animation player.

ilikelegos | 2016-10-20 19:37

I remember some variable name problems on android (underscores).

If you can, try with a development version to see if that still happens (could be a windows 10 thing), if is still there please report the issue (look if does not exists yet first) on github to get that fixed for next release.

eons | 2016-10-21 16:29

Yeah, I found that “radius” also does some funny things… Unless… I had two windows of godot open; one with the sprite shaders demo, and one with my project. (Totally based on nothing) I wonder if the variable (of the same name and functioning on the demo) were somehow confusing my other open project?.. That’d be weird.

I’ll check it out. Report if I find something.

ilikelegos | 2016-10-21 18:39