Is it possible to blend two textures based on direct lighting on the material?

Hi there,

I was wondering if there’s a good way of blending two textures within a material using direct lighting as a mask.
Is there a node that can access the lighting intensity per pixel on a lit material?
Or would it be better to try and access the lighting GBuffer and do a post-process material?

I need a material that’s displaying a different texture wherever direct light hits it. (Needs to work with shadows)
Hope that makes sense!

Thank you,

Have a look at Tom Looman’s awesome replication of Dr Facilier’s shadow, it does require that you use forward shading though to make use of the LightAttenuation buffer to achieve the effect you want:

Fantastic! That is exactly the effect I need.
Thank you very much!