Jump to content

import light parameter


SpencerL

Recommended Posts

Hey,

I created a shadow shader which I apply to my light and it colors the shadows. I have created a color parameter on my light called "shadcol". I want to bring that parameter into my VOP network. I tried a parameter VOP and named it "shadcol" but it does not seem to bring in that parameter. Is there something that I am missing to bring the "shadcol" parameter into my Vopnet?

Thanks

Edited by SpencerL
Link to comment
Share on other sites

I haven't touched light shaders, but "Import Light Variable" VEX node sounds like it could be what you need?

eetu.

EDIT: oops, I completely misread/understood - please disregard :)

Edited by eetu
Link to comment
Share on other sites

Hey,

I created a shadow shader which I apply to my light and it colors the shadows. I have created a color parameter on my light called "shadcol". I want to bring that parameter into my VOP network. I tried a parameter VOP and named it "shadcol" but it does not seem to bring in that parameter. Is there something that I am missing to bring the "shadcol" parameter into my Vopnet?

Thanks

I suppose that you have to link (with ch() expression) your light parameter with a shader parameter and use that in shader's body.

Link to comment
Share on other sites

I suppose that you have to link (with ch() expression) your light parameter with a shader parameter and use that in shader's body.

Thanks Symek,

Good suggestion. That sounds like it could work, even though it is somewhat of a hack. I am very new to creating shadow/light shaders and I am wondering if I am going about this in the wrong direction because it seems that there should be a way to import light parameters into light/shadow shaders, just as you can import attributes for surface shaders.

Thanks!

Link to comment
Share on other sites

it seems that there should be a way to import light parameters into light/shadow shaders, just as you can import attributes for surface shaders.

You can't because these are parameters, not attributes. In a light, there's no geometry to bind attributes to, so they can't in turn override shader parameters of matching name/type (the concept of bound attributes just doesn't exist for a light -- there's nothing to bind them to).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...