cf_make_draw_shader_from_source¶
Category: draw
GitHub: cute_draw.h
Creates a custom draw shader from source string.
Remarks¶
Your shader must be written in GLSL 450, and must follow some specific rules to be compatible with the draw API. For more in-depth explanations,
see CF's docs on Draw Shaders. If you wish to include other files into
your shader via #include make sure to call cf_shader_directory first.
If you use custom SDF shapes, register them all via cf_make_custom_shape before creating draw shaders -- a draw shader bakes in the set of
custom shapes that exist when it compiles, so shapes registered afterwards render invisibly under it.
Related Pages¶
CF_Shader
cf_draw_push_shader
cf_draw_pop_shader
cf_draw_peek_shader
cf_make_custom_shape