# simple_transparent.yaml
vertex_shader: |
  #version 330
  uniform mat4 p3d_ModelViewProjectionMatrix;
  in vec4 p3d_Vertex;
  in vec2 p3d_MultiTexCoord0;
  out vec2 texcoord;
  void main() {
      gl_Position = p3d_ModelViewProjectionMatrix * p3d_Vertex;
      texcoord = p3d_MultiTexCoord0;
  }

fragment_shader: |
  #version 330
  uniform sampler2D p3d_Texture0;
  uniform float material_opacity = 1.0;
  in vec2 texcoord;
  out vec4 o_color;
  void main() {
      vec4 c = texture(p3d_Texture0, texcoord);
      o_color = vec4(c.rgb, c.a * material_opacity);
  }

render_states:
  TransparencyAttrib: M_alpha
  DepthWriteAttrib: 0