Need help with GLSL/HLSL

I am newbie to GLSL and HLSL programming. I am trying to do the below operations using some functions with shader programming. Any suggestions or reference code or links would help.
1)HLSL/GLSL function test to check if two vectors lie on single line
2) HLSL/GLSL function to find the angle between vectors v1 and v2 is acute (less than 90)
3)HLSL/GLSL function to convert linear value to gamma corrected value
4)HLSL/GLSL function to compute lambert diffuse term . Compute Lambert diffuse term where L = light vector, N = normal vector, V = view vector, Kd diffuse coeff

You forgot to mention that this is not a homework assignment. You just so happen to always order your private thoughts in nice, numbered task lists of increasing difficulty.

@SeppJ This is not home assignment. I am learning GLSL and HLSL programming. So need some pointers to start with those queries.

@tampere2021 sagte in Need help with GLSL/HLSL:
@SeppJ This is not home assignment. I am learning GLSL and HLSL programming. So need some pointers to start with those queries.
Then search for some references, tutorials, books or something similar. Try to implement the operations by yourself and ask when you encounter a problem with specific code.

@tampere2021 sagte in Need help with GLSL/HLSL:
I am learning GLSL and HLSL programming. So need some pointers to start with those queries.
https://community.khronos.org/
is the forum for those queries.
