You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.3 KiB
Plaintext
76 lines
1.3 KiB
Plaintext
Shader "QO/Sprite Sub" {
|
|
Properties {
|
|
_MainTex ("Base (RGBA)", 2D) = "white" {}
|
|
_Color ("Color", Color) = (1,1,1,1)
|
|
_UVWH ("UVWH", Vector) = (0,0,1,1)
|
|
}
|
|
SubShader {
|
|
LOD 200
|
|
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
|
|
Pass {
|
|
Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
|
|
Blend SrcAlpha One
|
|
BlendOp RevSub
|
|
Program "vp" {
|
|
SubProgram "gles " {
|
|
"!!GLES
|
|
|
|
|
|
#ifdef VERTEX
|
|
|
|
varying lowp vec2 xlv_TEXCOORD0;
|
|
uniform highp vec4 _UVWH;
|
|
uniform highp mat4 glstate_matrix_mvp;
|
|
attribute vec4 _glesMultiTexCoord0;
|
|
attribute vec4 _glesVertex;
|
|
void main ()
|
|
{
|
|
lowp vec2 wh_1;
|
|
lowp vec2 uv_2;
|
|
lowp vec2 tmpvar_3;
|
|
highp vec2 tmpvar_4;
|
|
tmpvar_4 = _UVWH.xy;
|
|
uv_2 = tmpvar_4;
|
|
highp vec2 tmpvar_5;
|
|
tmpvar_5 = _UVWH.zw;
|
|
wh_1 = tmpvar_5;
|
|
highp vec2 tmpvar_6;
|
|
tmpvar_6 = ((_glesMultiTexCoord0.xy * wh_1) + uv_2);
|
|
tmpvar_3 = tmpvar_6;
|
|
gl_Position = (glstate_matrix_mvp * _glesVertex);
|
|
xlv_TEXCOORD0 = tmpvar_3;
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
#ifdef FRAGMENT
|
|
|
|
varying lowp vec2 xlv_TEXCOORD0;
|
|
uniform highp vec4 _Color;
|
|
uniform sampler2D _MainTex;
|
|
void main ()
|
|
{
|
|
mediump vec4 tmpvar_1;
|
|
mediump vec4 texcol_2;
|
|
lowp vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_MainTex, xlv_TEXCOORD0);
|
|
texcol_2 = tmpvar_3;
|
|
tmpvar_1 = (texcol_2 * _Color);
|
|
gl_FragData[0] = tmpvar_1;
|
|
}
|
|
|
|
|
|
|
|
#endif"
|
|
}
|
|
}
|
|
Program "fp" {
|
|
SubProgram "gles " {
|
|
"!!GLES"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Fallback "Diffuse"
|
|
} |