Files
bullet3/btgui/OpenGLWindow/Shaders/pointSpritePS.h
erwincoumans 3bf003ace1 change lcpp Lua preprocessor, to keep #defines and comments, remove empty lines
remove duplicate data in b3Contact4 (now in btContact4Data shared between CPU/C++ and OpenCL)
OpenCL kernels use #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Contact4Data.h"
Increase number of batches back to 250 (from 50), need to fix this hard coded number (see https://github.com/erwincoumans/bullet3/issues/12)
Work towards GJK/EPA, in addition to SAT/clipping (early on)
2013-08-08 12:24:09 -07:00

34 lines
934 B
C

//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
static const char* pointSpriteFragmentShader= \
"#version 330\n"
"precision highp float;\n"
"in Fragment\n"
"{\n"
" vec4 color;\n"
"} fragment;\n"
"in vec3 ambient;\n"
"out vec4 color;\n"
"void main_textured(void)\n"
"{\n"
" color = fragment.color;//texture2D(Diffuse,vert.texcoord);//fragment.color;\n"
"}\n"
"void main(void)\n"
"{\n"
" vec3 N;\n"
" N.xy = gl_PointCoord.st*vec2(2.0, -2.0) + vec2(-1.0, 1.0);\n"
" float mag = dot(N.xy, N.xy);\n"
" if (mag > 1.0) discard; \n"
" vec4 texel = vec4(1,0,0,1);//fragment.color*texture(Diffuse,vert.texcoord);//fragment.color;\n"
" vec3 ct;\n"
" float at,af;\n"
" af = 1.0;\n"
" \n"
" ct = texel.rgb;\n"
" at = texel.a;\n"
" \n"
" vec3 lightDir= vec3(1,0,0);\n"
" float diffuse = max(0.0, dot(lightDir, N));\n"
" color = vec4(ct * diffuse, at * af); \n"
"}\n"
;