Search Unity

boring standard skybox shader

Discussion in 'Shaders' started by grobonom, Apr 9, 2019.

  1. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Hi all :)

    The U3D skybox shader....
    It is just as nice as frustrating !

    Yes ! night&day handling.... really amazing !
    but..... where are the stars ? it seems we all live in the milky way ! WE WANT STARS !!!!

    yes ! athmosphere thickness and color handling !!! aww S*** ! it's great !
    but..... where are the clouds ? i appears we all live on earth ! WE WANT CLOUDS !!!!

    okay U3D dev are unefficient.... ( ahah here's my ass for kikin' :D )
    let's do nice things by ourselves ^^

    At frist i added stars on the standard sky shader.... was a pain in the ass but.....
    there are stars.... ugly and pixelated stars but.... there are stars...
    Am i satisfied ? nah those stars are S*** ! but they're beter than no stars ^^

    I didn't post the shader as i thought everyone needing stars did what i did....

    now i want clouds.... hehehe. ye ! the more you give, the more you want :p

    clouds ? ----> skybox !

    lets integrate this in the standard U3D sky shader
    and.... oooookay.... i set up some weird parameters..... ask me to explain, and i'll offer u a rhum :p

    nevertheless, there are clouds !
    Even unsatisfying clouds, they're here. and will do the trick.

    lemme give you some shots:
    nite.jpg

    and in day:
    day.jpg

    i wish it looked better.... but i lack of time for diggin on this.

    please @bgolus come and laugh at me kikin my ass :D as you know what shader writing means !

    the code ?
    here it is and i like to share it as i sincerely hope some ppl will make it....
    good and usable :p

    Code (CSharp):
    1. // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
    2.  
    3. // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
    4.  
    5. // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
    6.  
    7. Shader "Skybox/mon_skybox1" {
    8. Properties {
    9.     [KeywordEnum(None, Simple, High Quality)] _SunDisk ("Sun", Int) = 2
    10.     _SunSize ("Sun Size", Range(0,1)) = 0.04
    11.     _SunSizeConvergence("Sun Size Convergence", Range(1,10)) = 5
    12.  
    13.     _AtmosphereThickness ("Atmosphere Thickness", Range(0,5)) = 1.0
    14.     _SkyTint ("Sky Tint", Color) = (.5, .5, .5, 1)
    15.     _GroundColor ("Ground", Color) = (.369, .349, .341, 1)
    16.  
    17.     _Exposure("Exposure", Range(0, 8)) = 1.3
    18.     _stars("stars", Range(0,512)) = 256
    19.     _stars_int("stars intensity", Range(0,1)) = 0.5
    20.  
    21. }
    22.  
    23. SubShader {
    24.     Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" }
    25.     Cull Off ZWrite Off
    26.  
    27.     Pass {
    28.  
    29.         CGPROGRAM
    30.         #pragma vertex vert
    31.         #pragma fragment frag
    32.  
    33.         #include "UnityCG.cginc"
    34.         #include "Lighting.cginc"
    35.  
    36.         #pragma multi_compile _SUNDISK_NONE _SUNDISK_SIMPLE _SUNDISK_HIGH_QUALITY
    37.  
    38.         uniform half _Exposure;     // HDR exposure
    39.         uniform half3 _GroundColor;
    40.         uniform half _SunSize;
    41.         uniform half _SunSizeConvergence;
    42.         uniform half3 _SkyTint;
    43.         uniform half _AtmosphereThickness;
    44.  
    45.     #if defined(UNITY_COLORSPACE_GAMMA)
    46.         #define GAMMA 2
    47.         #define COLOR_2_GAMMA(color) color
    48.         #define COLOR_2_LINEAR(color) color*color
    49.         #define LINEAR_2_OUTPUT(color) sqrt(color)
    50.     #else
    51.         #define GAMMA 2.2
    52.         // HACK: to get gfx-tests in Gamma mode to agree until UNITY_ACTIVE_COLORSPACE_IS_GAMMA is working properly
    53.         #define COLOR_2_GAMMA(color) ((unity_ColorSpaceDouble.r>2.0) ? pow(color,1.0/GAMMA) : color)
    54.         #define COLOR_2_LINEAR(color) color
    55.         #define LINEAR_2_LINEAR(color) color
    56.     #endif
    57.  
    58.         // RGB wavelengths
    59.         // .35 (.62=158), .43 (.68=174), .525 (.75=190)
    60.         static const float3 kDefaultScatteringWavelength = float3(.65, .57, .475);
    61.         static const float3 kVariableRangeForScatteringWavelength = float3(.15, .15, .15);
    62.  
    63.         #define OUTER_RADIUS 1.025
    64.         static const float kOuterRadius = OUTER_RADIUS;
    65.         static const float kOuterRadius2 = OUTER_RADIUS*OUTER_RADIUS;
    66.         static const float kInnerRadius = 1.0;
    67.         static const float kInnerRadius2 = 1.0;
    68.  
    69.         static const float kCameraHeight = 0.0001;
    70.  
    71.         #define kRAYLEIGH (lerp(0.0, 0.0025, pow(_AtmosphereThickness,2.5)))      // Rayleigh constant
    72.         #define kMIE 0.0010             // Mie constant
    73.         #define kSUN_BRIGHTNESS 20.0    // Sun brightness
    74.  
    75.         #define kMAX_SCATTER 50.0 // Maximum scattering value, to prevent math overflows on Adrenos
    76.  
    77.         static const half kHDSundiskIntensityFactor = 15.0;
    78.         static const half kSimpleSundiskIntensityFactor = 27.0;
    79.  
    80.         static const half kSunScale = 400.0 * kSUN_BRIGHTNESS;
    81.         static const float kKmESun = kMIE * kSUN_BRIGHTNESS;
    82.         static const float kKm4PI = kMIE * 4.0 * 3.14159265;
    83.         static const float kScale = 1.0 / (OUTER_RADIUS - 1.0);
    84.         static const float kScaleDepth = 0.25;
    85.         static const float kScaleOverScaleDepth = (1.0 / (OUTER_RADIUS - 1.0)) / 0.25;
    86.         static const float kSamples = 2.0; // THIS IS UNROLLED MANUALLY, DON'T TOUCH
    87.  
    88.         #define MIE_G (-0.990)
    89.         #define MIE_G2 0.9801
    90.  
    91.         #define SKY_GROUND_THRESHOLD 0.02
    92.  
    93.         // fine tuning of performance. You can override defines here if you want some specific setup
    94.         // or keep as is and allow later code to set it according to target api
    95.  
    96.         // if set vprog will output color in final color space (instead of linear always)
    97.         // in case of rendering in gamma mode that means that we will do lerps in gamma mode too, so there will be tiny difference around horizon
    98.         // #define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 0
    99.  
    100.         // sun disk rendering:
    101.         // no sun disk - the fastest option
    102.         #define SKYBOX_SUNDISK_NONE 0
    103.         // simplistic sun disk - without mie phase function
    104.         #define SKYBOX_SUNDISK_SIMPLE 1
    105.         // full calculation - uses mie phase function
    106.         #define SKYBOX_SUNDISK_HQ 2
    107.  
    108.         // uncomment this line and change SKYBOX_SUNDISK_SIMPLE to override material settings
    109.         // #define SKYBOX_SUNDISK SKYBOX_SUNDISK_SIMPLE
    110.  
    111.     #ifndef SKYBOX_SUNDISK
    112.         #if defined(_SUNDISK_NONE)
    113.             #define SKYBOX_SUNDISK SKYBOX_SUNDISK_NONE
    114.         #elif defined(_SUNDISK_SIMPLE)
    115.             #define SKYBOX_SUNDISK SKYBOX_SUNDISK_SIMPLE
    116.         #else
    117.             #define SKYBOX_SUNDISK SKYBOX_SUNDISK_HQ
    118.         #endif
    119.     #endif
    120.  
    121.     #ifndef SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
    122.         #if defined(SHADER_API_MOBILE)
    123.             #define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 1
    124.         #else
    125.             #define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 0
    126.         #endif
    127.     #endif
    128.  
    129.       half _stars;
    130.       half _stars_int;
    131.  
    132.  
    133.         // Calculates the Rayleigh phase function
    134.         half getRayleighPhase(half eyeCos2)
    135.         {
    136.             return 0.75 + 0.75*eyeCos2;
    137.         }
    138.         half getRayleighPhase(half3 light, half3 ray)
    139.         {
    140.             half eyeCos = dot(light, ray);
    141.             return getRayleighPhase(eyeCos * eyeCos);
    142.         }
    143.  
    144.  
    145.         struct appdata_t
    146.         {
    147.             float4 vertex : POSITION;
    148.             float3 texcoord :TEXCOORD0;
    149.             UNITY_VERTEX_INPUT_INSTANCE_ID
    150.         };
    151.  
    152.         struct v2f
    153.         {
    154.             float4  pos             : SV_POSITION;
    155.  
    156.         #if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
    157.             // for HQ sun disk, we need vertex itself to calculate ray-dir per-pixel
    158.             float3  vertex          : TEXCOORD0;
    159.         #elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
    160.             half3   rayDir          : TEXCOORD0;
    161.         #else
    162.             // as we dont need sun disk we need just rayDir.y (sky/ground threshold)
    163.             half    skyGroundFactor : TEXCOORD0;
    164.         #endif
    165.  
    166.             // calculate sky colors in vprog
    167.             half3   groundColor     : TEXCOORD1;
    168.             half3   skyColor        : TEXCOORD2;
    169.  
    170.         #if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
    171.             half3   sunColor        : TEXCOORD3;
    172.         #endif
    173.          half3 uv : TEXCOORD4;
    174.      
    175.             UNITY_VERTEX_OUTPUT_STEREO
    176.         };
    177.      
    178.      
    179.  
    180.         float scale(float inCos)
    181.         {
    182.             float x = 1.0 - inCos;
    183.         #if defined(SHADER_API_N3DS)
    184.             // The polynomial expansion here generates too many swizzle instructions for the 3DS vertex assembler
    185.             // Approximate by removing x^1 and x^2
    186.             return 0.25 * exp(-0.00287 + x*x*x*(-6.80 + x*5.25));
    187.         #else
    188.             return 0.25 * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));
    189.         #endif
    190.         }
    191.  
    192.         v2f vert (appdata_t v)
    193.         {
    194.             v2f OUT;
    195.             UNITY_SETUP_INSTANCE_ID(v);
    196.             UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
    197.             OUT.pos = UnityObjectToClipPos(v.vertex);
    198.  
    199.             float3 kSkyTintInGammaSpace = COLOR_2_GAMMA(_SkyTint); // convert tint from Linear back to Gamma
    200.             float3 kScatteringWavelength = lerp (
    201.                 kDefaultScatteringWavelength-kVariableRangeForScatteringWavelength,
    202.                 kDefaultScatteringWavelength+kVariableRangeForScatteringWavelength,
    203.                 half3(1,1,1) - kSkyTintInGammaSpace); // using Tint in sRGB gamma allows for more visually linear interpolation and to keep (.5) at (128, gray in sRGB) point
    204.             float3 kInvWavelength = 1.0 / pow(kScatteringWavelength, 4);
    205.  
    206.             float kKrESun = kRAYLEIGH * kSUN_BRIGHTNESS;
    207.             float kKr4PI = kRAYLEIGH * 4.0 * 3.14159265;
    208.  
    209.             float3 cameraPos = float3(0,kInnerRadius + kCameraHeight,0);    // The camera's current position
    210.  
    211.             // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)
    212.             float3 eyeRay = normalize(mul((float3x3)unity_ObjectToWorld, v.vertex.xyz));
    213.  
    214.             float far = 0.0;
    215.             half3 cIn, cOut;
    216.          
    217.          
    218.             OUT.uv = v.texcoord.xyz*_stars;
    219.  
    220.             if(eyeRay.y >= 0.0)
    221.             {
    222.                 // Sky
    223.                 // Calculate the length of the "atmosphere"
    224.                 far = sqrt(kOuterRadius2 + kInnerRadius2 * eyeRay.y * eyeRay.y - kInnerRadius2) - kInnerRadius * eyeRay.y;
    225.  
    226.                 float3 pos = cameraPos + far * eyeRay;
    227.  
    228.                 // Calculate the ray's starting position, then calculate its scattering offset
    229.                 float height = kInnerRadius + kCameraHeight;
    230.                 float depth = exp(kScaleOverScaleDepth * (-kCameraHeight));
    231.                 float startAngle = dot(eyeRay, cameraPos) / height;
    232.                 float startOffset = depth*scale(startAngle);
    233.  
    234.  
    235.                 // Initialize the scattering loop variables
    236.                 float sampleLength = far / kSamples;
    237.                 float scaledLength = sampleLength * kScale;
    238.                 float3 sampleRay = eyeRay * sampleLength;
    239.                 float3 samplePoint = cameraPos + sampleRay * 0.5;
    240.  
    241.                 // Now loop through the sample rays
    242.                 float3 frontColor = float3(0.0, 0.0, 0.0);
    243.                 // Weird workaround: WP8 and desktop FL_9_3 do not like the for loop here
    244.                 // (but an almost identical loop is perfectly fine in the ground calculations below)
    245.                 // Just unrolling this manually seems to make everything fine again.
    246. //              for(int i=0; i<int(kSamples); i++)
    247.                 {
    248.                     float height = length(samplePoint);
    249.                     float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
    250.                     float lightAngle = dot(_WorldSpaceLightPos0.xyz, samplePoint) / height;
    251.                     float cameraAngle = dot(eyeRay, samplePoint) / height;
    252.                     float scatter = (startOffset + depth*(scale(lightAngle) - scale(cameraAngle)));
    253.                     float3 attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
    254.  
    255.                     frontColor += attenuate * (depth * scaledLength);
    256.                     samplePoint += sampleRay;
    257.                 }
    258.                 {
    259.                     float height = length(samplePoint);
    260.                     float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
    261.                     float lightAngle = dot(_WorldSpaceLightPos0.xyz, samplePoint) / height;
    262.                     float cameraAngle = dot(eyeRay, samplePoint) / height;
    263.                     float scatter = (startOffset + depth*(scale(lightAngle) - scale(cameraAngle)));
    264.                     float3 attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
    265.  
    266.                     frontColor += attenuate * (depth * scaledLength);
    267.                     samplePoint += sampleRay;
    268.                 }
    269.  
    270.  
    271.  
    272.                 // Finally, scale the Mie and Rayleigh colors and set up the varying variables for the pixel shader
    273.                 cIn = frontColor * (kInvWavelength * kKrESun);
    274.                 cOut = frontColor * kKmESun;
    275.             }
    276.             else
    277.             {
    278.                 // Ground
    279.                 far = (-kCameraHeight) / (min(-0.001, eyeRay.y));
    280.  
    281.                 float3 pos = cameraPos + far * eyeRay;
    282.  
    283.                 // Calculate the ray's starting position, then calculate its scattering offset
    284.                 float depth = exp((-kCameraHeight) * (1.0/kScaleDepth));
    285.                 float cameraAngle = dot(-eyeRay, pos);
    286.                 float lightAngle = dot(_WorldSpaceLightPos0.xyz, pos);
    287.                 float cameraScale = scale(cameraAngle);
    288.                 float lightScale = scale(lightAngle);
    289.                 float cameraOffset = depth*cameraScale;
    290.                 float temp = (lightScale + cameraScale);
    291.  
    292.                 // Initialize the scattering loop variables
    293.                 float sampleLength = far / kSamples;
    294.                 float scaledLength = sampleLength * kScale;
    295.                 float3 sampleRay = eyeRay * sampleLength;
    296.                 float3 samplePoint = cameraPos + sampleRay * 0.5;
    297.  
    298.                 // Now loop through the sample rays
    299.                 float3 frontColor = float3(0.0, 0.0, 0.0);
    300.                 float3 attenuate;
    301. //              for(int i=0; i<int(kSamples); i++) // Loop removed because we kept hitting SM2.0 temp variable limits. Doesn't affect the image too much.
    302.                 {
    303.                     float height = length(samplePoint);
    304.                     float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
    305.                     float scatter = depth*temp - cameraOffset;
    306.                     attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
    307.                     frontColor += attenuate * (depth * scaledLength);
    308.                     samplePoint += sampleRay;
    309.                 }
    310.  
    311.                 cIn = frontColor * (kInvWavelength * kKrESun + kKmESun);
    312.                 cOut = clamp(attenuate, 0.0, 1.0);
    313.             }
    314.  
    315.         #if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
    316.             OUT.vertex          = -v.vertex;
    317.         #elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
    318.             OUT.rayDir          = half3(-eyeRay);
    319.         #else
    320.             OUT.skyGroundFactor = -eyeRay.y / SKY_GROUND_THRESHOLD;
    321.         #endif
    322.  
    323.             // if we want to calculate color in vprog:
    324.             // 1. in case of linear: multiply by _Exposure in here (even in case of lerp it will be common multiplier, so we can skip mul in fshader)
    325.             // 2. in case of gamma and SKYBOX_COLOR_IN_TARGET_COLOR_SPACE: do sqrt right away instead of doing that in fshader
    326.  
    327.             OUT.groundColor = _Exposure * (cIn + COLOR_2_LINEAR(_GroundColor) * cOut);
    328.             OUT.skyColor    = _Exposure * (cIn * getRayleighPhase(_WorldSpaceLightPos0.xyz, -eyeRay));
    329.  
    330.         #if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
    331.             // The sun should have a stable intensity in its course in the sky. Moreover it should match the highlight of a purely specular material.
    332.             // This matching was done using the standard shader BRDF1 on the 5/31/2017
    333.             // Finally we want the sun to be always bright even in LDR thus the normalization of the lightColor for low intensity.
    334.             half lightColorIntensity = clamp(length(_LightColor0.xyz), 0.25, 1);
    335.             #if SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
    336.                 OUT.sunColor    = kSimpleSundiskIntensityFactor * saturate(cOut * kSunScale) * _LightColor0.xyz / lightColorIntensity;
    337.             #else // SKYBOX_SUNDISK_HQ
    338.                 OUT.sunColor    = kHDSundiskIntensityFactor * saturate(cOut) * _LightColor0.xyz / lightColorIntensity;
    339.             #endif
    340.  
    341.         #endif
    342.  
    343.         #if defined(UNITY_COLORSPACE_GAMMA) && SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
    344.             OUT.groundColor = sqrt(OUT.groundColor);
    345.             OUT.skyColor    = sqrt(OUT.skyColor);
    346.             #if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
    347.                 OUT.sunColor= sqrt(OUT.sunColor);
    348.             #endif
    349.         #endif
    350.  
    351.             return OUT;
    352.         }
    353.  
    354.  
    355.         // Calculates the Mie phase function
    356.         half getMiePhase(half eyeCos, half eyeCos2)
    357.         {
    358.             half temp = 1.0 + MIE_G2 - 2.0 * MIE_G * eyeCos;
    359.             temp = pow(temp, pow(_SunSize,0.65) * 10);
    360.             temp = max(temp,1.0e-4); // prevent division by zero, esp. in half precision
    361.             temp = 1.5 * ((1.0 - MIE_G2) / (2.0 + MIE_G2)) * (1.0 + eyeCos2) / temp;
    362.             #if defined(UNITY_COLORSPACE_GAMMA) && SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
    363.                 temp = pow(temp, .454545);
    364.             #endif
    365.             return temp;
    366.         }
    367.            
    368.          half random (half3 st)
    369.          {
    370.             return frac(sin(dot(st.xyz,float3(12.9898,78.233,1)))*43758.5453123);
    371.          }
    372.      
    373.         // Calculates the sun shape
    374.         half calcSunAttenuation(half3 lightPos, half3 ray)
    375.         {
    376.         #if SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
    377.             half3 delta = lightPos - ray;
    378.             half dist = length(delta);
    379.             half spot = 1.0 - smoothstep(0.0, _SunSize, dist);
    380.             return spot * spot;
    381.         #else // SKYBOX_SUNDISK_HQ
    382.             half focusedEyeCos = pow(saturate(dot(lightPos, ray)), _SunSizeConvergence);
    383.          
    384.             return (getMiePhase(-focusedEyeCos, focusedEyeCos * focusedEyeCos));
    385.         #endif
    386.         }
    387.  
    388.  
    389.         half4 frag (v2f IN) : SV_Target
    390.         {
    391.             half3 col = half3(0.0, 0.0, 0.0);
    392.  
    393.         // if y > 1 [eyeRay.y < -SKY_GROUND_THRESHOLD] - ground
    394.         // if y >= 0 and < 1 [eyeRay.y <= 0 and > -SKY_GROUND_THRESHOLD] - horizon
    395.         // if y < 0 [eyeRay.y > 0] - sky
    396.         #if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
    397.             half3 ray = normalize(mul((float3x3)unity_ObjectToWorld, IN.vertex));
    398.             half y = ray.y / SKY_GROUND_THRESHOLD;
    399.         #elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
    400.             half3 ray = IN.rayDir.xyz;
    401.             half y = ray.y / SKY_GROUND_THRESHOLD;
    402.         #else
    403.             half y = IN.skyGroundFactor;
    404.         #endif
    405.  
    406.             // if we did precalculate color in vprog: just do lerp between them
    407.             col = lerp(IN.skyColor, IN.groundColor, saturate(y));
    408.  
    409.         #if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
    410.             if(y < 0.0)
    411.             {
    412.                col += IN.sunColor * calcSunAttenuation(_WorldSpaceLightPos0.xyz, -ray);
    413.             }
    414.         #endif
    415.  
    416.         // stars generation
    417.          half rnd = random(round(IN.uv));
    418.          half2 tcol = saturate( half2( rnd - 0.997, rnd - 0.99)) ;
    419.          col+=(tcol.x * 100 + tcol.y * 5)*(saturate(1-col.b*5))*_stars_int;
    420.      
    421.         #if defined(UNITY_COLORSPACE_GAMMA) && !SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
    422.             col = LINEAR_2_OUTPUT(col);
    423.         #endif
    424.  
    425.      
    426.      
    427.      
    428.             return half4(col,1.0);
    429.  
    430.         }
    431.         ENDCG
    432.     }
    433. }
    434.  
    435.  
    436. Fallback Off
    437. CustomEditor "SkyboxProceduralShaderGUI"
    438. }
    439.  
    All of you will note it's based on be standard skybox shader.

    feel free to get/modify it and report your experience over here mates :)

    regards and....

    happy unitying !!!
     
    Last edited: Apr 9, 2019
    spamove likes this.
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    The standard Skybox shader isn't fancy, true, but imo it serves it's purpose.

    There's a Cloud version of it on GitHub: CloudSkybox

    Some others also made their own procedual skyboxes - e.g.:
    - Procedural Skybox by Evan Edwards
    - Dark and Stormy by vfxmike
     
  3. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    awww sh*t !!! i didn't get it :/

    thx @Mauri :) i gonna have a look at it :)