Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support builtin GLSL functions #2

Open
minggo opened this issue Oct 11, 2018 · 3 comments
Open

Support builtin GLSL functions #2

minggo opened this issue Oct 11, 2018 · 3 comments
Assignees

Comments

@minggo
Copy link

minggo commented Oct 11, 2018

No description provided.

@minggo
Copy link
Author

minggo commented Oct 11, 2018

@Mee-gu please update the progress here.

@Mee-gu
Copy link

Mee-gu commented Oct 12, 2018

  • rename struct name and function name.

  • remove in/out storage qualifiers when generating msl.

  • add shader file for test.

  • see more

@Mee-gu
Copy link

Mee-gu commented Oct 15, 2018

  • genType radians (genType degrees)

  • genType degrees (genType radians)

  • genType sin (genType angle)

  • genType cos (genType angle)

  • genType tan (genType angle)

  • genType asin (genType x)

  • genType acos (genType x)

  • genType atan (genType y, genType x)

  • genType atan (genType y_over_x)

  • genType pow (genType x, genType y)

  • genType exp (genType x)

  • genType log (genType x)

  • genType exp2 (genType x)

  • genType log2 (genType x)

  • genType sqrt (genType x)

  • genType inversesqrt (genType x) --> convert to genType rsqrt(genType x)

  • genType abs (genType x)

  • genType sign (genType x)

  • genType floor (genType x)

  • genType ceil (genType x)

  • genType fract (genType x)

  • genType mod (genType x, float y) --> convert to genType fmod(genType x, float y)

  • genType mod (genType x, genType y) --> convert to genType fmod(genType x, genType y)

  • genType min (genType x, genType y)

  • genType min (genType x, float y)

  • genType max (genType x, genType y)

  • genType max (genType x, float y)

  • genType clamp (genType x,
    genType minVal,
    genType maxVal)

  • genType clamp (genType x,
    float minVal,
    float maxVal)

  • genType mix (genType x,
    genType y,
    genType a)

  • genType mix (genType x,
    genType y,
    float a)

  • genType step (genType edge, genType x)

  • genType step (float edge, genType x)

  • genType smoothstep (genType edge0,
    genType edge1,
    genType x)

  • genType smoothstep (float edge0,
    float edge1,
    genType x)

  • float length (genType x)

  • float distance (genType p0, genType p1)

  • float dot (genType x, genType y)

  • vec3 cross (vec3 x, vec3 y)

  • genType normalize (genType x)

  • genType faceforward(genType N,
    genType I,
    genType Nref)

  • genType reflect (genType I, genType N)

  • genType refract(genType I, genType N,
    float eta)

  • mat matrixCompMult (mat x, mat y)

  • bvec lessThan(vec x, vec y)

  • bvec lessThan(ivec x, ivec y)

  • bvec lessThanEqual(vec x, vec y)

  • bvec lessThanEqual(ivec x, ivec y)

  • bvec greaterThan(vec x, vec y)

  • bvec greaterThan(ivec x, ivec y)

  • bvec greaterThanEqual(vec x, vec y)

  • bvec greaterThanEqual(ivec x, ivec y)

  • bvec equal(vec x, vec y)

  • bvec equal(ivec x, ivec y)

  • bvec equal(bvec x, bvec y)

  • bvec notEqual(vec x, vec y)

  • bvec notEqual(ivec x, ivec y)

  • bvec notEqual(bvec x, bvec y)

  • bool any(bvec x)

  • bool all(bvec x)

  • bvec not(bvec x)

  • vec4 texture2D (sampler2D sampler, vec2 coord )

  • vec4 texture2D (sampler2D sampler, vec2 coord, float bias)

  • vec4 texture2DProj (sampler2D sampler, vec3 coord )

  • vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias)

  • vec4 texture2DProj (sampler2D sampler, vec4 coord)

  • vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias)

  • vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod)

  • vec4 texture2DProjLod (sampler2D sampler, vec3 coord, float lod)

  • vec4 texture2DProjLod (sampler2D sampler, vec4 coord, float lod)

  • vec4 textureCube (samplerCube sampler, vec3 coord )

  • vec4 textureCube (samplerCube sampler, vec3 coord, float bias )

  • vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants