Re: [cgkit-user] shader.declare() for multiple RMLightSource()
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2007-07-13 09:50:59
|
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 -
|