PyBullet OpenGL/EGL hardware getCameraImage: use glViewport to reduce the glReadPixels calling cost dramatically for small images
PyBullet Allow OpenGL/EGL hardware to render segmentation mask. Use pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX or pybullet.ER_SEGMENTATION_MASK PyBullet.removeBody fix indexing bug (use foundIndex, not i) PyBullet bump up version to 2.2.3
This commit is contained in:
15
examples/OpenGLWindow/Shaders/segmentationMaskInstancingPS.h
Normal file
15
examples/OpenGLWindow/Shaders/segmentationMaskInstancingPS.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
|
||||
static const char* segmentationMaskInstancingFragmentShader =
|
||||
"#version 330\n"
|
||||
"precision highp float;\n"
|
||||
"in vec4 scale_obuid;\n"
|
||||
"out vec4 color;\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" highp int obuid = int(scale_obuid.w);\n"
|
||||
" float r = ((obuid>>0 )&0xff)*(1./255.f);\n"
|
||||
" float g = ((obuid>>8 )&0xff)*(1./255.f);\n"
|
||||
" float b = ((obuid>>16)&0xff)*(1./255.f);\n"
|
||||
" float a = ((obuid>>24)&0xff)*(1./255.f);\n"
|
||||
" color = vec4(r,g,b,a);\n"
|
||||
"}\n";
|
||||
Reference in New Issue
Block a user