opengl - Underlying implementation of normalize() and length() in GLSL -


what underlying implementation of normalize() , length() in glsl? trying gauge performance of code , know instructions being executed built in functions in glsl. can more information on underlying implementation of other built in functions?

the opengl shading language spec doesn't require particular implementation of functions, long give results specifies. in glsl 4.5, example, see correctness requirements on page 84, , functions length() , normalize() on page 150.

moreover, glsl doesn't define binary format compiled shader code; format accordingly implementation dependent.

however, in general, presume length function implemented using dot product , square root, , normalize function implemented calling length function , doing 3 divisions, or 1 division , vector multiplication.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -