|
NAMEimage_shader - Set the active shader for an object.SYNOPSISoldshidimage_shader( vid:image, string:identifier ) image_shader( vid:image, integer:identifier ) image_shader( vid:image, string:identifier, integer:attributes ) image_shader( vid:image, integer:identifier, integer:attributes ) DESCRIPTIONProcessing programs can be created using the build_shader call. These programs can then be assigned to an image through this function. if attributes are provided, the value is expected to be one of these constants:SHADER_DOMAIN_RENDERTARGET : find a rendertarget bound to image and assign the shader as the default program for objects using this rendertarget. if image does not contain a rendertarget, it is a terminal state transition. SHADER_DOMAIN_RENDERTARGET_HARD : same as for SHADER_DOMAIN_RENDERTARGET , except all shaders on objects attached to the rendertarget will be ignored. This is useful for a temporary suspension of all shaders, as well as for rendertargets created using define_linktarget . NOTES
EXAMPLEfunction image_shader0() shid = build_shader(nil, [[ void image_shader0(){ gl_FragColor = vec4(0.5, 1.0, 0.5, 1.0); } ]], "demoshader"); a = fill_surface(64, 64, 0, 0, 0); show_image(a); image_shader(a, shid); end SEE ALSO:build_shader(3) shader_ugroup(3) shader_uniform(3)
Visit the GSP FreeBSD Man Page Interface. |