Skinned shader conversion to point light

Been loving the Collada stuff but really need it to have a point light. I’ve been banging my head against a wall with this. My shader coding is very basic but I can normally hack one bit from one shader and drop in another. Not so easy this time.

I’m trying to convert the Skinning.fx shader to have a point light rather than a directional. Is there anyone who can give this ago for me please? It may be pretty easy if you know your stuff.

I’d really appreciate it and buy beers in return. :)

Attached is my attempt at sorting this…

When trying to calculate the diffuse and specular it causes the shader to not compile but shows no real error. I’m probably missing something simple maybe. (11.9 kB)

ok. Been talking to @vux and he’s had a little look at this for me. many thanks.

quotes from vux,

“not sure why it compiles and doesnt return any message. I
did run Directx in debug mode with full log and it doesn’t complain

“Tried to compile your vertex shader with fxc and seems fine, so seems
there’s no instruction limit problem either.”

The fact it works fine in FXC makes me think this must be some kind of vvvv backend issue. if any devs that could through some light on this would be wonderful. The same issue shows itself when trying to convert the soft shadow shader and this makes me think that others would have the same issue. Be amazing to have more than just a directional on Collada content.


hello nitro,

that was strange indeed, but after 3h of debugging joreg found the issue. it was some kind of register limit for the vertex shader, when we reduce the SkinningMatrices array to a count of 58 it works… not sure of the consequnces for the coloda node… but a GetSlice before the shader does the job for now.

btw i did the test implementation with Phong point, which looks better, as its per pixel lightning: (11.0 kB)

wicked stuff. thanks ton. thanks joreg for your 3hours one it! I never though of trying reducing that, I knew about the 60 limit and never thought that would be the issue.

I’ll have a go at converting the softshadow too and contribute these collada shaders.