Signed Distance Fields 1.0
vec3 v =

return the GLSL code retrieving a vec3 value in the 'FloatBuffer'

return the GLSL code retrieving a vec3 value in the 'FloatBuffer'

Parameters
ptrpointer to the start of the memory block in the 'FloatBuffer' (return value of the function PrimitiveManager::malloc)
indexGLSL expression of the index of the vec3 to retrieve. WARNING asking the i-th vector will read the value 3*i, 3*i+1 and 3*i+2
  • primitivesManager.GetVector(ptr, "i") + ";"
Author
Hubert-Brierre Pierre

v =