Computer Science, asked by anupraj3476, 11 months ago

find minimum and maximum coordinates of screen

Answers

Answered by KumarRamendu
11
minnimum is 0 and maximum is 260
Answered by Arslankincsem
4

This code in C# would provide you with the desired ans:   struct appdata          {                  float4 vertex : POSITION;                  float2 uv : TEXCOORD0;              };              struct v2f              {                  float2 uv : TEXCOORD0;                  float4 vertex : SV_POSITION;                  float4 screenPos : TEXCOORD1;              };                       v2f vert (appdata v)              {                  v2f o;                  o.vertex = UnityObjectToClipPos(v.vertex);                  o.uv = v.uv;                  o.screenPos = ComputeScreenPos(o.vertex);                  return o;              }                       fixed4 frag (v2f i) : SV_Target              {                  float2 screenPos = i.screenPos.xy / i.screenPos.w;                  fixed4 col = fixed4(screenPos.xxx, 1);                  return col;              }

Similar questions