This repository has been archived on 2024-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
CatlikeCoding-Unity/Assets/Point/Point Surface.shader

32 lines
491 B
Plaintext
Raw Permalink Normal View History

2021-01-29 11:12:56 +00:00
Shader "Graph/Point Surface"
{
Properties
{
_Smoothness("Smoothness", Range(0, 1)) = 0.5
}
SubShader
{
CGPROGRAM
#pragma surface ConfigureSurface Standard fullforwardshadows
#pragma target 3.0
struct Input
{
float3 worldPos;
};
float _Smoothness;
void ConfigureSurface(Input input, inout SurfaceOutputStandard surface)
{
surface.Albedo = saturate(input.worldPos * 0.5 + 0.5);
surface.Smoothness = _Smoothness;
}
ENDCG
}
FallBack "Diffuse"
}