[GEM-dev] GemVertexBuffer + Shader

Jack jack at rybn.org
Mon Aug 25 11:56:36 CEST 2014


Le 24/08/2014 22:52, j-p a écrit :
> Right - attribute not uniform.  The texture table is a good candidate
> for non-texture VBOs - 8 parameters from the UV coordinates. 
> Otherwise probably the color table? (4) - as color is usually
> determined in the shader or from the texture itself?

If you want to use texcoord from table, according to the help file about
[gemvertexbuffer], you can send only 2 values : textureU and textureV.
With color from table you can send 4 values (R G B A). Color can be
determined in the shader, and you can get it with gl_Color (vec4 for R G
B A). But maybe i don't understand your last question correctly ?
++

Jack


>
>
>
> On Sun, Aug 24, 2014 at 4:22 PM, Jack <jack at rybn.org
> <mailto:jack at rybn.org>> wrote:
>
>     Le 24/08/2014 21:55, j-p a écrit :
>>     Hi,
>>     I'm trying to find a way to get each vertex in a VBO to send
>>     individual uniform values to a connected shader.  I was thinking
>>     it might be possible to send these through an unused table... or
>>     maybe a 5th table could be created (length given with msg) to be
>>     referenced by the shaders?
>>
>>     I have no idea is this is practical or possible within GEM setup,
>>     but if it is - any interest in adding this function?
>>
>>
>>     _______________________________________________
>>     GEM-dev mailing list
>>     GEM-dev at lists.iem.at <mailto:GEM-dev at lists.iem.at>
>>     http://lists.puredata.info/listinfo/gem-dev
>     Hello,
>
>     You can't pass individual uniform values to each vertex.
>     I guess you try to pass individual values to each vertex. For this
>     purpose, you can use attribute variables.
>     You are limited with the VBO object of Gem to use "build-in"
>     vertex attributes : position, color, texture, normal.
>     If you want to pass individual values to vertex, use one of this
>     "build-in" vertex attribute that you don't use and get the
>     attribute in your vertex shader.
>     ++
>
>     Jack
>
>
>
>     _______________________________________________
>     GEM-dev mailing list
>     GEM-dev at lists.iem.at <mailto:GEM-dev at lists.iem.at>
>     http://lists.puredata.info/listinfo/gem-dev
>
>
>
>
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at lists.iem.at
> http://lists.puredata.info/listinfo/gem-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20140825/edc74446/attachment.html>


More information about the GEM-dev mailing list