cf_canvas_get_target2¶
Category: graphics
GitHub: cute_graphics.h
Fetches one of the canvas's color targets as a texture, by index.
| Parameters | Description |
|---|---|
canvas |
The canvas. |
index |
Which color target, from 0 to target_count - 1. |
Return Value¶
Returns the texture backing that color target, or a zero'd texture for an out-of-range index. cf_canvas_get_target is equivalent to index 0.
Remarks¶
This is how a later pass samples a g-buffer: bind each target you need with cf_material_set_texture_fs (or cf_draw_set_texture).
Related Pages¶
CF_Canvas
cf_canvas_get_target
cf_canvas_readback2
CF_CanvasParams