Re: [cgkit-user] shader.declare() for multiple RMLightSource()
Brought to you by:
mbaas
|
From: Rene <dar...@gm...> - 2007-07-13 09:56:04
|
It tells the light shader doesn't have "from" because the first one
doesn't have it.
I'll try to upgrade to the SVN and see how that works.
Daredemo
On 7/13/07, Matthias Baas <mat...@gm...> wrote:
> Rene wrote:
> > I tried to set up a scene with two RMLightSource() objects and set the
> > shader parameters with shader.declare(), but it didn't work as I
> > expected, so I'm kindly asking for more information about this.
> >
> > This is what I tried:
> >
> > rmla = RMLightSource(shader=RMShader("ambientlight"))
> > rmla.shader.declare('uniform float intensity=.5')
> >
> > rmlb = RMLightSource(shader=RMShader("distantlight"))
> > rmlb.shader.declare('uniform point from=(2,0,0)')
> >
> > if I do that it complains that the shader doesn't have "from" (I
> > suspect it's because "ambientlight" doesn't have "from"). What am I
> > doing wrong? It's probably again some python mistake I've made,
> > because I still don't find my self at home with it.
>
> Your code looks fine to me and when I run the above code here, I don't
> get any errors. What version of cgkit are you using? Can you upgrade to
> the latest svn version?
>
> - Matthias -
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> cgkit-user mailing list
> cgk...@li...
> https://lists.sourceforge.net/lists/listinfo/cgkit-user
>
|