mirror of
https://github.com/maxartz15/SceneDebugViewer.git
synced 2025-06-16 15:36:13 +02:00
Pressets.
This commit is contained in:
34
Runtime/Shaders/Surface.shader
Normal file
34
Runtime/Shaders/Surface.shader
Normal file
@ -0,0 +1,34 @@
|
||||
Shader "Hidden/Surface"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
// Physically based Standard lighting model, and enable shadows on all light types
|
||||
#pragma surface surf Standard fullforwardshadows
|
||||
|
||||
// Use shader model 3.0 target, to get nicer looking lighting
|
||||
#pragma target 3.0
|
||||
|
||||
sampler2D _RS_Texture;
|
||||
fixed4 _RS_Color;
|
||||
half _RS_Metallic;
|
||||
half _RS_Glossiness;
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv_RS_Texture;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutputStandard o)
|
||||
{
|
||||
o.Albedo = tex2D(_RS_Texture, IN.uv_RS_Texture) * _RS_Color;
|
||||
o.Metallic = _RS_Metallic;
|
||||
o.Smoothness = _RS_Glossiness;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
10
Runtime/Shaders/Surface.shader.meta
Normal file
10
Runtime/Shaders/Surface.shader.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 442bea547b43fe643959790eb5b87ede
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -29,7 +29,7 @@ Shader "Hidden/TriPlanarTexture"
|
||||
|
||||
sampler2D _RS_Texture;
|
||||
float4 _RS_Texture_ST;
|
||||
float _RS_Float;
|
||||
float _RS_Sharpness;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
@ -57,7 +57,7 @@ Shader "Hidden/TriPlanarTexture"
|
||||
//show texture on both sides of the object (positive and negative)
|
||||
weights = abs(weights);
|
||||
//make the transition sharper
|
||||
weights = pow(weights, _RS_Float);
|
||||
weights = pow(weights, _RS_Sharpness);
|
||||
//make it so the sum of all components is 1
|
||||
weights = weights / (weights.x + weights.y + weights.z);
|
||||
|
||||
|
Reference in New Issue
Block a user