Jagwire
1
I like the transform affordances (translate axes, rotation circles, scale axes) shader for a couple reasons:
- They’re lit.
- They’re rendered on top of the objects they’re being applied toward.
- They stay the same absolute size across editor camera pans and so forth.
Is this shader available? What are the clutch aspects of such a shader if one wanted to recreate it?
thanks!
Jagwire
2
I was able to piece together the following surface shader which demonstrates the desired behavior. Critiques welcome!
Shader "Custom/Handles_Shader" {
Properties {
_MainColor ("Main Color", Color) = (1, 1, 1, 1)
}
SubShader {
Tags { "RenderType"="Transparent" "Queue"="Overlay" }
LOD 200
ZTest Always
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float4 color : COLOR;
};
float4 _MainColor;
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = _MainColor.rgb;
}
ENDCG
}
FallBack "Diffuse"
}