Look up into texture seems complicated.

http://oss.sgi.com/projects/ogl-sample/registry/ARB/GLSLangSpec.Full.1.10.59.pdf
  
show function as :
vec4 texture1DProj (sampler1D sampler, vec4 coord [, float bias] )

That's quite complexe.

Inside http://www.lighthouse3d.com/opengl/glsl/index.php?texture we see :
      uniform sampler2D tex;
        
        void main()
        {
                vec4 color = texture2D(tex,gl_TexCoord[0].st);
                gl_FragColor = color;
        }

So, texture2D take a pointer and a vector. That's a lot more simple than 
previous function. But what is used today ?
GLSL propose a lot of functionalities. What is needed is real world example. I 
need to know what is performance critical in current shader.

Nicolas Boulay

Le lundi 17 Avril 2006 17:03, Timothy Miller a écrit :
> I've been thinking about programmable shaders and what we should
> implement.  If we have some reasonable way to load immediate values
> into vectors, then we can subsume all of the following into a single
> dot product primitive:
> - scalar adds and subtracts
> - scalar multiplies
> - vector dot product
> - matrix multiply
>
> We'll need a few other things like computing reciprocols (for
> divides), vector sums and vector multiplies.  (Later today, when I
> have time, I'll produce a more formal and precise description of the
> primitives I have in mind.)
>
> Anyhow, it seems to me that we should look at some examples.  There
> are two things we can do here.  Some people with experience can write
> out, in high-level pseudo-code, some simple shader programs.  And
> someone else could look at the OGA "model" and convert that into the
> pseudo code corresponding to how it would be fully implemented in a
> programmable shader (some details can be left out).
>
> This will help us figure out which primitives we need.  And from
> experience later, we can figure out where we might benefit from adding
> a few more and optimizing some things.
> _______________________________________________
> Open-graphics mailing list
> [email protected]
> http://lists.duskglow.com/mailman/listinfo/open-graphics
> List service provided by Duskglow Consulting, LLC (www.duskglow.com)
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to