|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
18 #ifndef DS3D_GLPROCESS_GL_SCRIPT_H
19 #define DS3D_GLPROCESS_GL_SCRIPT_H
21 #include "ds3d/common/hpp/frame.hpp"
23 #include "ds3d/glprocess/gl_program.h"
24 #include "ds3d/glprocess/gl_buf.h"
26 #define GLSL_VERSION "#version 300 es\n"
28 namespace ds3d {
namespace gl {
32 "precision mediump float;\n"
33 "layout (location = 0) in vec3 inVert;\n"
34 "layout (location = 1) in vec2 inTexCoord;\n"
37 "out vec2 TexCoord;\n"
41 " gl_Position = mvp * vec4(inVert, 1.0);\n"
42 " TexCoord = vec2(inTexCoord.x, inTexCoord.y);\n"
47 "precision mediump float;\n"
49 "out vec4 FragColor;\n"
50 "uniform sampler2D imageTexture;\n"
54 " vec2 finalCoord = vec2(TexCoord.x, 1.0 - TexCoord.y);\n"
55 " FragColor = texture(imageTexture, finalCoord);\n"
62 "precision mediump float;\n"
63 "layout (location = 0) in PointType point;\n"
68 " gl_Position = mvp * vec4(point.x, point.y, point.z, 1.0);\n"
77 "precision mediump float;\n"
78 "layout (location = 0) in PointType point;\n"
80 "uniform vec2 xyzRange[3];\n"
84 " gl_Position = mvp * vec4(point.xyz, 1.0f);\n"
86 " if (point.z < xyzRange[2].x || point.z > xyzRange[2].y) { \n"
87 " gl_Position = vec4(2.0f, 2.0f, 2.0f, 1.0f);\n"
91 " if (point.y < xyzRange[1].x || point.y > xyzRange[1].y) { \n"
92 " gl_Position = vec4(2.0f, 2.0f, 2.0f, 1.0f);\n"
96 " if (point.x < xyzRange[0].x || point.x > xyzRange[0].y) { \n"
97 " gl_Position = vec4(2.0f, 2.0f, 2.0f, 1.0f);\n"
105 "precision mediump float;\n"
106 "out vec4 FragColor;\n"
107 "uniform vec4 color;\n"
111 " FragColor = color;\n"
117 "precision mediump float;\n"
118 "layout (location = 0) in vec3 vert;\n"
119 "layout (location = 1) in vec4 color;\n"
120 "uniform mat4 mvp;\n"
125 " gl_Position = mvp * vec4(vert.x, vert.y, vert.z, 1.0);\n"
132 "precision mediump float;\n"
134 "out vec4 FragColor;\n"
138 " FragColor = fColor;\n"
const std::string kLidarZRangeVertexScript
static const std::string kLidarBboxVertexScript
static const std::string kLidarFragmentScript
static const std::string kImageTextureVertexScript
static const std::string kLidarVertexScript
static const std::string kImageTextureFragmentScript
static const std::string kLidarBboxFragmentScript