RetroArch
opaque.cg.h
Go to the documentation of this file.
1 #include "shaders_common.h"
2 
3 static const char *stock_cg_gl_program = CG(
4  struct input
5  {
6  float2 tex_coord;
7  float4 color;
8  float4 vertex_coord;
9  uniform float4x4 mvp_matrix;
10  uniform sampler2D texture;
11  };
12 
13  struct vertex_data
14  {
15  float2 tex;
16  float4 color;
17  };
18 
19  void main_vertex
20  (
21  out float4 oPosition : POSITION,
22  input IN,
23  out vertex_data vert
24  )
25  {
26  oPosition = mul(IN.mvp_matrix, IN.vertex_coord);
27  vert = vertex_data(IN.tex_coord, IN.color);
28  }
29 
30  float4 main_fragment(input IN, vertex_data vert, uniform sampler2D s0 : TEXUNIT0) : COLOR
31  {
32  return vert.color * tex2D(s0, vert.tex);
33  }
34 );
static const char * stock_cg_gl_program
Definition: opaque.cg.h:3
sampler2DBase< glm::vec4 > sampler2D
Definition: sampler.hpp:94
struct passwd out
Definition: missing_libc_functions.c:51
GLenum GLenum GLenum input
Definition: glext.h:9938
GLenum GLuint texture
Definition: glext.h:6935
GLuint color
Definition: glext.h:6883
#define CG(src)
Definition: shaders_common.h:9
Definition: glslang_tab.cpp:197