9 namespace visualization {
17 "uniform sampler2D image_texture;\n" 19 "out vec4 FragColor;\n" 23 " FragColor = texture(image_texture, UV);\n" 37 namespace visualization {
45 "uniform sampler2D image_texture;\n" 47 "uniform vec3 mask_color;\n" 48 "uniform float mask_alpha;\n" 50 "out vec4 FragColor;\n" 54 " FragColor = vec4(mask_color, texture(image_texture, UV).r * mask_alpha);\n" 68 namespace visualization {
75 "in vec3 vertex_position;\n" 76 "in vec2 vertex_UV;\n" 82 " gl_Position = vec4(vertex_position, 1);\n" 97 namespace visualization {
104 "in vec3 vertex_position;\n" 105 "in vec2 vertex_UV;\n" 109 "uniform vec3 vertex_scale;\n" 113 " gl_Position = vec4(vertex_position * vertex_scale, 1);\n" 128 namespace visualization {
135 "in vec3 vertex_normal_camera;\n" 136 "out vec4 FragColor;\n" 140 " FragColor = vec4(vertex_normal_camera * 0.5 + 0.5, 1);\n" 154 namespace visualization {
161 "in vec3 vertex_position;\n" 162 "in vec3 vertex_normal;\n" 164 "out vec3 vertex_normal_camera;\n" 166 "uniform mat4 MVP;\n" 172 " gl_Position = MVP * vec4(vertex_position, 1);\n" 173 " vertex_normal_camera = (V * M * vec4(vertex_normal, 0)).xyz;\n" 187 namespace visualization {
194 "in vec3 vertex_position_world;\n" 195 "in vec3 vertex_normal_camera;\n" 196 "in vec3 eye_dir_camera;\n" 197 "in mat4 light_dir_camera_4;\n" 198 "in vec3 fragment_color;\n" 200 "uniform mat4 light_color_4;\n" 201 "uniform vec4 light_diffuse_power_4;\n" 202 "uniform vec4 light_specular_power_4;\n" 203 "uniform vec4 light_specular_shininess_4;\n" 204 "uniform vec4 light_ambient;\n" 206 "out vec4 FragColor;\n" 210 " vec3 diffuse_color = fragment_color;\n" 211 " vec3 ambient_color = light_ambient.xyz * diffuse_color;\n" 212 " vec3 specular_color = vec3(1.0, 1.0, 1.0);\n" 215 " vec3 n, e, l, r;\n" 217 " n = normalize(vertex_normal_camera);\n" 218 " e = normalize(eye_dir_camera);\n" 219 " l = normalize(light_dir_camera_4[0].xyz);\n" 220 " r = reflect(-l, n);\n" 221 " cos_theta[0] = clamp(dot(n, l), 0, 1);\n" 222 " cos_alpha[0] = clamp(dot(e, r), 0, 1);\n" 224 " l= normalize(light_dir_camera_4[1].xyz);\n" 225 " r = reflect(-l, n);\n" 226 " cos_theta[1] = clamp(dot(n, l), 0, 1);\n" 227 " cos_alpha[1] = clamp(dot(e, r), 0, 1);\n" 229 " l= normalize(light_dir_camera_4[2].xyz);\n" 230 " r = reflect(-l, n);\n" 231 " cos_theta[2] = clamp(dot(n, l), 0, 1);\n" 232 " cos_alpha[2] = clamp(dot(e, r), 0, 1);\n" 234 " l= normalize(light_dir_camera_4[3].xyz);\n" 235 " r = reflect(-l, n);\n" 236 " cos_theta[3] = clamp(dot(n, l), 0, 1);\n" 237 " cos_alpha[3] = clamp(dot(e, r), 0, 1);\n" 239 " FragColor = vec4(ambient_color + \n" 240 " diffuse_color * light_color_4[0].xyz * light_diffuse_power_4[0] * cos_theta[0] +\n" 241 " specular_color * light_color_4[0].xyz * light_specular_power_4[0] * pow(cos_alpha[0], light_specular_shininess_4[0]) +\n" 242 " diffuse_color * light_color_4[1].xyz * light_diffuse_power_4[1] * cos_theta[1] +\n" 243 " specular_color * light_color_4[1].xyz * light_specular_power_4[1] * pow(cos_alpha[1], light_specular_shininess_4[1]) +\n" 244 " diffuse_color * light_color_4[2].xyz * light_diffuse_power_4[2] * cos_theta[2] +\n" 245 " specular_color * light_color_4[2].xyz * light_specular_power_4[2] * pow(cos_alpha[2], light_specular_shininess_4[2]) +\n" 246 " diffuse_color * light_color_4[3].xyz * light_diffuse_power_4[3] * cos_theta[3] +\n" 247 " specular_color * light_color_4[3].xyz * light_specular_power_4[3] * pow(cos_alpha[3], light_specular_shininess_4[3]), 1);\n" 261 namespace visualization {
268 "in vec3 vertex_position;\n" 269 "in vec3 vertex_normal;\n" 270 "in vec3 vertex_color;\n" 272 "out vec3 vertex_position_world;\n" 273 "out vec3 vertex_normal_camera;\n" 274 "out vec3 eye_dir_camera;\n" 275 "out mat4 light_dir_camera_4;\n" 276 "out vec3 fragment_color;\n" 278 "uniform mat4 MVP;\n" 281 "uniform mat4 light_position_world_4;\n" 285 " gl_Position = MVP * vec4(vertex_position, 1);\n" 286 " vertex_position_world = (M * vec4(vertex_position, 1)).xyz;\n" 288 " vec3 vertex_position_camera = (V * M * vec4(vertex_position, 1)).xyz;\n" 289 " eye_dir_camera = vec3(0, 0, 0) - vertex_position_camera;\n" 291 " vec4 v = vec4(vertex_position_camera, 1);\n" 292 " light_dir_camera_4 = V * light_position_world_4 - mat4(v, v, v, v);\n" 294 " vertex_normal_camera = (V * M * vec4(vertex_normal, 0)).xyz;\n" 295 " if (dot(eye_dir_camera, vertex_normal_camera) < 0.0)\n" 296 " vertex_normal_camera = vertex_normal_camera * -1.0;\n" 298 " fragment_color = vertex_color;\n" 312 namespace visualization {
319 "in vec4 fragment_color;\n" 320 "out vec4 FragColor;\n" 324 " FragColor = fragment_color;\n" 338 namespace visualization {
345 "in vec3 vertex_position;\n" 346 "in float vertex_index;\n" 347 "uniform mat4 MVP;\n" 349 "out vec4 fragment_color;\n" 353 " float r, g, b, a;\n" 354 " gl_Position = MVP * vec4(vertex_position, 1);\n" 355 " r = floor(vertex_index / 16777216.0) / 255.0;\n" 356 " g = mod(floor(vertex_index / 65536.0), 256.0) / 255.0;\n" 357 " b = mod(floor(vertex_index / 256.0), 256.0) / 255.0;\n" 358 " a = mod(vertex_index, 256.0) / 255.0;\n" 359 " fragment_color = vec4(r, g, b, a);\n" 373 namespace visualization {
380 "in vec3 fragment_color;\n" 381 "out vec4 FragColor;\n" 385 " FragColor = vec4(fragment_color, 1);\n" 399 namespace visualization {
406 "in vec3 vertex_position;\n" 407 "in vec3 vertex_color;\n" 409 "out vec3 fragment_color;\n" 413 " gl_Position = vec4(vertex_position, 1);\n" 414 " fragment_color = vertex_color;\n" 428 namespace visualization {
435 "out vec4 FragColor;\n" 439 " FragColor = vec4(0.1, 0.1, 0.1, 1);\n" 453 namespace visualization {
460 "in vec3 vertex_position;\n" 461 "uniform mat4 MVP;\n" 465 " gl_Position = MVP * vec4(vertex_position, 1);\n" 479 namespace visualization {
486 "in vec3 fragment_color;\n" 487 "out vec4 FragColor;\n" 491 " FragColor = vec4(fragment_color, 1);\n" 505 namespace visualization {
512 "in vec3 vertex_position;\n" 513 "in vec3 vertex_color;\n" 514 "uniform mat4 MVP;\n" 516 "out vec3 fragment_color;\n" 520 " gl_Position = MVP * vec4(vertex_position, 1);\n" 521 " fragment_color = vertex_color;\n" const char *const PhongFragmentShader
Definition: Shader.h:191
const char *const PickingVertexShader
Definition: Shader.h:342
const char *const PickingFragmentShader
Definition: Shader.h:316
const char *const ImageFragmentShader
Definition: Shader.h:13
const char *const ImageMaskFragmentShader
Definition: Shader.h:41
const char *const Simple2DVertexShader
Definition: Shader.h:403
const char *const NormalFragmentShader
Definition: Shader.h:132
Definition: PinholeCameraIntrinsic.cpp:33
const char *const PhongVertexShader
Definition: Shader.h:265
const char *const ImageMaskVertexShader
Definition: Shader.h:72
const char *const SimpleBlackFragmentShader
Definition: Shader.h:432
const char *const ImageVertexShader
Definition: Shader.h:101
const char *const SimpleVertexShader
Definition: Shader.h:509
const char *const Simple2DFragmentShader
Definition: Shader.h:377
const char *const SimpleBlackVertexShader
Definition: Shader.h:457
const char *const SimpleFragmentShader
Definition: Shader.h:483
const char *const NormalVertexShader
Definition: Shader.h:158