commit 807aa8c3c6e62c5d033064e3190ae432fb66db03 Merge: 34f74aa 3777d06 Author: Clement <clement@jo85.com> Date: Thu Jan 18 12:02:57 2024 +0100 Merge pull request 'add Atomes Factory' (#10) from feature/AtomesFactory into develop Reviewed-on: #10 Reviewed-by: Clement <clement@jo85.com> commit 3777d06a0ee942994fdfe90d71fc5056c37346d9 Author: Mathis <mathis.ragot@epitech.eu> Date: Thu Jan 18 12:00:00 2024 +0100 Rename Classname commit 16bd5bfb6cd51e253e22417ab8196a58e1726849 Merge: da9d57b 34f74aa Author: Mathis <mathis.ragot@epitech.eu> Date: Thu Jan 18 11:46:03 2024 +0100 Merge remote-tracking branch 'origin/develop' into feature/AtomesFactory commit da9d57b0bba34dbe24f5e7f744ce60f430832ff4 Author: Mathis <mathis.ragot@epitech.eu> Date: Thu Jan 18 11:44:22 2024 +0100 vue foria config commit 5346e596c8a0db7684b64920c328abee459926d9 Author: Mathis <mathis.ragot@epitech.eu> Date: Thu Jan 18 11:28:02 2024 +0100 [feature/AtomesFactory] - remove testing file commit f613217658cf2f1f48ceeeaa3183e515de857213 Author: Mathis <mathis.ragot@epitech.eu> Date: Thu Jan 18 10:38:59 2024 +0100 [feature/AtomesFactory] - Add json for atomes commit bc2b9e02fdb692d56937bd37cc3d821ffb717424 Author: Mathis <mathis.ragot@epitech.eu> Date: Fri Jan 12 15:37:09 2024 +0100 add Atomes Factory commit 34f74aa44366c6d5f9e0d647a7837704edbd5fad Merge: 8b6d07f f181fd9 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:50:43 2024 +0100 Merge pull request 'feature/multi_targets' (#7) from feature/multi_targets into develop Reviewed-on: #7 Reviewed-by: Clement <clement@jo85.com> commit f181fd993504c811a4546e56f83eb05ed62a625d Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:50:10 2024 +0100 fix du mauvais nom de scene dans le script ChangeScene.cs commit 1c76868eee12406d6c39fa64da8462e35019a39e Merge: f1ec062 8b6d07f Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:39:02 2024 +0100 Merge remote-tracking branch 'origin/develop' into feature/multi_targets commit f1ec062047ba68d48493b25273ba5893f42a890f Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:37:29 2024 +0100 ajout du font fallback commit 9c23975b204ceb09bd3ccc57b847cf0a8158fb95 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:36:49 2024 +0100 rajouts des fonts text mesh pro commit aff9df22cfbed9e8b317cafe4269fce891a5bbe5 Merge: a791273 73394e5 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 11:03:32 2024 +0100 Merge remote-tracking branch 'origin/develop' into feature/multi_targets commit a7912733e5fed60b9514c778fd9f40661dc66b64 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 10:54:51 2024 +0100 Ajout dans le canvas d'éléments UI (nom, description....) commit 0313fe28a1b718152015a401fda32069e94303c0 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Jan 12 09:57:07 2024 +0100 Suppression du build de la CI commit 5237a32bb4759c43104e9397cb43b328a99b7c62 Author: Nicolas <nicolas.sansd@gmail.com> Date: Thu Jan 11 16:18:35 2024 +0100 ajout de la keystore de debug (user) + changement de la target version d'android commit afa265dd3141ef3fd96bff685ca655594453a876 Author: Nicolas <nicolas.sansd@gmail.com> Date: Thu Jan 11 11:26:53 2024 +0100 Affichage des molécules unitairement et en mode fusion commit 84136dcc5c3b00603ba8531901418125a832a255 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Dec 22 15:05:47 2023 +0100 MAJ du fichier d'action build.yaml commit ce3c95654431f25e22810481f3b10b24f158decd Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Dec 22 15:02:10 2023 +0100 MAJ du fichier d'action build.yaml commit 8f105732f7aaa41689894ab388675ae0b79f66f6 Author: Nicolas <nicolas.sansd@gmail.com> Date: Fri Dec 22 14:36:52 2023 +0100 Ajout de la multitarget pour générer un préfab
139 lines
3.4 KiB
Plaintext
139 lines
3.4 KiB
Plaintext
// Simplified version of the SDF Surface shader :
|
|
// - No support for Bevel, Bump or envmap
|
|
// - Diffuse only lighting
|
|
// - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
|
|
|
|
Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
|
|
|
|
Properties {
|
|
_FaceTex ("Fill Texture", 2D) = "white" {}
|
|
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
|
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
|
|
|
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
|
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
|
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
|
|
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
|
|
|
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
|
_GlowOffset ("Offset", Range(-1,1)) = 0
|
|
_GlowInner ("Inner", Range(0,1)) = 0.05
|
|
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
|
_GlowPower ("Falloff", Range(1, 0)) = 0.75
|
|
|
|
_WeightNormal ("Weight Normal", float) = 0
|
|
_WeightBold ("Weight Bold", float) = 0.5
|
|
|
|
// Should not be directly exposed to the user
|
|
_ShaderFlags ("Flags", float) = 0
|
|
_ScaleRatioA ("Scale RatioA", float) = 1
|
|
_ScaleRatioB ("Scale RatioB", float) = 1
|
|
_ScaleRatioC ("Scale RatioC", float) = 1
|
|
|
|
_MainTex ("Font Atlas", 2D) = "white" {}
|
|
_TextureWidth ("Texture Width", float) = 512
|
|
_TextureHeight ("Texture Height", float) = 512
|
|
_GradientScale ("Gradient Scale", float) = 5.0
|
|
_ScaleX ("Scale X", float) = 1.0
|
|
_ScaleY ("Scale Y", float) = 1.0
|
|
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
|
|
_Sharpness ("Sharpness", Range(-1,1)) = 0
|
|
|
|
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
|
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
|
|
|
_CullMode ("Cull Mode", Float) = 0
|
|
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
|
|
//_MaskSoftness ("Mask Softness", float) = 0
|
|
}
|
|
|
|
SubShader {
|
|
|
|
Tags {
|
|
"Queue"="Transparent"
|
|
"IgnoreProjector"="True"
|
|
"RenderType"="Transparent"
|
|
}
|
|
|
|
LOD 300
|
|
Cull [_CullMode]
|
|
|
|
CGPROGRAM
|
|
#pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
|
|
#pragma target 3.0
|
|
#pragma shader_feature __ GLOW_ON
|
|
|
|
#include "TMPro_Properties.cginc"
|
|
#include "TMPro.cginc"
|
|
|
|
half _FaceShininess;
|
|
half _OutlineShininess;
|
|
|
|
struct Input
|
|
{
|
|
fixed4 color : COLOR;
|
|
float2 uv_MainTex;
|
|
float2 uv2_FaceTex;
|
|
float2 uv2_OutlineTex;
|
|
float2 param; // Weight, Scale
|
|
float3 viewDirEnv;
|
|
};
|
|
|
|
#include "TMPro_Surface.cginc"
|
|
|
|
ENDCG
|
|
|
|
// Pass to render object as a shadow caster
|
|
Pass
|
|
{
|
|
Name "Caster"
|
|
Tags { "LightMode" = "ShadowCaster" }
|
|
Offset 1, 1
|
|
|
|
Fog {Mode Off}
|
|
ZWrite On ZTest LEqual Cull Off
|
|
|
|
CGPROGRAM
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_shadowcaster
|
|
#include "UnityCG.cginc"
|
|
|
|
struct v2f {
|
|
V2F_SHADOW_CASTER;
|
|
float2 uv : TEXCOORD1;
|
|
float2 uv2 : TEXCOORD3;
|
|
float alphaClip : TEXCOORD2;
|
|
};
|
|
|
|
uniform float4 _MainTex_ST;
|
|
uniform float4 _OutlineTex_ST;
|
|
float _OutlineWidth;
|
|
float _FaceDilate;
|
|
float _ScaleRatioA;
|
|
|
|
v2f vert( appdata_base v )
|
|
{
|
|
v2f o;
|
|
TRANSFER_SHADOW_CASTER(o)
|
|
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
|
|
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
|
|
o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
|
|
return o;
|
|
}
|
|
|
|
uniform sampler2D _MainTex;
|
|
|
|
float4 frag(v2f i) : COLOR
|
|
{
|
|
fixed4 texcol = tex2D(_MainTex, i.uv).a;
|
|
clip(texcol.a - i.alphaClip);
|
|
SHADOW_CASTER_FRAGMENT(i)
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
|
|
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
|
|
}
|