I get an error on this line…
}
that snippet comes from the following code, if someone can please help me, because its bleedin retarded typing in “Syntax Error }” in google…
Shader "Custom/TileMatrix" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
sampler2D _TileMap;
sampler2D _TileIndex;
struct Input {
float2 _tc : TEXCOORD0;
};
float4 vert(float4 v:POSITION):SV_POSITION{
return v;
}
float4 frag(Input IN):COLOR{
float2 ip;
int4 i;
float2 j;
float2 p=IN._tc;
j.x=p.x/8;
j.y=p.y/8;
i=tex2D(_TileIndex,j);
j.x=p.x;
j.y=p.y;
j*=8;
j=modf(j,ip);
j/=8;
j.x+=i.r*0.125;
j.y+=i.r*0.125;
float4 c=tex2D(_TileMap,j);
return c;
}
ENDCG
} //<=- This is the Syntax Error....
}
Please keep in mind - before I wrote this, I had never even looked at CG, I’ve spent hours putting that together, most time spent looking through nvidia reference documents rather than actually thinking… its always frustrating trying to pick this stuff up, and any assistance is more than gratefully accepted…