2021-05-27 21:07:56 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
float4 value [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-06-01 17:42:41 +00:00
|
|
|
void bitwise_i32() {
|
|
|
|
int s1 = 0;
|
|
|
|
int s2 = 0;
|
|
|
|
int3 v1 = 0;
|
|
|
|
int3 v2 = 0;
|
|
|
|
s1 = (s1 | s2);
|
|
|
|
s1 = (s1 & s2);
|
|
|
|
s1 = (s1 ^ s2);
|
|
|
|
v1 = (v1 | v2);
|
|
|
|
v1 = (v1 & v2);
|
|
|
|
v1 = (v1 ^ v2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void bitwise_u32() {
|
|
|
|
uint s1 = 0u;
|
|
|
|
uint s2 = 0u;
|
|
|
|
uint3 v1 = 0u;
|
|
|
|
uint3 v2 = 0u;
|
|
|
|
s1 = (s1 | s2);
|
|
|
|
s1 = (s1 & s2);
|
|
|
|
s1 = (s1 ^ s2);
|
|
|
|
v1 = (v1 | v2);
|
|
|
|
v1 = (v1 & v2);
|
|
|
|
v1 = (v1 ^ v2);
|
|
|
|
}
|
|
|
|
|
2021-05-27 21:07:56 +00:00
|
|
|
void vector_scalar_f32() {
|
|
|
|
float3 v = 0.0f;
|
|
|
|
float s = 0.0f;
|
|
|
|
float3 r = 0.0f;
|
|
|
|
r = (v + s);
|
|
|
|
r = (v - s);
|
|
|
|
r = (v * s);
|
|
|
|
r = (v / s);
|
|
|
|
}
|
|
|
|
|
|
|
|
void vector_scalar_i32() {
|
|
|
|
int3 v = 0;
|
|
|
|
int s = 0;
|
|
|
|
int3 r = 0;
|
|
|
|
r = (v + s);
|
|
|
|
r = (v - s);
|
|
|
|
r = (v * s);
|
|
|
|
r = (v / s);
|
|
|
|
r = (v % s);
|
|
|
|
}
|
|
|
|
|
|
|
|
void vector_scalar_u32() {
|
|
|
|
uint3 v = 0u;
|
|
|
|
uint s = 0u;
|
|
|
|
uint3 r = 0u;
|
|
|
|
r = (v + s);
|
|
|
|
r = (v - s);
|
|
|
|
r = (v * s);
|
|
|
|
r = (v / s);
|
|
|
|
r = (v % s);
|
|
|
|
}
|
|
|
|
|
|
|
|
void scalar_vector_f32() {
|
|
|
|
float3 v = 0.0f;
|
|
|
|
float s = 0.0f;
|
|
|
|
float3 r = 0.0f;
|
|
|
|
r = (s + v);
|
|
|
|
r = (s - v);
|
|
|
|
r = (s * v);
|
|
|
|
r = (s / v);
|
|
|
|
}
|
|
|
|
|
|
|
|
void scalar_vector_i32() {
|
|
|
|
int3 v = 0;
|
|
|
|
int s = 0;
|
|
|
|
int3 r = 0;
|
|
|
|
r = (s + v);
|
|
|
|
r = (s - v);
|
|
|
|
r = (s * v);
|
|
|
|
r = (s / v);
|
|
|
|
r = (s % v);
|
|
|
|
}
|
|
|
|
|
|
|
|
void scalar_vector_u32() {
|
|
|
|
uint3 v = 0u;
|
|
|
|
uint s = 0u;
|
|
|
|
uint3 r = 0u;
|
|
|
|
r = (s + v);
|
|
|
|
r = (s - v);
|
|
|
|
r = (s * v);
|
|
|
|
r = (s / v);
|
|
|
|
r = (s % v);
|
|
|
|
}
|
|
|
|
|
2021-05-31 15:53:20 +00:00
|
|
|
void matrix_matrix_f32() {
|
|
|
|
float3x4 m34 = float3x4(0.0f);
|
|
|
|
float4x3 m43 = float4x3(0.0f);
|
|
|
|
float3x3 m33 = float3x3(0.0f);
|
|
|
|
float4x4 m44 = float4x4(0.0f);
|
|
|
|
m34 = (m34 + m34);
|
|
|
|
m34 = (m34 - m34);
|
|
|
|
m33 = (m43 * m34);
|
|
|
|
m44 = (m34 * m43);
|
|
|
|
}
|
|
|
|
|
2021-05-27 21:07:56 +00:00
|
|
|
fragment tint_symbol_1 tint_symbol() {
|
2021-06-03 18:12:15 +00:00
|
|
|
tint_symbol_1 const tint_symbol_2 = {.value=float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
2021-06-01 12:08:20 +00:00
|
|
|
return tint_symbol_2;
|
2021-05-27 21:07:56 +00:00
|
|
|
}
|
|
|
|
|