Original Post
I've written a short pixel shader that combines the diffuse and lightmap texture colour values with a simple multiplication. That works well. However, not all surfaces have a lightmap, and in those circumstances I'd need to multiply the diffuse texture colour by a constant instead. The effect has two texture parameters. I set the lightmap texture to null if there is no lightmap for the surface, which results in pitch-black surfaces where the tex2D function is returning zero. How can I detect if a texture parameter is set to null? Or is that the wrong idea entirely?