File: instancingPS.h

package info (click to toggle)
bullet 2.83.7%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 48,772 kB
  • sloc: cpp: 355,312; lisp: 12,087; ansic: 11,969; python: 644; makefile: 116; xml: 27
file content (34 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
static const char* instancingFragmentShader= \
"#version 330\n"
"precision highp float;\n"
"in Fragment\n"
"{\n"
"     vec4 color;\n"
"} fragment;\n"
"in Vert\n"
"{\n"
"	vec2 texcoord;\n"
"} vert;\n"
"uniform sampler2D Diffuse;\n"
"in vec3 lightDir,normal,ambient;\n"
"out vec4 color;\n"
"void main_textured(void)\n"
"{\n"
"   color  = vec4(0.1,0.2,0.3,0.3);\n"
"}\n"
"void main(void)\n"
"{\n"
"    vec4 texel = fragment.color*texture(Diffuse,vert.texcoord);//fragment.color;\n"
"	vec3 ct,cf;\n"
"	float intensity,at,af;\n"
"	intensity = max(dot(lightDir,normalize(normal)),0);\n"
"	cf = intensity*(vec3(1.0,1.0,1.0)-ambient)+ambient;\n"
"	af = 1.0;\n"
"		\n"
"	ct = texel.rgb;\n"
"	at = texel.a;\n"
"		\n"
"	color  = vec4(ct * cf, at * af);	\n"
"}\n"
;