[Soc-2010-dev] Shaders Week 2 Report

Mitchell Stokes mogurijin at gmail.com
Sun Jun 6 20:29:56 CEST 2010


Thanks for the info, I'll look into it. :)

On Sun, Jun 6, 2010 at 8:54 AM, Konrad Wilhelm Kleine <
konrad at konradwilhelm.de> wrote:

> Hey Mitchell,
>
> You did some great work here!
>
> I recently did some experiments with GLSL and was very confused when it
> comes to passing textures to my shaders. To clarify: If you support
> "int" or "uint" (don't know which one it is), you already have support
> to pass textures as "sampler2D".
>
> These are the steps:
>
> 0) Set "i" to 0
> 1) Get uniform location of your sampler2D (this isn't the textureID NOR
> the texture unit)
> 2) Set your uniform using "glUniformXY(location, i);"
> 3) Activate your texture using "glActiveTexture(GL_TEXTURE0 + i);"
> 4) Bind your texture using "glBindTexture(GL_TEXTURE_2D, textureID);"
> 5) Increment i
> 6) Repeat steps 1) to 5) for every texture you have
>
> This website helped me a lot:
> http://www.opengl.org/wiki/GLSL_:_common_mistakes#Binding_A_Texture
>
> Cheers,
> kwk
>
> Am 05.06.2010 02:37, schrieb Mitchell Stokes:
> > Here is my report for week 2:
> >
> > http://mogurijin.wordpress.com/2010/06/04/gsoc-status-report-week-2/
> >
> > Cheers,
> > Mitchell Stokes (Moguri)
> >
> >
> >
> > _______________________________________________
> > Soc-2010-dev mailing list
> > Soc-2010-dev at blender.org
> > http://lists.blender.org/mailman/listinfo/soc-2010-dev
> _______________________________________________
> Soc-2010-dev mailing list
> Soc-2010-dev at blender.org
> http://lists.blender.org/mailman/listinfo/soc-2010-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2010-dev/attachments/20100606/7053f159/attachment.htm 


More information about the Soc-2010-dev mailing list