# Mapping 2D image texture to a triangulated model

**URL:** <https://forums.developer.nvidia.com/t/mapping-2d-image-texture-to-a-triangulated-model/21046>\
**Category:** CUDA Programming and Performance\
**Created:** [February 15, 2011, 7:02am UTC](https://forums.developer.nvidia.com/t/mapping-2d-image-texture-to-a-triangulated-model/21046 "2011-02-15T07:02:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maygo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@maygo](https://forums.developer.nvidia.com/u/maygo)\
**Post date:** [February 15, 2011, 7:02am UTC](https://forums.developer.nvidia.com/t/mapping-2d-image-texture-to-a-triangulated-model/21046/1 "2011-02-15T07:02:25Z")

</div>

Hi,

I have a ray tracer code. It runs fine and produces correct scene (of a triangulated model) without any textures.

Can anybody tell me how to map 2D texture images onto the scene, in CUDA, with different materials corresponding to different textures?

PS : I am not using OpenGL for displaying. I calculate colour values and generate a PPM image.

Thanks.
