Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Shader lab - bindings

edited March 2013 in Shaders Posts: 24

Hello,

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?
Thanks!

Tagged:

Comments

  • Posts: 666

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

  • Posts: 24

    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?

  • SimeonSimeon Admin Mod
    Posts: 4,892

    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.

  • Posts: 24

    Thanks, it's working fine now.

  • MRQMRQ
    edited March 2013 Posts: 4

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

  • Posts: 489

    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).

Sign In or Register to comment.