您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
46 行
937 B
46 行
937 B
Shader "${ShaderName}"
|
|
{
|
|
Properties
|
|
{
|
|
${ShaderPropertiesHeader}
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
Tags { "Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Opaque" }
|
|
|
|
ZWrite Off
|
|
Blend One Zero
|
|
|
|
Pass
|
|
{
|
|
CGPROGRAM
|
|
#include "UnityCustomRenderTexture.cginc"
|
|
#pragma vertex CustomRenderTextureVertexShader${ShaderIsUsingPreview}
|
|
#pragma fragment frag
|
|
#pragma target 4.0
|
|
|
|
v2f_customrendertexture CustomRenderTextureVertexShader_Preview(appdata_base IN)
|
|
{
|
|
v2f_customrendertexture OUT;
|
|
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
|
OUT.primitiveID = 0;//TODO
|
|
OUT.localTexcoord = IN.texcoord;
|
|
OUT.globalTexcoord = IN.texcoord;
|
|
OUT.direction = CustomRenderTextureComputeCubeDirection(OUT.globalTexcoord.xy);
|
|
return OUT;
|
|
}
|
|
|
|
${ShaderPropertyUsages}
|
|
|
|
${ShaderFunctions}
|
|
|
|
float4 frag(v2f_customrendertexture IN) : COLOR
|
|
{
|
|
${PixelShaderBody}
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
Fallback Off
|
|
}
|