CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 20:15:23 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=dc4831fa068d945523aaccd1d64a045dcf508a13cf1d04a84907e06a6ccd0225a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22Rri9yxOfkplHCWWj0Bf9UCyh5B5I0Fx2%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d1077bbd58cb77-BLR
Shader "Custom/AutoTileTriplanarShader"{ Properties { _Main - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/AutoTileTriplanarShader"
- {
- Properties
- {
- _MainTexX ("Texture X", 2D) = "white" {}
- _MainTexY ("Texture Y", 2D) = "white" {}
- _MainTexZ ("Texture Z", 2D) = "white" {}
- _TileFactor ("Tile Factor", Range(1, 10)) = 1.0
- }
- SubShader
- {
- Tags { "RenderType"="Opaque" }
- LOD 200
- CGPROGRAM
- #pragma surface surf Lambert
- sampler2D _MainTexX;
- sampler2D _MainTexY;
- sampler2D _MainTexZ;
- float _TileFactor;
- struct Input
- {
- float2 uv_MainTex;
- float3 worldNormal;
- float3 worldPos;
- };
- void surf (Input IN, inout SurfaceOutput o)
- {
- // Calculate the tiling factor based on the model scale
- float3 modelScale = float3(length(UNITY_MATRIX_MTX0[0]), length(UNITY_MATRIX_MTX0[1]), length(UNITY_MATRIX_MTX0[2]));
- float tilingFactor = _TileFactor / max(modelScale.x, max(modelScale.y, modelScale.z));
- // Calculate the UV coordinates for each axis using the world position
- float2 uvX = IN.worldPos.yz * tilingFactor;
- float2 uvY = IN.worldPos.xz * tilingFactor;
- float2 uvZ = IN.worldPos.xy * tilingFactor;
- // Sample the textures using the calculated UV coordinates
- fixed4 cX = tex2D(_MainTexX, IN.uv_MainTex + uvX);
- fixed4 cY = tex2D(_MainTexY, IN.uv_MainTex + uvY);
- fixed4 cZ = tex2D(_MainTexZ, IN.uv_MainTex + uvZ);
- // Blend the sampled colors based on the absolute value of the worldNormal
- fixed4 finalColor = cX * abs(IN.worldNormal.x) + cY * abs(IN.worldNormal.y) + cZ * abs(IN.worldNormal.z);
- // Output the color
- o.Albedo = finalColor.rgb;
- o.Alpha = finalColor.a;
- }
- ENDCG
- }
- FallBack "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
π MAKE $2500 IN 15 MIN β
Working
JavaScript | 1 sec ago | 0.24 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 4 sec ago | 0.25 KB
-
π΅ Make 3000$ in 20 minutes π΅
JavaScript | 10 sec ago | 0.24 KB
-
ββ
Exploit 2500$ in 15 Minutesβββ 7
JavaScript | 12 sec ago | 0.25 KB
-
π Swapzone +37% glitch
JavaScript | 19 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)ββ 1
JavaScript | 21 sec ago | 0.25 KB
-
π Exchange profit method
JavaScript | 28 sec ago | 0.24 KB
-
ββ
Swapzone Glitch β
Working ββ E
JavaScript | 30 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand