Open3D (C++ API)
Data Structures | Variables
open3d::visualization::glsl Namespace Reference

Data Structures

class  CoordinateFrameRenderer
 
class  GeometryRenderer
 
class  ImageMaskShader
 
class  ImageMaskShaderForImage
 
class  ImageRenderer
 
class  ImageShader
 
class  ImageShaderForImage
 
class  LineSetRenderer
 
class  NormalShader
 
class  NormalShaderForPointCloud
 
class  NormalShaderForTriangleMesh
 
class  PhongShader
 
class  PhongShaderForPointCloud
 
class  PhongShaderForTriangleMesh
 
class  PickingShader
 
class  PickingShaderForPointCloud
 
class  PointCloudPickerRenderer
 
class  PointCloudPickingRenderer
 
class  PointCloudRenderer
 
class  SelectionPolygonRenderer
 
class  ShaderWrapper
 
class  Simple2DShader
 
class  Simple2DShaderForSelectionPolygon
 
class  SimpleBlackShader
 
class  SimpleBlackShaderForPointCloudNormal
 
class  SimpleBlackShaderForTriangleMeshWireFrame
 
class  SimpleShader
 
class  SimpleShaderForLineSet
 
class  SimpleShaderForPointCloud
 
class  SimpleShaderForTriangleMesh
 
class  SimpleShaderForVoxelGrid
 
class  TriangleMeshRenderer
 
class  VoxelGridRenderer
 

Variables

const char *const ImageFragmentShader
 
const char *const ImageMaskFragmentShader
 
const char *const ImageMaskVertexShader
 
const char *const ImageVertexShader
 
const char *const NormalFragmentShader
 
const char *const NormalVertexShader
 
const char *const PhongFragmentShader
 
const char *const PhongVertexShader
 
const char *const PickingFragmentShader
 
const char *const PickingVertexShader
 
const char *const Simple2DFragmentShader
 
const char *const Simple2DVertexShader
 
const char *const SimpleBlackFragmentShader
 
const char *const SimpleBlackVertexShader
 
const char *const SimpleFragmentShader
 
const char *const SimpleVertexShader
 

Variable Documentation

◆ ImageFragmentShader

const char* const open3d::visualization::glsl::ImageFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec2 UV;\n"
"uniform sampler2D image_texture;\n"
"\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = texture(image_texture, UV);\n"
"}\n"

◆ ImageMaskFragmentShader

const char* const open3d::visualization::glsl::ImageMaskFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec2 UV;\n"
"uniform sampler2D image_texture;\n"
"\n"
"uniform vec3 mask_color;\n"
"uniform float mask_alpha;\n"
"\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = vec4(mask_color, texture(image_texture, UV).r * mask_alpha);\n"
"}\n"

◆ ImageMaskVertexShader

const char* const open3d::visualization::glsl::ImageMaskVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in vec2 vertex_UV;\n"
"\n"
"out vec2 UV;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = vec4(vertex_position, 1);\n"
" UV = vertex_UV;\n"
"}\n"

◆ ImageVertexShader

const char* const open3d::visualization::glsl::ImageVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in vec2 vertex_UV;\n"
"\n"
"out vec2 UV;\n"
"\n"
"uniform vec3 vertex_scale;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = vec4(vertex_position * vertex_scale, 1);\n"
" UV = vertex_UV;\n"
"}\n"

◆ NormalFragmentShader

const char* const open3d::visualization::glsl::NormalFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_normal_camera;\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = vec4(vertex_normal_camera * 0.5 + 0.5, 1);\n"
"}\n"

◆ NormalVertexShader

const char* const open3d::visualization::glsl::NormalVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in vec3 vertex_normal;\n"
"\n"
"out vec3 vertex_normal_camera;\n"
"\n"
"uniform mat4 MVP;\n"
"uniform mat4 V;\n"
"uniform mat4 M;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = MVP * vec4(vertex_position, 1);\n"
" vertex_normal_camera = (V * M * vec4(vertex_normal, 0)).xyz;\n"
"}\n"

◆ PhongFragmentShader

const char* const open3d::visualization::glsl::PhongFragmentShader

◆ PhongVertexShader

const char* const open3d::visualization::glsl::PhongVertexShader

◆ PickingFragmentShader

const char* const open3d::visualization::glsl::PickingFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec4 fragment_color;\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = fragment_color;\n"
"}\n"

◆ PickingVertexShader

const char* const open3d::visualization::glsl::PickingVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in float vertex_index;\n"
"uniform mat4 MVP;\n"
"\n"
"out vec4 fragment_color;\n"
"\n"
"void main()\n"
"{\n"
" float r, g, b, a;\n"
" gl_Position = MVP * vec4(vertex_position, 1);\n"
" r = floor(vertex_index / 16777216.0) / 255.0;\n"
" g = mod(floor(vertex_index / 65536.0), 256.0) / 255.0;\n"
" b = mod(floor(vertex_index / 256.0), 256.0) / 255.0;\n"
" a = mod(vertex_index, 256.0) / 255.0;\n"
" fragment_color = vec4(r, g, b, a);\n"
"}\n"

◆ Simple2DFragmentShader

const char* const open3d::visualization::glsl::Simple2DFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 fragment_color;\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = vec4(fragment_color, 1);\n"
"}\n"

◆ Simple2DVertexShader

const char* const open3d::visualization::glsl::Simple2DVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in vec3 vertex_color;\n"
"\n"
"out vec3 fragment_color;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = vec4(vertex_position, 1);\n"
" fragment_color = vertex_color;\n"
"}\n"

◆ SimpleBlackFragmentShader

const char* const open3d::visualization::glsl::SimpleBlackFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = vec4(0.1, 0.1, 0.1, 1);\n"
"}\n"

◆ SimpleBlackVertexShader

const char* const open3d::visualization::glsl::SimpleBlackVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"uniform mat4 MVP;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = MVP * vec4(vertex_position, 1);\n"
"}\n"

◆ SimpleFragmentShader

const char* const open3d::visualization::glsl::SimpleFragmentShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 fragment_color;\n"
"out vec4 FragColor;\n"
"\n"
"void main()\n"
"{\n"
" FragColor = vec4(fragment_color, 1);\n"
"}\n"

◆ SimpleVertexShader

const char* const open3d::visualization::glsl::SimpleVertexShader
Initial value:
=
"#version 330\n"
"\n"
"in vec3 vertex_position;\n"
"in vec3 vertex_color;\n"
"uniform mat4 MVP;\n"
"\n"
"out vec3 fragment_color;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = MVP * vec4(vertex_position, 1);\n"
" fragment_color = vertex_color;\n"
"}\n"