Unlit_SubtractBlockBlender.glsl
源文件:
shaders/Unlit_SubtractBlockBlender.glsl
glsl
// shader : Unlit/SubtractBlockBlender
// asset : sharedassets12.assets
// platform : 9
#ifdef VERTEX
#version 300 es
#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
#if HLSLCC_ENABLE_UNIFORM_BUFFERS
#define UNITY_UNIFORM
#else
#define UNITY_UNIFORM uniform
#endif
#define UNITY_SUPPORTS_UNIFORM_LOCATION 1
#if UNITY_SUPPORTS_UNIFORM_LOCATION
#define UNITY_LOCATION(x) layout(location = x)
#define UNITY_BINDING(x) layout(binding = x, std140)
#else
#define UNITY_LOCATION(x)
#define UNITY_BINDING(x) layout(std140)
#endif
uniform vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
uniform vec4 hlslcc_mtx4x4unity_MatrixVP[4];
in highp vec4 in_POSITION0;
in highp vec2 in_TEXCOORD0;
out highp vec2 vs_TEXCOORD0;
vec4 u_xlat0;
vec4 u_xlat1;
void main()
{
vs_TEXCOORD0.xy = in_TEXCOORD0.xy;
u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_MatrixVP[1];
u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[0] * u_xlat0.xxxx + u_xlat1;
u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[2] * u_xlat0.zzzz + u_xlat1;
gl_Position = hlslcc_mtx4x4unity_MatrixVP[3] * u_xlat0.wwww + u_xlat1;
return;
}
#endif
#ifdef FRAGMENT
#version 300 es
precision highp float;
precision highp int;
#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
#if HLSLCC_ENABLE_UNIFORM_BUFFERS
#define UNITY_UNIFORM
#else
#define UNITY_UNIFORM uniform
#endif
#define UNITY_SUPPORTS_UNIFORM_LOCATION 1
#if UNITY_SUPPORTS_UNIFORM_LOCATION
#define UNITY_LOCATION(x) layout(location = x)
#define UNITY_BINDING(x) layout(binding = x, std140)
#else
#define UNITY_LOCATION(x)
#define UNITY_BINDING(x) layout(std140)
#endif
uniform mediump float _ClampThresholdLow;
uniform mediump float _ClampThresholdHigh;
UNITY_LOCATION(0) uniform mediump sampler2D _MainTex;
in highp vec2 vs_TEXCOORD0;
layout(location = 0) out mediump float SV_Target0;
float u_xlat0;
bvec2 u_xlatb0;
mediump vec2 u_xlat16_1;
void main()
{
u_xlat0 = texture(_MainTex, vs_TEXCOORD0.xy).x;
u_xlatb0.xy = greaterThanEqual(vec4(u_xlat0), vec4(_ClampThresholdLow, _ClampThresholdHigh, _ClampThresholdLow, _ClampThresholdLow)).xy;
u_xlat16_1.x = (u_xlatb0.x) ? float(1.0) : float(0.0);
u_xlat16_1.y = (u_xlatb0.y) ? float(-1.0) : float(-0.0);
SV_Target0 = u_xlat16_1.y + u_xlat16_1.x;
return;
}
#endif
��������u
�����������������������I��#ifdef VERTEX
#version 300 es
#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
#if HLSLCC_ENABLE_UNIFORM_BUFFERS
#define UNITY_UNIFORM
#else
#define UNITY_UNIFORM uniform
#endif
#define UNITY_SUPPORTS_UNIFORM_LOCATION 1
#if UNITY_SUPPORTS_UNIFORM_LOCATION
#define UNITY_LOCATION(x) layout(location = x)
#define UNITY_BINDING(x) layout(binding = x, std140)
#else
#define UNITY_LOCATION(x)
#define UNITY_BINDING(x) layout(std140)
#endif
uniform vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
uniform vec4 hlslcc_mtx4x4unity_MatrixVP[4];
in highp vec4 in_POSITION0;
in highp vec2 in_TEXCOORD0;
out highp vec2 vs_TEXCOORD0;
vec4 u_xlat0;
vec4 u_xlat1;
void main()
{
vs_TEXCOORD0.xy = in_TEXCOORD0.xy;
u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_MatrixVP[1];
u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[0] * u_xlat0.xxxx + u_xlat1;
u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[2] * u_xlat0.zzzz + u_xlat1;
gl_Position = hlslcc_mtx4x4unity_MatrixVP[3] * u_xlat0.wwww + u_xlat1;
return;
}
#endif
#ifdef FRAGMENT
#version 300 es
precision highp float;
precision highp int;
#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
#if HLSLCC_ENABLE_UNIFORM_BUFFERS
#define UNITY_UNIFORM
#else
#define UNITY_UNIFORM uniform
#endif
#define UNITY_SUPPORTS_UNIFORM_LOCATION 1
#if UNITY_SUPPORTS_UNIFORM_LOCATION
#define UNITY_LOCATION(x) layout(location = x)
#define UNITY_BINDING(x) layout(binding = x, std140)
#else
#define UNITY_LOCATION(x)
#define UNITY_BINDING(x) layout(std140)
#endif
uniform mediump float _ClampThresholdLow;
uniform mediump float _ClampThresholdHigh;
UNITY_LOCATION(0) uniform mediump sampler2D _MainTex;
in highp vec2 vs_TEXCOORD0;
layout(location = 0) out mediump vec2 SV_Target0;
mediump vec2 u_xlat16_0;
bvec3 u_xlatb0;
mediump vec2 u_xlat16_1;
mediump float u_xlat16_3;
mediump float u_xlat16_5;
void main()
{
u_xlat16_0.xy = texture(_MainTex, vs_TEXCOORD0.xy).xy;
u_xlatb0.xz = greaterThanEqual(u_xlat16_0.xxxx, vec4(_ClampThresholdLow, _ClampThresholdLow, _ClampThresholdHigh, _ClampThresholdLow)).xz;
u_xlat16_1.x = (u_xlatb0.x) ? float(1.0) : float(0.0);
u_xlat16_1.y = (u_xlatb0.z) ? float(-1.0) : float(-0.0);
u_xlat16_1.x = u_xlat16_1.y + u_xlat16_1.x;
u_xlat16_3 = u_xlat16_0.y + -0.200000003;
u_xlat16_3 = u_xlat16_3 * -10.0;
u_xlat16_3 = clamp(u_xlat16_3, 0.0, 1.0);
u_xlat16_5 = u_xlat16_3 * -2.0 + 3.0;
u_xlat16_3 = u_xlat16_3 * u_xlat16_3;
u_xlat16_1.x = u_xlat16_5 * u_xlat16_3 + u_xlat16_1.x;
u_xlat16_3 = u_xlat16_0.y * u_xlat16_1.x;
SV_Target0.x = u_xlat16_1.x;
SV_Target0.y = u_xlat16_3 * 10.0;
return;
}
#endif