porting raytrace shader fromSimulationMaker