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 GPU.shader
2021-01-31 14:03:48 +08:00

36 lines
649 B
Plaintext

Shader "Graph/Point Surface GPU"
{
Properties
{
_Smoothness("Smoothness", Range(0, 1)) = 0.5
}
SubShader
{
CGPROGRAM
#pragma surface ConfigureSurface Standard fullforwardshadows addshadow
#pragma instancing_options assumeuniformscaling procedural:ConfigureProcedural
#pragma editor_sync_compilation
#pragma target 4.5
#include "Point GPU.hlsl"
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"
}