Shader lab - bindings


I’m quite new to shaders. If i create a new shader by coping an existing one ( fragment and vertex), I can’t create or edit the binding. How do you proceed?

Bindings show up when you have shader attributes (or is it uniforms?) in your vertex shader code.

Not working for me. If you copy for instance the swirl shader ( once the vertex and after the fragement) you should get the same bindings, but my biding panel remains empty. Very strange.
Any ideas?

You have to actually make use of the new uniforms in your shader code before they show up. Otherwise the GLSL compiler optimizes them out, thinking they are unused.

Thanks, it’s working fine now.

.@Simeon one other question on the bindings? Which p are the uniforms? Highp, mediump, or lowp?

Hello @MRQ. I believe that the precision of the uniforms is as you have defined them in your shader or the default precision where you have not defined them and a default exists. See section 4.5.3 ‘Default precision qualifiers’ of the GLSL ES specification (available via the Codea Wiki).