This project is read-only.

Layering Materials any idea is it possible

May 16, 2013 at 6:58 PM
Hello
Been looking everywhere for examples on how to layer 2 or more materials i.e glass.cu.ptx over phong.cu.ptx i have added both of them using the

objectInst.SetMaterial(0,phongMtl)
objectInst.SetMaterial(1,glassMtl)

and it compiles fine but only one material shows up depending on which one i put first what else do i need to do other than code both into one CU file which i dont want to do.

what would be perfect is if i can then use a texture lookup in the cu file to mask between both.

many thanks