I haven't used the noise function becuase it does not run in hardware on ATI or Nvidia (only 3DLabs).&nbsp; You might have to use temporary variables or explicitly cast like:<br><br>vx += (float) (0.1 * noise1())<br><br><div><span class="gmail_quote">
On 9/14/06, <b class="gmail_sendername">cyrille henry</b> &lt;<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hello,<br><br>i received my orange book few days ago. so i'm back with glsl.<br><br>i give up for now with multitexture. my aim was to use 1 noisy texture<br>to distord the other one.<br>i discover the noise fonction of glsl, but i've got problem, trying to
<br>use it.<br><br>by example, a simple vertex shader like this :<br><br>void main(void)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vec4 v = vec4(gl_Vertex);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vec4 pos = gl_ModelViewMatrix * v;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float LightIntensity = max(dot(normalize(vec3(0.,3.,3.) - 
pos.xyz),<br>gl_Normal), 0.0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gl_FrontColor = gl_Color * LightIntensity;<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v.x += 0.1 * noise1(v);&nbsp;&nbsp;// commenting this line<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // make the shader to work<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gl_Position = gl_ModelViewProjectionMatrix * v;<br>}<br><br>gives me error :<br><br>Vertex info<br>-----------<br>&lt;stdlib&gt;(3998) : warning C7011: implicit cast from &quot;int&quot; to &quot;float&quot;<br>&lt;stdlib&gt;(3998) : warning C7011: implicit cast from &quot;int&quot; to &quot;float&quot;
<br><br>(same errore with noise1, noise2, noise3.., whatever vecter size of the<br>input parametter)<br><br>does anyone know where the problem came from?<br>what should i try? etc<br><br>should i ask this question in an other mailling list (as i don't think
<br>it's a gem problem)?<br><br>does anyone interested in my working example: sould i upload my patch<br>somwhere?<br><br>thanks<br>Cyrille<br><br>_______________________________________________<br>GEM-dev mailing list<br>
<a href="mailto:GEM-dev@iem.at">GEM-dev@iem.at</a><br><a href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a><br></blockquote></div><br>