Hello,
I’m writing a simple fragment shader , and i’d like to pass an uniform to it.
I’m using a menu for this, so all its boxes will be modified by the shader (note that you have to define box for seeing something. At first, i tried to import DAE quad, but it’s different with menus.)
So i’ve defined in the material a constant_type_user
named uniform_timer
in the fragment constants of the material.
From this, i have two questions:
-
I couldn’t change its type to anything else than its default type, which is a
vec4
. For my use (a timer) a simpleint
or at worse afloat
would be better. -
How can i modify the value of a
constant_type_user
? I thouhgt it would be accessible from the attached script of the menu, but inside the script,uniform_timer
is set tonil
.
Thank you for reading, and happy new year as it’s my first post for 2018