naitoookami wrote:You were on the right track but instead of the light direction vector use light intensity. If there is a real time light in the scene, light intensity will always be greater than zero. You can get light intensity from the light color node.
Hmm that seems like it would work but wouldn't point lights and spot lights also change this? Or is that all in light attenuation? Either way it does seem that I found a solution. I was using If Community since it allowed for vector3 inputs, but I believe that the "equal threshold" part was the issue. Instead, I added each axis of the light direction vector and used a Compare (A == B) node to check if the resulting value was 0. This has worked so far without issues.
I am having another problem, though. As I said earlier I need this shader to work with baked lighting as well as realtime. Since this is a "toon" style shader, I have been attempting to find a way to apply the ambient diffuse light as a flat color across my object, as the shading created from the normal direction really clashes with the toon look of the shader. Is there any way to achieve this? I have seen other shaders do it but am unsure if it is possible in amplify, or how it would be done.