All Downloads are FREE. Search and download functionalities are using the official Maven repository.

shaders.metal.vs_led.bin Maven / Gradle / Ivy

The newest version!
VSHOE?Iu_dimensions@u_modelViewProj	u_sparkleP?#include 
#include 

using namespace metal;

struct _Global
{
    float4x4 u_modelViewProj;
    float4 u_dimensions;
    float4 u_sparkle;
};

struct xlatMtlMain_out
{
    float4 _entryPointOutput_v_color0 [[user(locn0)]];
    float2 _entryPointOutput_v_texcoord0 [[user(locn1)]];
    float3 _entryPointOutput_v_texcoord1 [[user(locn2)]];
    float4 gl_Position [[position]];
};

struct xlatMtlMain_in
{
    float4 a_color0 [[attribute(0)]];
    float3 a_position [[attribute(1)]];
    float2 a_texcoord0 [[attribute(2)]];
};

vertex xlatMtlMain_out xlatMtlMain(xlatMtlMain_in in [[stage_in]], constant _Global& _mtl_u [[buffer(0)]])
{
    xlatMtlMain_out out = {};
    float _286 = fast::max(fast::max(in.a_color0.x, in.a_color0.y), in.a_color0.z);
    float _463;
    if (_286 > 0.0)
    {
        _463 = (1.0 - pow(1.0 - _286, _mtl_u.u_dimensions.x)) / _286;
    }
    else
    {
        _463 = 1.0;
    }
    float3 _304 = in.a_color0.xyz * _463;
    float _307 = _304.x;
    float4 _310 = float4(_307, _304.yz, in.a_color0.w);
    float _352 = fast::max(fast::max(_307, _304.y), _304.z);
    float _359 = _mtl_u.u_sparkle.w + (_352 * _mtl_u.u_sparkle.z);
    float _361 = sin(_359);
    float _363 = cos(_359);
    float _367 = pow(_352, _mtl_u.u_sparkle.y);
    float _418 = mix(3.0, 1.0, _367);
    out.gl_Position = (_mtl_u.u_modelViewProj * float4(in.a_position, 1.0)) + (float4(float2(1.0, _mtl_u.u_dimensions.z) * (in.a_texcoord0 - float2(0.5)), 0.0, 0.0) * (_mtl_u.u_dimensions.w * mix(1.0, fast::clamp(length(_310.xyz), 0.0, 1.0), _mtl_u.u_dimensions.y)));
    out._entryPointOutput_v_color0 = _310;
    out._entryPointOutput_v_texcoord0 = in.a_texcoord0;
    out._entryPointOutput_v_texcoord1 = float3((0.5 + ((_418 * (in.a_texcoord0.x - 0.5)) * _363)) - ((_418 * (in.a_texcoord0.y - 0.5)) * _361), (0.5 + ((_418 * (in.a_texcoord0.x - 0.5)) * _361)) + ((_418 * (in.a_texcoord0.y - 0.5)) * _363), _mtl_u.u_sparkle.x * _367);
    return out;
}

`




© 2015 - 2024 Weber Informatics LLC | Privacy Policy