35 lines
812 B
Plaintext
35 lines
812 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct type_Uniforms
|
|
{
|
|
float brightnessFactor;
|
|
};
|
|
|
|
constant float4 _29 = {};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 out_var_SV_Target0 [[color(0)]];
|
|
float4 out_var_SV_Target1 [[color(1)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float3 in_var_TEXCOORD0 [[user(locn0)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant type_Uniforms& Uniforms [[buffer(0)]], texturecube<float> SkyboxTexture [[texture(0)]], sampler SkyboxSampler [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
float4 _39 = SkyboxTexture.sample(SkyboxSampler, in.in_var_TEXCOORD0) * Uniforms.brightnessFactor;
|
|
float4 _44 = _39;
|
|
_44.z = 0.0;
|
|
out.out_var_SV_Target0 = _44;
|
|
out.out_var_SV_Target1 = select(_29, _39, bool4(length(_39) > 1.0));
|
|
return out;
|
|
}
|
|
|