Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // vmath = float, vector, matrix
- // matrix = float3x3 or float4x4
- // scalar = float, vector
- // vector = float2, float3, float4
- // any = int, float, float2, float3, float4, matrix, bool, object
- //======================================================
- // basic math
- //======================================================
- vmath radians(vmath value);
- vmath degrees(vmath value);
- //======================================================
- // Trig
- //======================================================
- @Cosine
- vmath cos(vmath value);
- @ArcCosine
- vmath acos(vmath value);
- @Sine
- vmath sin(vmath value);
- @ArcSine
- vmath asin(vmath value);
- @Tang
- vmath tan(vmath value);
- @ArcTan
- vmath atan(vmath value);
- @ArcTan2
- vmath atan2(vmath y, vmath x);
- @Hyperbolic Cosine
- vmath cosh(vmath value);
- @Hypberbolic Sine
- vmath sinh(vmath value);
- @Hypberbolic Tan
- vmath tanh(vmath value);
- vmath pow(vmath x, fmath y);
- vmath exp(vmath x);
- vmath exp2(vmath x);
- vmath log(vmath x);
- vmath log2(vmath x);
- vmath sqrt(vmath x);
- vmath rsqrt(vmath x);
- vmath abs(vmath x);
- vmath sign(vmath x);
- vmath floor(vmath x);
- vmath ceil(vmath x);
- vmath frac(vmath x);
- vmath fmod(vmath x, vmath y);
- vmath round(vmath x);
- vmath min(vmath x, vmath y);
- vmath max(vmath x, vmath y);
- vmath clamp(vmath val, vmath min, vmath max);
- vmath lerp(vmath a, vmath b, float t);
- vmath step(vmath a, vmath b);
- vmath smoothstep(vmath edgeA, vmath edgeB, vmath x);
- @Truncate
- vector trunc(vector v);
- float length(vmath x);
- float distance(vmath p0, vmath p1);
- vector dst(vector a, vector b);
- float dot(scalar x, scalar y);
- float3 cross(float3 x, float3 y);
- vector normalize(vector v);
- float determinant(matrix m);
- matrix transpose(matrix m);
- @Face Forward
- scalar faceforward(scalar N, scalar, I, scalar nRef);
- scalar reflect(scalar I, scalar N);
- scalar refract(scalar I, scalar N, float eta);
- //void clip(scalar below);
- float ddx(scalar coord);
- float ddy(scalar coord);
- @Is Infinite
- bool isinfinite(scalar value);
- @Is Not a Number
- bool isnan(scalar value);
- scalar saturate(scalar value);
- float3 GetSpecularIBL(float3 val, float3 oVal) {
- return val * oVal + distance(val, oVal);
- }
- //float4 tex1D(sampler1D, float);
- //float4 tex2D(sampler2D, float2);
- //float4 tex3D(sampler3D, float3);
- //float4 texCUBE(samplerCUBE, float3);
- //float4 tex1Dbias(sampler1D, float4);
- //float4 tex2Dbias(sampler2D, float4);
- //float4 tex3Dbias(sampler3D, float4);
- //float4 texCUBEbias(samplerCUBE, float4);
- //float4 tex1Dgrad(sampler1D, float, float ddx, float ddy);
- //float4 tex2Dgrad(sampler2D, float2, float ddx, float ddy);
- //float4 tex3Dgrad(sampler3D, float3, float ddx, float ddy);
- //float4 texCUBEgrad(samplerCUBE, float2, float ddx, float ddy);
- //float4 tex1Dlod(sampler1D, float4);
- //float4 tex2Dlod(sampler2D, float4);
- //float4 tex3Dlod(sampler3D, float4);
- //float4 texCUBElod(samplerCUBE, float4);
- //float4 tex1Dproj(sampler1D, float4);
- //float4 tex2Dproj(sampler2D, float4);
- //float4 tex3Dproj(sampler3D, float4);
- //float4 texCUBEproj(samplerCUBE, float4);
Add Comment
Please, Sign In to add comment