Is it possible to do a shader to produce the following effect? (iOS) (as if it’s being drawn flatly through the cube regardless of it’s UV channel)

Is it possible to do a shader to produce the following effect? (iOS) (as if it’s being drawn flatly through the cube regardless of it’s UV channel)

is it even possible? Not sure of the technical term for this but was done quite a lot on the Amiga and PS1
Might be able to use ComputeScreenPos(v.vertex) or the iOS equivalent - and feed that through as the UVs?
exactly,
if you pass a ComputeScreenPos(o.pos) to the per pixel processing (with a scale and offset), then lookup that Ramp texture with e.g. perPixelOPosScaledAndOffset.y you will get the desired effect.
For some reason I had a hard time finding this thread, but it should be very close to what you want.
Shader "Simple/Silhouette" {
Properties {
_MainTex ("Base", 2D) = "white" { TexGen EyeLinear }
}
SubShader {
Pass {
SetTexture [_MainTex] {}
}
}
}
![]()
As explained in the other thread, you’ll need to do perspective division in the fragment shader if you want to avoid distortion from sampler perspective correction.
Cheers samland, that did the trick!