image 贴图 ======================= Vertex shader *********************** 参数列表 ----------------------- ========= =============== ======================= ====================== 参数类型 数据类型 变量名 说明 ========= =============== ======================= ====================== in ``vec3`` ``point`` 由 manim 传入的点坐标 in ``vec2`` ``im_coords`` 坐标系 in ``float`` ``opacity`` 透明度 out ``vec2`` ``v_im_coords`` 传给 frag 的坐标系 out ``float`` ``v_opacity`` 传给 frag 的透明度 uniform ``sampler2D`` ``Texture`` 材质 ========= =============== ======================= ====================== Fragment shader *********************** 参数列表 ----------------------- ========= =============== ======================= ====================== 参数类型 数据类型 变量名 说明 ========= =============== ======================= ====================== in ``vec2`` ``v_im_coords`` 由 vert 传入的坐标系 in ``float`` ``v_opacity`` 由 vert 传入的透明度 out ``vec4`` ``frag_color`` 片段颜色 uniform ``sampler2D`` ``Texture`` 材质 ========= =============== ======================= ====================== 程序大致流程 *********************** .. image:: https://g.565455.xyz/manim-file/manimgl_assets/shaders/image_shader.svg